prompts
stringlengths
279
11.1k
answers
stringlengths
1
254
tasks
stringclasses
47 values
The task is to determine the topological sort of a directed acyclic graph (DAG). Here is a directed graph. In the graph, (u, v) means that there is an edge from node u to node v. The graph contains nodes: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, and 20. The graph contains edges: (1, 20), (20,...
[5,15,4,14,3,13,2,12,1,11,20,10,19,9,18,8,16,7,17,6]
graph_topological_sort
The task is to determine the neighbors of a node in the graph. Here is an undirected graph. In the graph, (u, v) means that node u and node v are connected. The graph contains nodes: 1, 2, 3, 4, 5, and 6. The graph contains edges: (1, 6), (1, 3), (1, 5), (3, 4), (3, 5), (2, 4). Question: What are the neighbors of nod...
[3,5,6]
graph_neighbor
Given nodes u and v in a graph, the task is to determine if there is an edge connecting the two nodes. For undirected graphs, it means whether there are edges between u and v. For directed graphs, it means whether there are edges from u to v.Here is an undirected graph. In the graph, (u, v) means that node u and node ...
No
graph_edge_existence
The task is to determine the Adamic-Adar index of two nodes in a graph. The Adamic-Adar index is the sum of the inverse logarithm of the degrees of the common neighbors of the two nodes. Here is an undirected graph. In the graph, (u, v) means that node u and node v are connected. The graph contains nodes: 1, 2, 3, 4, ...
0
graph_adamic_adar_index
The task is to determine the Jaccard coefficient of two nodes in a graph. The Jaccard coefficient is the size of the intersection divided by the size of the union of the neighbors of the two nodes. Here is an undirected graph. In the graph, (u, v) means that node u and node v are connected. The graph contains nodes: 1...
0.7777777777777778
graph_jaccard_coefficient
The task is to determine the effective size of a node in a graph. The effective size of a node is the number of nodes that are not directly connected to it, but are connected to its neighbors. Here is an undirected graph. In the graph, (u, v) means that node u and node v are connected. The graph contains nodes: 1, 2, ...
2.0
graph_effective_size
The task is to determine the number of nodes in the graph. Here is an undirected graph. In the graph, (u, v) means that node u and node v are connected. The graph contains nodes: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, and 20. The graph contains edges: (1, 13), (1, 12), (1, 11), (4, 13), (6,...
20
graph_node_number
The task is to determine the transitivity of a graph. Transitivity is the ratio of the number of triangles in the graph to the number of connected triples of nodes. Here is an undirected graph. In the graph, (u, v) means that node u and node v are connected. The graph contains nodes: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,...
0.43478260869565216
graph_transitivity
The task is to determine the number of isolated nodes in the graph. An isolated node is a node that has no edges connecting it to any other nodes. Here is an undirected graph. In the graph, (u, v) means that node u and node v are connected. The graph contains nodes: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 1...
0
graph_isolate_number
The task is to determine the periphery of a graph. The periphery of a graph is the set of nodes that are farthest from the center of the graph. Here is an undirected graph. In the graph, (u, v) means that node u and node v are connected. The graph contains nodes: 1, 2, 3, 4, 5, and 6. The graph contains edges: (1, 5),...
[1,4]
graph_periphery
The task is to determine the barycenter of a graph. The barycenter of a graph is also called the median. It includes the node that minimizes the sum of distances to all other nodes. Here is an undirected graph. In the graph, (u, v) means that node u and node v are connected. The graph contains nodes: 1, 2, 3, 4, 5, 6,...
[1,19]
graph_barycenter
Given two nodes u and v, the task is to determine the shortest path between u and v (for directed graph, from u to v). Here is an undirected graph. In the graph, (u, v) means that node u and node v are connected. The graph contains nodes: 1, 2, 3, 4, 5, and 6. The graph contains edges: (1, 2), (2, 3), (2, 6), (3, 4), ...
[1,2,3,4]
graph_shortest_path
The task is to determine the periphery of a graph. The periphery of a graph is the set of nodes that are farthest from the center of the graph. Here is an undirected graph. In the graph, (u, v) means that node u and node v are connected. The graph contains nodes: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, and 13. The grap...
[1,4,8,13]
graph_periphery
The task is to find the number of triangles that include a specific node as one vertex. A triangle is a set of three nodes that are all connected to each other. Here is an undirected graph. In the graph, (u, v) means that node u and node v are connected. The graph contains nodes: 1, 2, 3, 4, 5, 6, 7, 8, 9, and 10. The...
0
graph_triangles
The task is to determine the degree centrality of a node in the graph. The degree centrality values are normalized by dividing by the maximum possible degree in a graph. Here is an undirected graph. In the graph, (u, v) means that node u and node v are connected. The graph contains nodes: 1, 2, 3, 4, and 5. The graph ...
0.25
graph_degree_centrality
The task is to determine the number of connected components in the graph. A connected component is a subgraph where any two nodes are connected to each other by paths. Here is an undirected graph. In the graph, (u, v) means that node u and node v are connected. The graph contains nodes: 1, 2, 3, 4, 5, 6, 7, and 8. The...
1
graph_connected_component_number
The task is to determine the effective size of a node in a graph. The effective size of a node is the number of nodes that are not directly connected to it, but are connected to its neighbors. Here is an undirected graph. In the graph, (u, v) means that node u and node v are connected. The graph contains nodes: 1, 2, ...
2.0
graph_effective_size
The task is to determine the dominating set of a graph. A dominating set is a subset of nodes such that every node in the graph is either in the set or adjacent to a node in the set. Here is an undirected graph. In the graph, (u, v) means that node u and node v are connected. The graph contains nodes: 1, 2, 3, 4, 5, 6...
[1,3,8,9]
graph_dominating_set
The task is to determine the number of weakly connected components in a directed graph. A weakly connected component is a maximal subgraph where every node is reachable from every other node when ignoring the direction of edges. Here is a directed graph. In the graph, (u, v) means that there is an edge from node u to ...
3
graph_weakly_connected_number
The task is to determine the harmonic centrality of a node in the graph. Harmonic centrality of a node u is the sum of the reciprocal of the shortest path distances from all other nodes to u (direction is not considered for undirected graphs). Here is an undirected graph. In the graph, (u, v) means that node u and nod...
12.700000000000001
graph_harmonic_centrality
The task is to determine the number of connected components in the graph. A connected component is a subgraph where any two nodes are connected to each other by paths. Here is an undirected graph. In the graph, (u, v) means that node u and node v are connected. The graph contains nodes: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, ...
3
graph_connected_component_number
The task is to determine the center of a graph. The center of a graph includes the node that minimizes the maximum distance to all other nodes. Here is an undirected graph. In the graph, (u, v) means that node u and node v are connected. The graph contains nodes: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, ...
[1,2,5,6]
graph_center
The task is to determine the closeness centrality of a node in the graph. For a node u, closeness centrality is the reciprocal of the average shortest path distance to u over all n-1 reachable nodes. For directed graphs, it computes the incoming distance to u. Here is an undirected graph. In the graph, (u, v) means tha...
0.15426997245179064
graph_closeness_centrality
The task is to determine the dominating set of a graph. A dominating set is a subset of nodes such that every node in the graph is either in the set or adjacent to a node in the set. Here is an undirected graph. In the graph, (u, v) means that node u and node v are connected. The graph contains nodes: 1, 2, 3, 4, 5, 6...
[1,2,3,5,6,10]
graph_dominating_set
Given two nodes u and v, the task is to determine the shortest path between u and v (for directed graph, from u to v). Here is an undirected graph. In the graph, (u, v) means that node u and node v are connected. The graph contains nodes: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 2...
[20,4,3,6,9]
graph_shortest_path
The task is to determine the number of nodes in the graph. Here is an undirected graph. In the graph, (u, v) means that node u and node v are connected. The graph contains nodes: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, and 15. The graph contains edges: (1, 11), (1, 15), (11, 12), (4, 15), (2, 8), (3, 8), (5, 8)...
15
graph_node_number
The task is to determine the minimum vertex cover of a graph. A vertex cover is a set of nodes such that every edge in the graph is incident to at least one node in the set. Here is an undirected graph. In the graph, (u, v) means that node u and node v are connected. The graph contains nodes: 1, 2, 3, 4, 5, 6, 7, 8, 9...
[1,3,6,7,8,9]
graph_min_vertex_cover
The task is to find all bridges of a graph. A bridge is an edge in a graph whose removal increases the number of connected components. Here is an undirected graph. In the graph, (u, v) means that node u and node v are connected. The graph contains nodes: 1, 2, 3, 4, 5, 6, and 7. The graph contains edges: (1, 2), (1, 3...
[(6,7)]
graph_bridges
The task is to determine the number of strongly connected components in a directed graph. A strongly connected component is a maximal subgraph where every node is reachable from every other node. Here is a directed graph. In the graph, (u, v) means that there is an edge from node u to node v. The graph contains nodes:...
26
graph_strongly_connected_number
The task is to determine the closeness centrality of a node in the graph. For a node u, closeness centrality is the reciprocal of the average shortest path distance to u over all n-1 reachable nodes. For directed graphs, it computes the incoming distance to u. Here is an undirected graph. In the graph, (u, v) means tha...
0.2777777777777778
graph_closeness_centrality
The task is to determine the barycenter of a graph. The barycenter of a graph is also called the median. It includes the node that minimizes the sum of distances to all other nodes. Here is an undirected graph. In the graph, (u, v) means that node u and node v are connected. The graph contains nodes: 1, 2, 3, 4, 5, an...
[4]
graph_barycenter
The task is to find the number of triangles that include a specific node as one vertex. A triangle is a set of three nodes that are all connected to each other. Here is an undirected graph. In the graph, (u, v) means that node u and node v are connected. The graph contains nodes: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,...
0
graph_triangles
The task is to determine the local connectivity of two nodes in the graph. Local connectivity is whether there exists at least one path between the two nodes. Here is an undirected graph. In the graph, (u, v) means that node u and node v are connected. The graph contains nodes: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 1...
Yes
graph_local_connectivity
The task is to find the number of triangles that include a specific node as one vertex. A triangle is a set of three nodes that are all connected to each other. Here is an undirected graph. In the graph, (u, v) means that node u and node v are connected. The graph contains nodes: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,...
0
graph_triangles
The task is to determine the constraint of a node in a graph. The constraint of a node is a measure of how much the node is constrained by its neighbors. Here is an undirected graph. In the graph, (u, v) means that node u and node v are connected. The graph contains nodes: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14...
0.5
graph_constraint
The task is to determine if there is a triangle in the graph that includes a specific node. Here is an undirected graph. In the graph, (u, v) means that node u and node v are connected. The graph contains nodes: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, ...
No
graph_triangle_detection
The task is to determine the effective size of a node in a graph. The effective size of a node is the number of nodes that are not directly connected to it, but are connected to its neighbors. Here is an undirected graph. In the graph, (u, v) means that node u and node v are connected. The graph contains nodes: 1, 2, ...
1.0
graph_effective_size
The task is to determine if the graph has a cycle. Here is an undirected graph. In the graph, (u, v) means that node u and node v are connected. The graph contains nodes: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, and 11. The graph contains edges: (1, 4), (4, 11), (2, 6), (2, 7), (6, 10), (3, 7), (3, 8), (8, 9), (5, 9). Question...
No
graph_has_cycle
The task is to determine the degree assortativity coefficient of a graph. The degree assortativity coefficient is a measure of the correlation between the degrees of connected nodes. Here is an undirected graph. In the graph, (u, v) means that node u and node v are connected. The graph contains nodes: 1, 2, 3, 4, 5, 6...
0.2526158445440955
graph_degree_assortativity
The task is to determine if the graph is bipartite. A bipartite graph is a graph whose nodes can be divided into two disjoint sets such that no two graph vertices within the same set are adjacent. Here is an undirected graph. In the graph, (u, v) means that node u and node v are connected. The graph contains nodes: 1,...
No
graph_is_bipartite
The task is to find the number of triangles that include a specific node as one vertex. A triangle is a set of three nodes that are all connected to each other. Here is an undirected graph. In the graph, (u, v) means that node u and node v are connected. The graph contains nodes: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,...
0
graph_triangles
The task is to determine if there is a triangle in the graph that includes a specific node. Here is an undirected graph. In the graph, (u, v) means that node u and node v are connected. The graph contains nodes: 1, 2, 3, 4, and 5. The graph contains edges: (1, 4), (2, 4), (3, 4), (4, 5). Question: Is there a triangle...
No
graph_triangle_detection
The task is to determine the density of the graph. Density is defined as the ratio of the number of edges in the graph to the number of possible edges. For undirected graphs, the density is 2*m/(n*(n-1)), where m is the edge number and n is the node number. For directed graphs, the density is m/(n*(n-1)). Here is a di...
0.14285714285714285
graph_density
The task is to determine the number of strongly connected components in a directed graph. A strongly connected component is a maximal subgraph where every node is reachable from every other node. Here is a directed graph. In the graph, (u, v) means that there is an edge from node u to node v. The graph contains nodes:...
29
graph_strongly_connected_number
The task is to find all bridges of a graph. A bridge is an edge in a graph whose removal increases the number of connected components. Here is an undirected graph. In the graph, (u, v) means that node u and node v are connected. The graph contains nodes: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, and 1...
[(1,9),(1,12),(2,3),(4,8),(8,10),(9,10),(9,11),(16,17)]
graph_bridges
The task is to determine the degree of a node in the graph. For the undirected graph, you should count the edge between two nodes only once. Here is an undirected graph. In the graph, (u, v) means that node u and node v are connected. The graph contains nodes: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, and 12. The graph conta...
3
graph_degree
The task is to determine the Adamic-Adar index of two nodes in a graph. The Adamic-Adar index is the sum of the inverse logarithm of the degrees of the common neighbors of the two nodes. Here is an undirected graph. In the graph, (u, v) means that node u and node v are connected. The graph contains nodes: 1, 2, 3, 4, ...
1.4426950408889634
graph_adamic_adar_index
The task is to determine the harmonic centrality of a node in the graph. Harmonic centrality of a node u is the sum of the reciprocal of the shortest path distances from all other nodes to u (direction is not considered for undirected graphs). Here is an undirected graph. In the graph, (u, v) means that node u and nod...
2.083333333333333
graph_harmonic_centrality
The task is to determine the number of weakly connected components in a directed graph. A weakly connected component is a maximal subgraph where every node is reachable from every other node when ignoring the direction of edges. Here is a directed graph. In the graph, (u, v) means that there is an edge from node u to ...
4
graph_weakly_connected_number
The task is to determine the density of the graph. Density is defined as the ratio of the number of edges in the graph to the number of possible edges. For undirected graphs, the density is 2*m/(n*(n-1)), where m is the edge number and n is the node number. For directed graphs, the density is m/(n*(n-1)). Here is an u...
0.11954022988505747
graph_density
The task is to determine the transitivity of a graph. Transitivity is the ratio of the number of triangles in the graph to the number of connected triples of nodes. Here is an undirected graph. In the graph, (u, v) means that node u and node v are connected. The graph contains nodes: 1, 2, 3, 4, and 5. The graph conta...
0.7894736842105263
graph_transitivity
The task is to determine if there is a triangle in the graph that includes a specific node. Here is an undirected graph. In the graph, (u, v) means that node u and node v are connected. The graph contains nodes: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, and 13. The graph contains edges: (1, 13), (1, 3), (2, 13), (3, 5), ...
No
graph_triangle_detection
The task is to determine the diameter of a graph. The diameter of a graph is the longest shortest path between any two nodes in the graph. Here is an undirected graph. In the graph, (u, v) means that node u and node v are connected. The graph contains nodes: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 1...
6
graph_diameter
The task is to determine the neighbors of a node in the graph. Here is an undirected graph. In the graph, (u, v) means that node u and node v are connected. The graph contains nodes: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, and 19. The graph contains edges: (1, 17), (2, 17), (4, 17), (5, 17), (6,...
[2,7,15]
graph_neighbor
The task is to determine the periphery of a graph. The periphery of a graph is the set of nodes that are farthest from the center of the graph. Here is an undirected graph. In the graph, (u, v) means that node u and node v are connected. The graph contains nodes: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, and 14. The ...
[3,6,11]
graph_periphery
The task is to determine the center of a graph. The center of a graph includes the node that minimizes the maximum distance to all other nodes. Here is an undirected graph. In the graph, (u, v) means that node u and node v are connected. The graph contains nodes: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, ...
[2,3,6,7]
graph_center
The task is to determine the number of edges in the graph. For the undirected graph, you should count the edge between two nodes only once. Here is an undirected graph. In the graph, (u, v) means that node u and node v are connected. The graph contains nodes: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, ...
15
graph_edge_number
The task is to determine the harmonic centrality of a node in the graph. Harmonic centrality of a node u is the sum of the reciprocal of the shortest path distances from all other nodes to u (direction is not considered for undirected graphs). Here is an undirected graph. In the graph, (u, v) means that node u and nod...
9.766666666666664
graph_harmonic_centrality
The task is to determine the periphery of a graph. The periphery of a graph is the set of nodes that are farthest from the center of the graph. Here is an undirected graph. In the graph, (u, v) means that node u and node v are connected. The graph contains nodes: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, ...
[3,5,22,23]
graph_periphery
The task is to determine the neighbors of a node in the graph. Here is an undirected graph. In the graph, (u, v) means that node u and node v are connected. The graph contains nodes: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, and 26. The graph contains edges: (1, 16), (1...
[11,12,21]
graph_neighbor
The task is to determine the Wiener index of a connected graph. The Wiener index of a graph is the sum of the shortest-path distances between each pair of reachable nodes. For pairs of nodes in undirected graphs, only one orientation of the pair is counted. Here is an undirected graph. In the graph, (u, v) means that ...
361.0
graph_wiener_index
The task is to determine the effective size of a node in a graph. The effective size of a node is the number of nodes that are not directly connected to it, but are connected to its neighbors. Here is an undirected graph. In the graph, (u, v) means that node u and node v are connected. The graph contains nodes: 1, 2, ...
1.0
graph_effective_size
The task is to determine the transitivity of a graph. Transitivity is the ratio of the number of triangles in the graph to the number of connected triples of nodes. Here is an undirected graph. In the graph, (u, v) means that node u and node v are connected. The graph contains nodes: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,...
0.7866666666666666
graph_transitivity
The task is to determine if the graph has a cycle. Here is an undirected graph. In the graph, (u, v) means that node u and node v are connected. The graph contains nodes: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, and 21. The graph contains edges: (1, 21), (7, 21), (2, 19), (5, 19), (16, 19...
No
graph_has_cycle
The task is to determine the minimum edge covering of a graph. An edge cover is a set of edges such that every vertex in the graph is incident to at least one edge in the set. The minimum edge cover is the edge cover with the smallest number of edges. Here is an undirected graph. In the graph, (u, v) means that node u...
[(2,3),(4,1),(5,6)]
graph_min_edge_covering
The task is to determine the periphery of a graph. The periphery of a graph is the set of nodes that are farthest from the center of the graph. Here is an undirected graph. In the graph, (u, v) means that node u and node v are connected. The graph contains nodes: 1, 2, 3, 4, 5, 6, 7, and 8. The graph contains edges: (...
[1,2,4,5,6,7,8]
graph_periphery
The task is to determine if the directed graph is strongly connected. A directed graph is strongly connected if there is a directed path between every pair of vertices. Here is a directed graph. In the graph, (u, v) means that there is an edge from node u to node v. The graph contains nodes: 1, 2, 3, 4, 5, 6, 7, 8, 9,...
Yes
graph_is_strongly_connected
The task is to determine the number of strongly connected components in a directed graph. A strongly connected component is a maximal subgraph where every node is reachable from every other node. Here is a directed graph. In the graph, (u, v) means that there is an edge from node u to node v. The graph contains nodes:...
3
graph_strongly_connected_number
The task is to determine if the graph is bipartite. A bipartite graph is a graph whose nodes can be divided into two disjoint sets such that no two graph vertices within the same set are adjacent. Here is a directed graph. In the graph, (u, v) means that there is an edge from node u to node v. The graph contains nodes...
Yes
graph_is_bipartite
The task is to determine the depth-first search (DFS) traversal order given a starting node. Here is an undirected graph. In the graph, (u, v) means that node u and node v are connected. The graph contains nodes: 1, 2, 3, 4, 5, and 6. The graph contains edges: (1, 4), (1, 2), (3, 4), (3, 6), (5, 6). Question: What is...
[(4,1),(1,2),(4,3),(3,6),(6,5)]
graph_dfs
The task is to find all bridges of a graph. A bridge is an edge in a graph whose removal increases the number of connected components. Here is an undirected graph. In the graph, (u, v) means that node u and node v are connected. The graph contains nodes: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, and 16. The g...
[(1,7),(1,15),(2,3),(7,12),(13,14)]
graph_bridges