Apparatus and method for generating a shortest-path tree in a graph
First Claim
1. A method for causing at least one processor to execute a process comprising:
- generating, for each of vertices in a graph that is configured to represent relationships between pieces of data represented by the vertices and edges connecting the vertices so as to cause the data to be searched for by using the graph, a shortest-path tree rooted at a root vertex that is equal to each vertex in the graph so that end-point vertices of each shortest path tree, whose distance from the root vertex is an integer of n equal to or greater than 0, are generated at a same time, the end-point vertex being a vertex positioned at an end point of a shortest path starting from the root vertex,the shortest-path tree representing shortest paths from the root vertex to all the end-point vertices,a path between two vertices being a sequence of edges connecting a sequence of adjacent vertices through which the two vertices are connected to each other,a length of the path being a number of edges included in the path,a shortest path between the two vertices being a path whose length is smallest among all paths between the two vertices,a distance between the two vertices being a length of the shortest path between the two vertices, whereingeneration of a distance N vertex among first vertices in a first shortest path tree, whose distance from a first root vertex is a natural number of N greater than 1 and which is adjacent to a distance N−
1 vertex among the first vertices of the first shortest-path tree, whose distance from the first root vertex is N−
1, is performed based on searching for zero or more child vertices of a second vertex corresponding to the distance N−
1vertex of the first shortest path tree within a second shortest-path tree rooted at a second root vertex adjacent to the first root vertex, which is located on the shortest path from the first root vertex to the distance N−
1 vertex.
1 Assignment
0 Petitions
Accused Products
Abstract
An apparatus generates, for each of vertices in a graph represented by the vertices and edges connecting the vertices, a first shortest-path tree rooted at a first root vertex equal to the each vertex, where the first shortest-path tree represents shortest paths from the first root vertex to vertices. The apparatus generates a vertex in the first shortest path tree whose distance from the first root vertex is a natural number of N, based on searching for one or more child vertices of a vertex within a second shortest-path tree rooted at a second root vertex adjacent to the first root vertex whose distance from the first root vertex is N−1, where the vertex for searching is included in both the first shortest-path tree and the second shortest-path tree.
17 Citations
18 Claims
-
1. A method for causing at least one processor to execute a process comprising:
-
generating, for each of vertices in a graph that is configured to represent relationships between pieces of data represented by the vertices and edges connecting the vertices so as to cause the data to be searched for by using the graph, a shortest-path tree rooted at a root vertex that is equal to each vertex in the graph so that end-point vertices of each shortest path tree, whose distance from the root vertex is an integer of n equal to or greater than 0, are generated at a same time, the end-point vertex being a vertex positioned at an end point of a shortest path starting from the root vertex, the shortest-path tree representing shortest paths from the root vertex to all the end-point vertices, a path between two vertices being a sequence of edges connecting a sequence of adjacent vertices through which the two vertices are connected to each other, a length of the path being a number of edges included in the path, a shortest path between the two vertices being a path whose length is smallest among all paths between the two vertices, a distance between the two vertices being a length of the shortest path between the two vertices, wherein generation of a distance N vertex among first vertices in a first shortest path tree, whose distance from a first root vertex is a natural number of N greater than 1 and which is adjacent to a distance N−
1 vertex among the first vertices of the first shortest-path tree, whose distance from the first root vertex is N−
1, is performed based on searching for zero or more child vertices of a second vertex corresponding to the distance N−
1vertex of the first shortest path tree within a second shortest-path tree rooted at a second root vertex adjacent to the first root vertex, which is located on the shortest path from the first root vertex to the distance N−
1 vertex. - View Dependent Claims (2, 3, 4, 5, 6)
-
-
7. An apparatus comprising:
-
a processor configured to generate, for each of vertices in a graph that is configured to represent relationships between pieces of data represented by the vertices and edges connecting the vertices so as to cause the data to be searched for by using the graph, a shortest-path tree rooted at a root vertex that is equal to each vertex in the graph so that end-point vertices of each shortest path tree, whose distance from the root vertex is an integer of n equal to or greater than 0, are generated at a same time, the end-point vertex being a vertex positioned at an end point of a shortest path starting from the root vertex, the shortest-path tree representing shortest paths from the root vertex to all the end-point vertices, a path between two vertices being a sequence of edges connecting a sequence of adjacent vertices through which the two vertices are connected to each other, a length of the path being a number of edges included in the path, a shortest path between the two vertices being a path whose length is smallest among all paths between the two vertices, a distance between the two vertices being a length of the shortest path between the two vertices, wherein generation of a distance N vertex among first vertices in a first shortest path tree, whose distance from a first root vertex is a natural number of N greater than 1 and which is adjacent to a distance N−
1 vertex among the first vertices of the first shortest-path tree, whose distance from the first root vertex is N−
1, is performed based on searching for zero or more child vertices of a second vertex corresponding to the distance N−
1vertex of the first shortest path tree within a second shortest-path tree rooted at a second root vertex adjacent to the first root vertex, which is located on the shortest path from the first root vertex to the distance N−
1 vertex. - View Dependent Claims (8, 9, 10, 11, 12)
-
-
13. A non-transitory, computer-readable recording medium having stored therein a program for causing a computer to execute a process comprising:
-
generating, for each of vertices in a graph that is configured to represent relationships between pieces of data represented by the vertices and edges connecting the vertices so as to cause the data to be searched for by using the graph, a shortest-path tree rooted at a root vertex that is equal to each vertex in the graph so that end-point vertices of each shortest path tree, whose distance from the root vertex is an integer of n equal to or greater than 0, are generated at a same time, the end-point vertex being a vertex positioned at an end point of a shortest path starting from the root vertex, the shortest-path tree representing shortest paths from the root vertex to all the end-point vertices, a path between two vertices being a sequence of edges connecting a sequence of adjacent vertices through which the two vertices are connected to each other, a length of the path being a number of edges included in the path, a shortest path between the two vertices being a path whose length is smallest among all paths between the two vertices, a distance between the two vertices being a length of the shortest path between the two vertices, wherein generation of a distance N vertex among first vertices in a first shortest path tree, whose distance from a first root vertex is a natural number of N greater than 1 and which is adjacent to a distance N−
1 vertex among the first vertices of the first shortest-path tree, whose distance from the first root vertex is N−
1, is performed based on searching for zero or more child vertices of a second vertex corresponding to the distance N−
1vertex of the first shortest path tree within a second shortest-path tree rooted at a second root vertex adjacent to the first root vertex, which is located on the shortest path from the first root vertex to the distance N−
1 vertex. - View Dependent Claims (14, 15, 16, 17, 18)
-
Specification