Professional Documents
Culture Documents
Journal of Optoelectronics Laser
Journal of Optoelectronics Laser
Comparative Study of Standard Dijkstra’s Algorithm with Dijkstra’s Algorithm Modified for
Disjoint Path Construction to Find Shortest Route in Wavelength Routed Networks
1 2 3 4
Rupendeep Kaur* , Sukhdeep Kaur , Harmandar Kaur & Rahul Sharma
1&2
Department of Electronics Technology, Guru Nanak Dev University, Amritsar 143005, India
3
Department of Engineering and Technology, GNDU Regional Campus, Jalandhar 143005, India
4
Department of Electronics and Communication Engineering, Lovely Professional University, Punjab, India
ABSTRACT
Wavelength routed optical networks has been a subject of extensive investigation achieving high capacities in data
transport applications. In this paper, we investigated the problem of routing connections in order to find shortest path
in special types of network conditions. Information conveyed here is in the form of wavelength continuous route called
lightpath and the main concern here is to minimize the blocked connections, time and cost factors. A standard
Dijkstra’s algorithm with low computational complexity can serve this purpose but its application is limited to non-
negative graphs only. On graphs having negative edge weights this algorithm fails. So there was a need for simple
and efficient algorithm to work on these types of graphs. By making slight changes in Dijkstra’s algorithm, a new
algorithm named MDSP algorithm for disjoint path construction problem is proposed and implemented using MATLAB
in this paper. Then both Dijkstra’s algorithm and MDSP algorithm were compared to prove later’s better efficiency in
selecting shortest route in graphs with negative edge weights or graphs with disjoint paths.
Keywords: Wavelength routed networks, Wavelength division multiplexing, Dijkstra’s Algorithm, lightpath, Disjoint
paths, Routing & Wavelength Assignment(RWA)..
I. INTRODUCTION
Wavelength-Division Multiplexing (WDM) in optical fiber networks has been rapidly gaining acceptance as a means to
handle the ever-increasing bandwidth demands of network users. In a wavelength-routed WDM network, end users
communicate with one another via all-optical WDM channels, which are referred to as light-paths. For the routing sub-
problem, there are three basic approaches that can be found in the literature: fixed routing(FR), fixed-alternate
routing(FAR), and exhaust routing(ER) Methods. Exhaust routing algorithm is expected to yield better performance
than the FR and FAR algorithms. Exhaust routing does not predetermine the candidate routes for any node pair.
Instead, it keeps the network state information in the form of a graph. This state information is dynamic, and will keep
changing depending upon the dynamically changing traffic. When a new connection request arrives for a node pair p,
it chooses the best route (based on some cost criterion) among all the possible routes. Thus, by exploring all the
possible routes, it attempts to increase the acceptance rate of connections. Similarly, the fixed routing method is
simpler than the alternate routing method, but it yields poorer performance than the other. For any wavelength routed
network to work properly it is mandatory to use efficient Routing and Wavelength assignment Algorithm.
Disjoint paths
Disjoint paths are obtained from an iterative procedure in a graph modified according to a certain set of rules. Finding
the shortest path or the several shortest paths is a classical problem in graph theory. In modem communication
networks, which can be represented as directed graphs, it is often desirable to find paths that are not only short, but
also disjoint. Two or more paths between a source node and a terminal node are disjoint if none of the paths share
any nodes (vertices), and hence any links (edges), other than the source and terminal nodes.
In case of disjoint path construction, conventional Dijkstra’s algorithm is slightly modified and this modification forms
modified Dijkstra’s algorithm. For RWA graph transformation approach is used. First an auxiliary graph is constructed
from the given source-destination node pairs. Next, the shortest path (SP) between the source-destination node pairs
is determined by Dijkstra’s algorithm [6][9]. Low complexity distributed algorithms having both node-disjoint and link-
disjoint versions with nodes incorporating information necessary to send packets on disjoint paths in distributed
manner are developed offering multiple disjoint paths with minimal lengths between source and its expected
destinations [11].
Previous work
A new algorithm proposed whose blocking performance is better in many cases than other previously proposed
algorithms and it is high for multi-fiber ring networks with a moderate number of fibers per link [1]. Circuit switched
RWA taking into account all available paths between source and destination was developed computing blocking
381
JOURNAL OF OPTOELECTRONICS LASER ISSN: 1005-0086
382
JOURNAL OF OPTOELECTRONICS LASER ISSN: 1005-0086
Since the graph is a mixture of arcs and edges, so there is a need to redefine INF. INF, is a large, but finite number
used to initialize the distance of each one of the vertices (except source vertex A) from vertex A. The arcs are
negative in length. For such graphs containing arcs, INF may at the minimum be set equal to a value greater than the
sum of the length of the edges; alternatively, INF may be set equal to the number greater than the product of l max and
the number of edges in the given graph, where lmax is the largest length among the edges of the graph. Here focus is
on the first definition, and ignoring the negative sign of the arcs, redefine INF to be equal to a number greater than the
sum of the length of the edges and the arcs (after reversal of their signs).Using this definition, INF > 38 for the graph
of figure. Application of Dijkstra’s algorithm yields:
Step 1.d(A) = 0, d(B) = 5, d(D) = 7, d(C) = d(E) = d(Z) = INF(>38).
M = {B, C, D, E, Z}
P(B) = P(C) = P(D) = P(E) = P(Z) = A
Step 2.a) j = B, d(B) = 5.
b) M = {C, D, E, Z}
Step 3. NB = {A, C, Z}.
NB ∩ S = {C, Z}.
d(C) = 6, d(Z) = 13.
P(C) = B, P(Z) = B.
Step 2.a) j = C, d(C) = 6.
b) M = {D, E, Z}.
Step 3. NC = {A,B}.
NC ∩ M = ø.
Step 2.a) j = D, d(D) = 7.
b) M = {E, Z}.
Step 3. ND = {A, E, Z}.
ND ∩ M = {E, Z}.
d(E) = 9.
P(E) = D.
Step 2.a) j = E, d(E) = 9.
b) M = {Z}
Step 3 NE = {C, D}.
NE ∩ S = ø.
Step 2.a) j = Z, d(Z) = 13.
b) M = ø.
END.
According to the Dijkstra’s algorithm, the shortest path from A to Z is ABZ of length equal to 13. However, a close
examination reveals that path ADECBZ of length = 12 is the shortest path from A to Z. Thus, the Dijkstra’s algorithm
fails on account of negative arcs in the given graph.
It is important to mention here that the graph of figure belongs to a special class of graphs. The negative arcs in figure
constitute a single group of contiguous arcs forming path ZECA. If these arcs are reversed in direction and sign, then
383
JOURNAL OF OPTOELECTRONICS LASER ISSN: 1005-0086
B. The problem of finding disjoint paths in a network has been given much attention in the literature due to its
theoretical as well as practical significance to many applications, such as layout design of integrated circuits,
survivable design of telecommunication networks and restorable/reliable routing. MDSP algorithm is a slight variant of
the Dijkstra’s algorithm.
The modification made permits the correct determination of the shortest path in graphs of the type Figure 1
encountered during the construction of disjoint paths. For the standard non-negative graph, it reduces to the standard
Dijkstra’s algorithm.
Let d(i) denote the distance of vertex i from source vertex A. Let P(i) denotes its predecessor. The steps of the
algorithm are:
Step I. Begin with d(A)=0
Define adj_matrix[j][k]
d(j)= l(Aj), where j ϵ NA
= INF
Where INF > sum of lengths of edges & arcs (after their sign reversal)
NA = Set of neighbour vertices of j vertex, l(jk)=arc length from vertices j to k
Set M = V – [A] such that V represents set of vertices in the graph
Set P(j) = A.V where j ϵ M
Step II a. Search k ϵ M such that d(k) = min d(j)
b. Assign M = M-{K}
c. If k = Z where Z is destination vertex then STOP
otherwise , Go to Step III
Step III. Vj ϵ Nk, If d(k) + d(kj) < d(j) then set
a. d(j) = d(k) + l(kj), P(j) = k
b. M = M Ս {j}
Go to step II.
The algorithm above is different from the Dijkstra’s algorithm (in step 3 above) in that it scans all the neighbours of the
vertex selected (or permanently labelled) in step 2a. This extended scanning is necessary, since a previously
“permanently” labelled vertex in step 2a can be relabelled, i.e., receive a lower label upon further scanning.
Furthermore ,the algorithm ,via step 3b,ensures the re-entry into set S of any previously “permanently” labelled vertex
that was re-labelled in step 3a.These modifications to the Dijkstra’s algorithm, although redundant for non-negative
graphs, are important for the type of graphs with negative arcs encountered in the disjoint path construction problem.
For non-negative graphs, the MDSP algorithm in effect reduces to the Dijkstra’s algorithm.
Application of the MDSP algorithm to network of Figure 1 yields to :
384
JOURNAL OF OPTOELECTRONICS LASER ISSN: 1005-0086
Tracing back from the predecessor of vertex Z, it is found the shortest path from A to Z to be ADECBZ (of length equal
to 12), which the standard Dijkstra’s failed to yield.
Note that vertices B and C are each re-labelled twice in step 3a of the algorithm; the set S dwindles to {Z} before
growing back via the inclusion of these re-labelled vertices in step 3b. Consequently, these vertices are reselected in
step 2a of the algorithm, and the search terminates when the selected vertex is the destination vertex Z. This is in
sharp contrast to the standard algorithm where the set M dwindles each time a vertex is permanently labelled, and
never replenished as in MDSP algorithm.
385
JOURNAL OF OPTOELECTRONICS LASER ISSN: 1005-0086
Description
- Read integer type variables i.e. source vertex, adjacency matrix, number of vertices, i, j, closes
tunmarkednode.
- Define INFINITY=999.Initialize mark[i]=0 as initially node i is not marked. Also
initializepredecessor[i]=1,distance[i]=INFINITY, count=0.
- Under function getclosestunmarkednode(), apply for loop condition on i and get closest unmarked node i.e. i.
Also define set s[j] which includes collection of all the vertices.
- If count is less than number of vertices then mark closest unmarked node as 1.Again if i is not marked and
distance from closest unmarked node to i is greater than 0 and if distance from source to node i is greater
than the sum of distances from source to closest unmarked node and closest unmarked node to i then assign
distance[i] this value.
- Then put this closest unmarked node into predecessors of i and add this permanently labelled vertex i into the
set s[j] and repeat this until all the shortest distances are obtained by incrementing count.
- Now if i equal to source then simply print “source” else print the final distance.
Results
Enter the number of vertices present in this uni-directed graph (count should be greater than 0)
6
Enter adj_matrix for the graph
To enter INF enter 999
0 5 999 7 999 999
5 0 1 999 999 8
-1 1 0 999 999 999
7 999 999 0 2 6
999 999 -6 2 0 999
999 999 999 6 -2 0
5 0 1 999 999 8
7 999 999 0 2 6
386
JOURNAL OF OPTOELECTRONICS LASER ISSN: 1005-0086
IV. CONCLUSION
Dijkstra’s algorithm implemented in MATLAB is used to find the least-cost route on graph G(V,E) so the best one can
be chosen. It is observed that on graphs, having negative edge weights or arcs, Dijkstra’s algorithm do not work. This
usually happens in case of disjoint path construction. With a special graph transformation these graphs with negative
edge-weights can be converted into graphs with positive edge-weights and then conventional Dijkstra’s algorithm can
be applied to find shortest paths. But this transformation is cumbersome. MDSP algorithm is different from Dijkstra’s
nd
algorithm as in case of MDSP algorithm all neighbours of vertex which is selected in 2 step are scanned. This
extended scanning is necessary, since a previously “permanently” labelled vertex in step 2 can be relabelled, i.e.
receive a lower label upon further scanning in negative graphs. But in case of Dijkstra’s algorithm only those vertices
belonging to set S are scanned. It is shown with the help of flowchart that a slight modification is required to be done
in conventional Dijkstra’s algorithm in order to have accurate determination of shortest path in graphs of this type
without any graph transformation which make the construction of disjoint paths simpler and straightforward.
REFERENCES
[1] S. Subramaniam and R. A. Barry, ”Wavelength Assignment in Fixed Routing WDM Networks, Proceedings.,
ICC ’97, Montreal, Canada, vol. 1, pp. 406-410, June 1997.
[2] A. Mokhtar and M. Azizoglu, ”Adaptive Wavelength Routing in All-Optical Networks", IEEE/ACM Transactions
on Networking, Vol. 6, pp. 197-206, April 1998.
[3] R. Ramaswami and A. Segall, “Distributed network control of optical networks”, IEEE/ACM Tranactionss on
Networking.vol. 5, pp. 936–943, 2000.
[4] H. Zang, J. P. Jue, and B. Mukherjee, “A review of routing and wavelength assignment approaches for
wavelength-routed optical WDM networks,” Optical Networking Magazine pp. 47–60, January 2000
[5] Cormen, Thomas H.; Leiserson, Charles E.; Rivest, Ronald L.; Stein, Clifford (2001). "Section 24.3: Dijkstra's
algorithm". Introduction to Algorithms (Second edition),MIT Press and McGraw-Hill. pp. 595–601.
[6] Yongbing Zhang, Koji Taira, Hideaki Takagi, and Sajal K. Das, “An Efficient Heuristic for Routing and
Wavelength Assignment in Optical WDM Networks” ICOIN 2002, LNCS 2343, pp 291-304, 2002.
[7] S.Ramamurthy and Mohan Guruswamy (2002),”WDM Optical networks:concepts,design and algorithms”,
Prentice Hall of India Private Limited, New Delhi.
[8] [8] Biswanath Mukherjee (2006),”Optical WDM Networks”, Department of Computer Science University of
California Davis, USA.
[9] Kuntal Roy, Mrinal K. Naskar, UtpalBiswas,”Adaptive Dynamic Wavelength Routing for WDM Optical
Networks”, IEEE Transactions on communications, 2006.
[10] M.H. Xu a, Y.Q. Liu a, Q.L. Huang a, Y.X. Zhang a, G.F. Luan b “An improved Dijkstra’s shortest path
algorithm for sparse networks”, Applied Mathematics and Computation, pp. 247–254,2007.
[11] Richard G. Ogier, ” Distributed Algorithms for Computing Shortest Pairs of Disjoint Paths”, IEEE transactions
on information theory, vol. 39,no. 2.March 1993.
[12] Paulo H. G. Bezerra, Afonso J. F. Cardoso, and Carlos R. L. Frances. ”Performance Evaluation of Algorithms
for Wavelength Assignment in Optical WDM Networks”, IJCSNS International Journal of Computer Science
and Network Security, Vol.10, No.1, January 2010.
[13] S. Sivakumar,Dr. C.Chandrasekar, “Modified Dijkstra’s Shortest Path Algorithm” , International Journal of
Innovative Research in Computer and Communication Engineering, Vol. 2, Issue 11, November 2014.
[14] Anjali Jain, U.Datta,Neelam.Joshi, “Implemented Modification in Dijkstra’s Algorithm to Find the Shortest Path
for ‘N’ Nodes with Constraint”, International Journal of Scientific Engineering and Applied Science
(IJSEAS)Vol.2,Issue2,February 2016.
387