A method of computing shortest paths in a weighted graph having vertices and an adjacency matrix with memory resources and a processor including (a) selecting integer weights; (b) carrying out a series of incrementations, an incrementation including finding a set of vertices to which one may arrive from a given set of vertices; (c) carrying out a series of decrementations, a decrementation including finding a set of vertices from which one may go to arrive to a given set of vertices; (d) causing the incrementations and decrementations to be carried out in any order; (e) transforming vectors of increments/decrements in paths, the paths making up a set e1 of the shortest paths in term of number of arcs or using a given number of arcs, Na; (f) selecting n-uple of paths C of lowest cost among set of paths e1; (g) calculating Nb=Na+1; (h) computing iteratively, while Nb≦W(C) the following steps: i. check among paths of length Na+1 if in existence, having a weight lower than w(C) and selecting among them C′ of lowest cost (if such a path does not exist, then C′=C); and ii. C=C′ and Nb=Nb+1; and (i) determining paths of lowest weight based on C.
|
1. A method of computing shortest paths in a weighted graph having vertices and an adjacency matrix with memory resources and a processor comprising:
(a) selecting integer weights;
(b) carrying out a series of incrementations, an incrementation comprising finding a set of vertices to which one may arrive from a given set of vertices;
(c) carrying out a series of decrementations, a decrementation comprising finding a set of vertices from which one may go to arrive to a given set of vertices;
(d) causing the incrementations and decrementations to be carried out in any order;
(e) transforming vectors of increments/decrements in paths, the paths making up set e1 of the shortest paths in term of number of arcs or using a given number of arcs, Na;
(f) selecting n-uple of paths C of lowest cost among a set of paths e1;
(g) calculating Nb=Na+1;
(h) computing iteratively, while Nb≦W(C) the following steps:
i. check among paths of length Na+1 if in existance, having a weight lower than w(C) and selecting among them C′ of lowest cost (if such a path does not exist, then C′=C); and
ii. C=C′ and Nb=Nb1; and
(i) determining paths of lowest weight based on C.
11. A system for computing shortest paths in a weighted graph having vertices and an adjacency matrix, the system comprising:
(a) computation means for selecting integer weights;
(b) computation means for carrying out a series of incrementations, an incrementation comprising finding a set of vertices to which one may arrive from a given set of vertices;
(c) computation means for carrying out a series of decrementations, a decrementation comprising finding a set of vertices from which one may go to arrive to a given set of vertices;
(d) computation means for causing the incrementations and decrementations to be carried out in any order;
(e) computation means for transforming vectors of increments/decrements in paths, the paths making up set e1 of the shortest paths in term of number of arcs or using a given number of arcs, Na;
(f) computation means for selecting n-uple of paths C of lowest cost among a set of paths e1;
(g) computation means for calculating Nb=Na+1;
(h) computation means for computing iteratively, while Nb<w(C) the following steps:
i. check among paths of length Na+1 if in existence, having a weight lower than w(C) and selecting among them C′ of lowest cost (if such a path does not exist, then C′=C); and
ii. C=C′ and Nb=Nb+1; and
(i) computation means for determining paths of lowest weight based on C.
2. The method according to
3. The method according to
(a) equipping the graph with an equivalency relation;
(b) establishing the equivalent classes are vertices of thickened graph G′;
(c) assigning two vertices V1 and V2 of the thickened graph G′, wherein there exists an arc between S1 and S2 if and only if there exists v1 in V1 and v2 in V2 such that there exists an arc between v1 and v2 in G; and
(d) the weight of the arc (V1, V2) is a minimum weight of arcs (v1, v2) with v1 ∈ V1 and v2 ∈ V2.
4. The method according to
(a) the series of incrementations and decrementations are made up simultaneously until they meet;
(b) the incrementations are continued from a first nonempty intersection and the increments are intersected with matching decrementation of the arrival vertex; and
(c) the decrementations are continued from the first nonempty intersection and the decrements are intersected with the matching iticrementation of the departure vertex.
7. The method according to
8. The method according to
9. The method according to
|
This invention deals with graphs. This invention is more particularly profiled to solve the shortest path problem in a valued graph. This kind of calculus meets very numerous applications domains such as, for instance, telecommunications networks, traffic or automatic translations.
Dijkstra's Algorithm is already known. That algorithm keeps up-to-date a set X of vertices whose shortest distance to the origin are known. At the beginning, X only contains the vertex corresponding to the origin. At each step, one adds to X one of the remaining vertices whose distance to the origin is the shortest possible. If all the arcs have labels greater than or equal to 0, it is possible to find a minimal path from the origin toward a, vertex s using only vertices already belonging to X. For example, call “shortcut” such a path. At each step of the algorithm, an array D keeping the best shortcut to reach each vertex is used. As soon as a vertex is reached, the array D contains the shortest distance between the origin and this vertex. To rebuild the shortest path which fulfills this distance, another array C of vertices is kept up to date such that C[s] is the vertex immediately preceding s in the shortest path.
U.S. Pat. No. 6,356,911 (IBM) discloses a system of computation of shortest path. An efficient system and method are presented. They allow the search of shortest paths between multiple origin and multiple destinations. The speed of the classic Dijkstra's algorithm, which is the basis of this method of computation, is improved by using some information regarding relations between a node and a set of destinations in a graph.
The information of relation is made up by the estimation function h(v) concerning a specific node v and a set T of destinations, where h(v) is the lower bound of the set of the lengths of the shortest paths stretching from the node v as far as each of the sets of destinations T. The use of the function of estimation may improve the speed of the Dijkstra's algorithm.
U.S. 2002/0107711 (Sun Microsystems) discloses a search of shortest path using tiles and a propagation of linear cost by piece. A method to find the shortest path is described. This method uses a model in linear cost by piece to guide the search through the compact graph of tiles and to make sure that a shortest path may be found by efficient computation. The propagation function from tile segment to tile segment is used to search a target location from a source location through an area and the shortest path is found by carrying out a backward march using the cost functions computed during the search. The minimal linear convolution is used to make easier the propagation of the cost function.
U.S. 2001/0032272 (NEC) discloses a method for sorting and mailing of shortest path based on the SQ (Service Quality) for a hierarchical communication network. A router manages a network topology table and a number of resources tables corresponding to these areas of the network. Answering a user request, one of the entries of the topology table and one of the resources tables are referenced, a crossable area along the destination road and some links satisfying a SQ value specified by the user are selected. A computation is fulfilled on the selected links, this computation being conformed to Dijkstra's algorithm, to find a shortest path to the destination if the referenced entry indicates that the destination is in the local area of the router. If the entry does not indicate that, then the computation is carried on until a tree of shortest path is found for the routers bordering the crossable area or until the computation is finished if no tree is found for any of the routers and a route having an optimal SQ value is determined from the tree of shortest path.
The known methods of the prior art have in the best cases a complexity in O (a log v) where a is the number of arcs of the graph and v its number of vertices. It would therefore be advantageous to remedy the drawbacks of the prior art by providing a method of computation of the shortest path in a graph with a complexity O(l log v) where l is the average path length and v its number of vertices.
This invention relates to a method of computing shortest paths in a weighted graph having vertices and an adjacency matrix with memory resources and a processor including (a) selecting integer weights, (b) carrying out a series of incrementations, an incrementation including finding a set of vertices to which one may arrive from a given set of vertices; (c) carrying out a series of decrementations, a decrementation including finding a set of vertices from which one may go to arrive to a given set of vertices, (d) causing the incrementations and decrementations to be carried out in any order, (e) transforming vectors of increments/decrements in paths, the paths making up set E1 of the shortest paths in terms of number of arcs or using a given number of arcs, Na, (f) selecting the n-uple of paths C of lowest cost among a set of paths E1, (g) calculating Nb=Na+1, (h) computing iteratively, while Nb≦W(C) the following steps: i. check among paths of length Na+1 if in existence, having a weight lower than W(C) and selecting among them C′ of lowest cost (if such a path does not exist, then C′=C), and ii. C=C′ and Nb=Nb+1, and (i) determining paths of lowest weight based on C.
One will better under the invention by referring to the following description, made purely by way of explanation, of a realization mode of the invention, in reference to the indexed figures:
This invention in the most general sense relates to a method of calculus of the shortest paths in terms of cost or number of arcs in a weighted graph containing some vertices and an adjacency matrix by using calculus means including technical resources comprising at least a RAM memory and a processor.
The method comprises:
Preferably, the method further includes making successive refinements of the path called a “dumb path” of length Nb, this path being the path that uses Nb times the only arc of the graph G1, the graph G1 obtained from G0 by successive thickenings, is composed of a single arc and a single vertex.
Preferably, the method further includes making out successive refinements of the path of length Nb found in a thickening G1 of G0, this path being found according to the above description or by any efficient mean.
Favourably, the method further contains a step of pre-calculus comprising realizing successive thickenings of the graph G0 until obtaining a graph G1 including a single arc and a single vertex, a thickening of a graph G including equipping the graph G of a equivalence relation, consider that the equivalent classes are the vertices of the thickened graph G′; given two vertices v′1 and v′2 of the thickened graph G′, there exists an arc between v′1 and v′2 if and only if there exists a vertex v1 in the equivalent class v′1 and a vertex v2 in the equivalent class v′2 such that there exists an arc (v1, v2). The weight of the arc (v′1, v′2) is the minimum of the weights of the arcs (v1, v2) with v1 in v′1 and v2 in v′2.
In accordance with a preferred variant, the series of incrementations is made up until the arrival vertex is contained in the set obtained from the departure vertex, which supplies a path of length Nb. One intersects the obtained sets with the decrements of the arrival vertex.
In accordance with another embodiment, the method is applied to sorting and mailing of packets in a telecommunications network. In accordance with yet another embodiment, the method is applied to sorting and mailing of calls in a telecommunications network. In accordance with another variant, the method is applied to a navigation system.
In accordance with still another embodiment, the method is applied to a reservation system.
In accordance to another aspect, the method is applied to multiple logistics platforms arrangements.
Finally, in accordance to yet another aspect, the method is applied to an automated system of translation.
The invention also refers to a system, devoted to implement the above-mentioned method, containing at least a processor and memory resources. The method according to the invention can also be used to optimize a flow problem, for instance in fluid mechanics, or water or energy distribution.
First, a description of the graph is provided. Second, there is an explanation how to take advantage from this description and present the method of the invention in several modes of realization.
An unweighted graph is a couple (V, A) where V is a finite set, whose elements are called “vertices” and A a set of couples of elements of V. The elements of A are called “arcs”. The first element of an arc is called its “origin” and its second elements is called “extremity”.
If for all arc (o, e) of a graph G=(V, A), the couple (e, o) is also an arc of G, then one may consider that G is undirected and A may be considered as a set of pairs of vertices.
A path between two vertices d and a is a sequence u0, , uk of vertices such that u0=d, uk=a and for all integer i in [0, k−1], (ui, ui+1) is an arc of G. In this case, k is the length of the path.
The problem is to find the shortest path between two vertices of the graph, which means in this case the path or all the paths using as few arcs as possible.
A weighted graph is a couple (V, A) where V is a finite set, whose elements are called vertices and A a set of triples (v, v′, w) where v and v′ are the arcs and x is the weight (or length) of the arc.
A path between two vertices d and a is a sequence u0, , uk of vertices such that u0=d, uk=a and for all integer i in [0, k−1], (ui, ui+1, xi) is an arc of G. In this case,
is the weight, also called the “length” or the “cost,” of the path.
The problem is also to find the shortest path or the shortest paths between two vertices.
In the field of graphs, it is common to use adjacency matrices, that is to say, matrices representing the set of incoming arcs and outgoing arcs. In a particular mode, a coefficient of the matrix indicates whether there exists an arc between two vertices: it is equal to 1 if there exists an arc and 0 if not. In another mode, a coefficient of the matrix indicates the corresponding weight. For illustrative purposes, matrices contain 0 and 1 hereinafter. Also, hereinafter, the dumb refinement of x shall be denoted by dumb(x). The following description concerns an example of a graph.
In
The first thickening of this graph G0 is the graph G1 represented in
The outgoing and incoming arcs of G1 are:
This graph may in turn be thickened in the graph G2, represented in
The outgoing and incoming arcs of this graph are:
Finally, this graph thickens in the graph G3, as represented in
The outgoing and incoming arcs of this graph are:
An example seeks a path between the vertices 2 and 5 for instance, in the graph G0 and a path of length 1:
So there does not exist any path of length 1 between a and c in G1 and there does not exist any path of length 1 between 2 and 5.
Another example seeks a path of length 2 between the vertices 2 and 5:
In G1, 2 is in the class of a and 5 is in the class of c.
We conclude that there does not exist any path of length 2 between a and c in G1 and a fortiori between 2 and 5 in G0.
Yet another example seeks paths of length 3.
In G3, the trivial path is f→f→f→f.
In G2, the vertex 2 is in the class d and the vertex 5 in the class e.
In summary, the paths of length 3 in G2 are (1, 0)→(1, 1)→(1, 0)→(0, 1).
In G1, the vertex 2 is in the class a and the vertex 5 is in the class c.
In G0:
The computation of the shortest path being realized by computations means including memory resources and a processor. It becomes evident, for one skilled in the art reading the different steps constituting the preceding example, that the invention possesses an evident technical effect: the optimization of memory resources and of the use of the processor. This optimization involves consequent financial and time savings. It may also be involved in interesting room savings in embedded systems.
Some domains demand difficult computations to search the shortest paths in graphs like for instance the telecommunications or the traffic jam. The use of computers implementing the method according to the invention allows the optimization of the necessary resources to fulfill these computations.
The invention is described above by way of example. It is meant that one skilled in the art is in a position to utilize different variations of the invention without extending beyond the scope of the invention as defined in the appended claims.
Patent | Priority | Assignee | Title |
8861506, | Dec 27 2011 | Apple Inc | Shortest path determination for large graphs |
9500487, | Dec 27 2011 | Apple Inc. | Shortest path determination for large graphs |
Patent | Priority | Assignee | Title |
6356911, | Dec 11 1997 | International Business Machines Corporation | Shortest path search system |
6477515, | Aug 11 1999 | The United States of America as represented by the Secretary of the Navy | Efficient computation of least cost paths with hard constraints |
6665852, | Dec 01 2000 | Oracle America, Inc | Piecewise linear cost propagation for path searching |
20020107711, |
Executed on | Assignor | Assignee | Conveyance | Frame | Reel | Doc |
May 17 2004 | KOSKAS, MICHEL | KoDe | ASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS | 015384 | /0359 | |
May 19 2004 | KoDe | (assignment on the face of the patent) | / |
Date | Maintenance Fee Events |
Jan 11 2012 | M2551: Payment of Maintenance Fee, 4th Yr, Small Entity. |
Dec 09 2015 | M2552: Payment of Maintenance Fee, 8th Yr, Small Entity. |
Mar 16 2020 | REM: Maintenance Fee Reminder Mailed. |
Aug 31 2020 | EXP: Patent Expired for Failure to Pay Maintenance Fees. |
Date | Maintenance Schedule |
Jul 29 2011 | 4 years fee payment window open |
Jan 29 2012 | 6 months grace period start (w surcharge) |
Jul 29 2012 | patent expiry (for year 4) |
Jul 29 2014 | 2 years to revive unintentionally abandoned end. (for year 4) |
Jul 29 2015 | 8 years fee payment window open |
Jan 29 2016 | 6 months grace period start (w surcharge) |
Jul 29 2016 | patent expiry (for year 8) |
Jul 29 2018 | 2 years to revive unintentionally abandoned end. (for year 8) |
Jul 29 2019 | 12 years fee payment window open |
Jan 29 2020 | 6 months grace period start (w surcharge) |
Jul 29 2020 | patent expiry (for year 12) |
Jul 29 2022 | 2 years to revive unintentionally abandoned end. (for year 12) |