Project SSP

You might also like

You are on page 1of 3

Projet 442-4

Path related problems: Constrained shortest path


and the k shortest paths
Juan-Antonio Cordero
juan-antonio.cordero-fuertes@polytechnique.edu

The shortest path problem is a fundamental problem in computer science


and graph theory. It consists of finding a path connecting a given source-
destination pair in a network at minimum cost. The problem has many
applications where the aim is to send some resources between two specific
points as quickly, cheaply or reliably as possible.
Let G = (V, A, c) be a directed weighted connected graph modelling
the network, with V the set of vertices, A ⊆ V × V the set of arcs and
∀e ∈ A, c(e) ≥ 0 the cost associated to the arc e. Let s and t be two specific
vertices of V that represent the source and destination nodes respectively,
n = |V | and m = |A|. A path P from s to t is a sequence “s, v1 , v2 , . . . , vk , t
” of vertices (or arcs “e0 , e1 , . . . , ek ”, with e0 = (s, v1 ), . . . , ek = (vk , t) ∈ A)
starting inPs and ending in t. A shortest path P ∗ is a path whose cost
c(P ∗ ) = c(e) is minimum. For more notions and definitions you can
e∈P ∗
refer to [4].

1 Shortest path
The shortest path problem has been well studied and efficient sequential
and parallel algorithms have been proposed to solve it. Different sequential
algorithms have been proposed such as, for instance, Bellman-Ford algorithm
[1] and Dijkstra’s algorithm [3]. Also, various parallel algorithms exist in the
literature, as an example see the parallelization of Dijkstra’s algorithm [2].

Question 1: Implement sequential and parallel algorithms to find the


shortest path in a given directed weighted connected graph.

2 Shortest path related problems


To cope with various hazards of everyday life due for instance to works
or accidents on roads, it is crucial to have more than one path between two

1
nodes in a given network. Also, in the event of additional constraints other
than the cost one, other paths different from the shortest path can be com-
puted. We consider here two problems related to shortest path problem.
The first, the constrained shortest path problem, is to find a shortest path
fulfilling a set of constraints. It has many applications such as routing plan-
ning in traffic network and quality of service in communication network. The
second problem, the k shortest paths problem, consists of determining the
first k shortest paths where each path differs from another by at least one
arc. Determining the k best solutions may be useful if some constraints are
difficult to specify formally. In this case, one can enumerate the first best
solutions by omitting the difficult constraints and then choose from among
these solutions the one that satisfies the additional constraints. Also, know-
ing the k best solutions may be helpful in a sensitive analysis of the optimal
solution.

2.1 Constrained shortest path problem


Let d(e) ≥ 0, ∀e ∈ A, be a second weight associated to the arc e repre-
senting the delay on the arc e, and T be the delay threshold. The constrained
shortest path problem consists of finding the a shortest path P ∗ from s to t
that satisfies the constraint d(P ∗ ) =
P
d(e) ≤ T .
e∈P ∗

Question 2: Describe and implement sequential and parallel algorithms


to find the constrained shortest path.

2.2 The k shortest paths problem


Given an integer k > 0, the k shortest paths problem consists of enumer-
ating the first k shortest paths in the graph.

Question 3: Describe and implement sequential and parallel algorithms


to find the constrained shortest path.

3 Tests on data
All the algorithms implemented in the previous sections must be tested
on the first four instances of Resource constrained shortest path of the OR-
Library given by the data files named rcsp1, rcsp2, rcsp3 and rcsp4. The
link to download these data is :
http://people.brunel.ac.uk/~mastjjb/jeb/orlib/rcspinfo.html

2
References
[1] R. Bellman. On a routing problem. Quarterly of Applied Mathematics,
16(1):87–90, 1958.

[2] A. Crauser, K. Mehlhorn, U. Meyer and P. Sanders. A paralleliza-


tion of Dijkstra’s shortest path algorithm. Mathematical Foundations of
Computer Science 1998: 23rd International Symposium, MFCS’98 Brno,
Czech Republic, August 24–28, 1998 Proceedings, 722–731, 1998.

[3] E. W. Dijkstra. A note on two problems in connexion with graphs.


Numerisch Mathematik, 1(1):269–271, 1959.

[4] J. L Gross and J. Yellen. Handbook of Graph Theory. Discrete Mathe-


matics and Its Applications, volume 25. CRC Press.

You might also like