Your SlideShare is downloading. ×
International Journal of Computer and Technology (IJCET), ISSN 0976 – 6367(Print),International Journal of Computer Engine...
International Journal of Computer Engineering and Technology (IJCET), ISSN 0976 – 6367(Print),ISSN 0976 – 6375(Online) Vol...
International Journal of Computer Engineering and Technology (IJCET), ISSN 0976 – 6367(Print),ISSN 0976 – 6375(Online) Vol...
International Journal of Computer Engineering and Technology (IJCET), ISSN 0976 – 6367(Print),ISSN 0976 – 6375(Online) Vol...
International Journal of Computer Engineering and Technology (IJCET), ISSN 0976 – 6367(Print),ISSN 0976 – 6375(Online) Vol...
International Journal of Computer Engineering and Technology (IJCET), ISSN 0976 – 6367(Print),ISSN 0976 – 6375(Online) Vol...
International Journal of Computer Engineering and Technology (IJCET), ISSN 0976 – 6367(Print),ISSN 0976 – 6375(Online) Vol...
International Journal of Computer Engineering and Technology (IJCET), ISSN 0976 – 6367(Print),ISSN 0976 – 6375(Online) Vol...
International Journal of Computer Engineering and Technology (IJCET), ISSN 0976 – 6367(Print),ISSN 0976 – 6375(Online) Vol...
International Journal of Computer Engineering and Technology (IJCET), ISSN 0976 – 6367(Print),ISSN 0976 – 6375(Online) Vol...
Upcoming SlideShare
Loading in...5
×

A comparative study on multicast routing using dijkstra’s

423

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
423
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
2
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "A comparative study on multicast routing using dijkstra’s"

  1. 1. International Journal of Computer and Technology (IJCET), ISSN 0976 – 6367(Print),International Journal of Computer Engineering EngineeringISSN 0976 – 6375(Online) Volume 1, Number 2, Sep - Oct (2010), © IAEMEand Technology (IJCET), ISSN 0976 – 6367(Print)ISSN 0976 – 6375(Online) Volume 1 IJCETNumber 2, Sep - Oct (2010), pp. 16-25 ©IAEME© IAEME, http://www.iaeme.com/ijcet.html A COMPARATIVE STUDY ON MULTICAST ROUTING USING DIJKSTRA’S, PRIMS AND ANT COLONY SYSTEMS Sudip Kumar Sahana Dept. Of Computer Science& Engg Birla Institute of Technology Mesra, Ranchi, E-Mail: sudipsahana@gmail.com Dr.(Mrs). Aruna Jain Dept. of Information Technology Birla Institute of Technology Mesra, Ranchi, E-Mail: jaruna16@rediffmail.com Abijit Mustafi Dept. Of Computer Science& Engg Birla Institute of Technology Mesra, Ranchi, E-Mail: abhijit@bitmesra.ac.inABSTRACTDijkstra’s and Prim’s algorithms are well established methods for implementing multicastrouting. We have emphasized a different approach ’Ant Colony System (ACS)’ formulticast routing. This paper introduces a comparative study of implementing simple AntColony System, Dijkstra’s Algorithm and Prim’s Algorithm in a multicast routingcommunication scenario. For the sake of simplicity we have only considered the distanceas the key parameter to choose the best path. We have analyzed directed as well asundirected graphs. ACS, an optimization approach is considered here as undirectedsystem for generalization. The complexity study shows that ACS has faster convergenceto reach the optimal solution.Keywords: Dijkstra’s Algorithms, Prim’s Algorithm, Ant Colony System, Pheromone,Convergence. 16
  2. 2. International Journal of Computer Engineering and Technology (IJCET), ISSN 0976 – 6367(Print),ISSN 0976 – 6375(Online) Volume 1, Number 2, Sep - Oct (2010), © IAEME1. INTRODUCTION1.1DIJKSTRA’S ALGORITHM Let the starting node is called as initial node and the distance of node Y be thedistance from the initial node to Y. Dijkstras algorithm[1] will assign some initialdistance values and will try to improve them step by step.It is an algorithm to find shortest path[2] of routing in a network.Distance Matrix D = dij =0 ,if i=j.dij=∞ ,if there is no path between i and j.dij = distance of the path from i to j. 1. Assign to every node a distance value. Set it to zero for our initial node and to infinity for all other nodes. 2. Mark all nodes as unvisited. Set initial node as current. 3. For current node, consider all its unvisited neighbors and calculate their tentative distance dij (from the initial node). For example, if current node (A) has distance of 6, and an edge connecting it with another node (B) is 2, the distance to B through A will be 6+2=8. If this distance is less than the previously recorded distance (infinity in the beginning, zero for the initial node), overwrite the distance. 4. When we are done considering all neighbors of the current node, mark it as visited. A visited node will not be checked ever again; its distance recorded now is final and minimal. 5. If all nodes have been visited, finish.Otherwise, set the unvisited node with the smallest distance (from the initial node) as thenext "current node" and continue from step 3.1.2 PRIM’S ALGORITHM It determines a minimum spanning tree [2] for a connected weighted undirectedgraph. Here, objective is to find a subset of the edges that forms a tree, which includesevery vertex, where the total weight of all the edges in the tree is minimized. 17
  3. 3. International Journal of Computer Engineering and Technology (IJCET), ISSN 0976 – 6367(Print),ISSN 0976 – 6375(Online) Volume 1, Number 2, Sep - Oct (2010), © IAEMEAlgorithm:Input: A connected weighted graph with vertices V and edges E.Initialize: (i) Vnew = { X } , where X is an arbitary node from V,Enew = { } Repeat until Vnew = V; (ii)Choose edge (u,v) with minimal weight such that u is in Vnew and V is not in Vnew. (iii) Add v to Vnew, add (u,v) to Enew.Output: Vnew and Enew describe a minimal spanning tree1.3 ANT COLONY SYSTEM (ACS) Ant colony algorithm [3] determines optimal solution through simulating theprocess of ants searching for food. The ants collective behavior reflects an informationpositive feedback phenomenon. This optimization technique does not rely onmathematical description of the specific issues, but has strong global optimizationfeature [4], high performance [5] and flexibility. Three main aspects to determine ACSare: 1) State Transition Rule: Ants prefer to move from one place to another (i.e one node to other node) which are connected by short edges with a high amount of pheromone[3]. It can be done by using following rule: PI k (r,s) = (r,s).[η(r,s)]β , if s єJk (r) ∑ (r,u)[η(r,u)] β uεJk (r) 0 otherwise 2) Local pheromone updating rule: While building a solution, ants visit edges and change their pheromone level by applying this rule: (r,s) (1-ρ). (r,s)+ρ. (r,s). Where 0<ρ<1 is a pheromone evaporation [3] parameter, and (r,s)= 0 where is pheromone. We here assume a well accepted value of ρ =0.5. 3) Global pheromone updating rule: Once all ants have built their tours, pheromone is updated on all edges by using the following rule: 18
  4. 4. International Journal of Computer Engineering and Technology (IJCET), ISSN 0976 – 6367(Print),ISSN 0976 – 6375(Online) Volume 1, Number 2, Sep - Oct (2010), © IAEME (r,s) (1-α)* (r,s)+α* (r,s). where 0<α<1 is pheromone decay [4][6]parameter and we assume α=0.2 to get a better effect of probability on the globally shortest path. Where (r,s)= 1/Lgb if (r,s) є global best tour 0 otherwise and Lgb is length of globally best tour.2. IMPLEMENTATION Part I: Description of the example network. Part II: Results of Dijkstra’s Algorithm considered for directed graph of example network for an instance. Part III: Results of Prims Algorithm considered for undirected graph of example network for an instance. Part IV: Results of ACS Algorithm considered for undirected graph of example network for an instance. Part V: Overall Results Analysis and Complexity Analysis. 2.1 PART I: Description of the network: In multicast network [7] one source can transmit packets to more than one destination at a time. In practical communication scenario, there may be different constraints [5] like bandwidth, delay, hop count, packet loss, etc. We are considering only distance as a main constrain for the sake of simplicity. We have experimented on a set of networks having different vertices ranging from 5 to 25 and edges from 5 to 10. We have implemented the program on C language and Windows environment in a stand-alone machine. For a better understanding we are taking an instance of the example network where five nodes (vertices) and ten paths(edges) are considered as shown below in figure1. Here ‘r’, ’v’ and‘ s’ are the source node respectively. And ‘u’ and ‘t’ are the destination nodes. 19
  5. 5. International Journal of Computer Engineering and Technology (IJCET), ISSN 0976 – 6367(Print),ISSN 0976 – 6375(Online) Volume 1, Number 2, Sep - Oct (2010), © IAEME Figure 1 2.2 PART II: Using Dijkstra’s approach for the said network the final solution can be tabulated as follows where Best(t) represents the best path distance from source node to the specified node and Tree(i) represents the intermediate nodes to reach the destination. Taking ‘r’ as the source node, distance vector for rest of the nodes are as follows: ‘r’(source node) s t u v Best(i) 2 6 6 2 Tree(i) r v v r Taking ‘v’ as the source node, distance vector for rest of the nodes are as follows: ‘v’(source node) r s t u Best(i) 11 4 5 4 Tree(i) t v v v Taking ‘s’ s the source node, distance vector for rest of the nodes are as follows: ‘s’(source node) t u v r Best(i) 4 5 9 10 Tree(i) s s t t2.3 PART III: Figure 2 20
  6. 6. International Journal of Computer Engineering and Technology (IJCET), ISSN 0976 – 6367(Print),ISSN 0976 – 6375(Online) Volume 1, Number 2, Sep - Oct (2010), © IAEME For the above network in figure 2 (considered as undirected system) using Primsapproach, the final solution can be tabulated as follows where Best d(i) represents thebest path distance from source node to the specified node.Taking ‘r’ as the source node r v s u t Best d(i) 2 2 6 6Taking ‘v’as the source node v s u t r Best d(i) 4 4 5 2Taking ‘s’ as the source node s t u v r Best d(i) 4 5 4 22.4 PART IV:The cost and pheromone intensity of the paths are:Cost of (r,v)=(r,u) = 2 , Pheromone intensity = 4.Cost of (r,u)=(r,t) = 6 , Pheromone intensity = 1.4.Cost of (v,u)=(v,s)=(u,t)=(s,t) =4 , Pheromone intensity= 2.Cost: (v,t)=(s,u) = 5 , Pheromone intensity= 1.6. Taking ‘r’ as source node, final optimal solution is obtained after 3 iterationwhich is the average case of complexity. The final shortest path is path (rvu) with pathlength 6. Taking ‘v’ as the source node, final solution is obtained after 4 iterations which isthe worst case of complexity. The final shortest path is path (vu) with path length 4. Taking ‘s’ as the source node, final solution is obtained after 3 iterations which isthe average case of complexity. The final shortest path is path (su) with path length 5.Similarly for t as destination node the same can be obtained.2.5 PART V:2.5.1 OVERALL RESULTS ANALYSIS: The Table1 shown below depicts the summary of the run time results inmilliseconds for varying number of vertices and varying number of edges but a constant 21
  7. 7. International Journal of Computer Engineering and Technology (IJCET), ISSN 0976 – 6367(Print),ISSN 0976 – 6375(Online) Volume 1, Number 2, Sep - Oct (2010), © IAEMEnumber of destination nodes( two) for multicast routing. In case of varying number ofdestination nodes, the algorithms exhibit same hierarchy of performance. Table1 Edge=5 Edge=6 Edge=7 Edge=8 Edge=9 Edge=10 Prims Dijktras ACS Prims Dijktras ACS PrimsDijktras ACSPrims Dijktras ACS PrimsDijktras ACS Prims Dijktras ACSVertex=5 25 60 11.6096 25 62 13.9316 25 64 16.2535 25 66 18.5754 25 68 20.8974 25 70 23.2193Vertex=10 100 210 16.6096 100 212 19.9316 100 214 23.2535 100 216 26.5754 100 218 29.8974 100 220 33.2193Vertex=15 225 460 19.5345 225 462 23.4413 225 464 27.3482 225 466 31.2551 225 468 35.162 225 470 39.0689Vertex=20 400 810 21.6096 400 812 25.9316 400 814 30.2535 400 816 34.5754 400 818 38.8974 400 820 43.2193Vertex=25 625 1260 23.2193 625 1262 27.8631 625 1264 32.507 625 1266 37.1508 625 1268 41.7947 625 1270 46.4386 The Table2 shown below depicts the summary of the run time results inmilliseconds for varying number of vertices and varying number of edges but a constantnumber of destination nodes( two) for multicast routing for advance performance analysisof the said algorithms implemented using heap data structure. In case of varying numberof destination nodes, the algorithms exhibit same hierarchy of performance. Table 2 Edge=5 Edge=6 Edge=7 Edge=8 Edge=9 Edge=10 Ext-Prims Ext-Dijktras ACSExt-Prims Ext-Dijktras ACSExt-Prims Ext-Dijktras ACSExt-Prims Ext-Dijktras ACSExt-PrimsExt-Dijktras ACSExt-PrimsExt-Dijktras ACSVertex=5 16.6096 23.2193 11.6096 17.6096 27.8631 13.9316 18.6096 32.507 16.2535 19.6096 37.1508 18.5754 20.6096 41.7947 20.8974 21.6096 46.4386 23.2193Vertex=10 38.2193 33.2193 16.6096 39.2193 39.8631 19.9316 40.2193 46.507 23.2535 41.2193 53.1508 26.5754 42.2193 59.7947 29.8974 43.2193 66.4386 33.2193Vertex=15 63.6034 39.0689 19.5345 64.6034 46.8827 23.4413 65.6034 54.6965 27.3482 66.6034 62.5102 31.2551 67.6034 70.324 35.162 68.6034 78.1378 39.0689Vertex=20 91.4386 43.2193 21.6096 92.4386 51.8631 25.9316 93.4386 60.507 30.2535 94.4386 69.1508 34.5754 95.4386 77.7947 38.8974 96.4386 86.4386 43.2193Vertex=25 121.0964 46.4386 23.2193 122.0964 55.7263 27.8631 123.0964 65.014 32.507 124.0964 74.3017 37.1508 125.0964 83.5894 41.7947 126.0964 92.8771 46.4386 22
  8. 8. International Journal of Computer Engineering and Technology (IJCET), ISSN 0976 – 6367(Print),ISSN 0976 – 6375(Online) Volume 1, Number 2, Sep - Oct (2010), © IAEMEA visual representation of dataset of Table1 and Table 2 are as shown below:2.5.2 COMPLEXITY ANALYSIS: Our first simple implementation of the Dijkstras algorithm stores vertices ofset Q in an ordinary array, and extract minimum from Q is simply a linear search throughall vertices in Q. In this case, the running time is O( | V | 2 + | E | ) = O( | V | 2). We havefurther implemented it using heap data structure and the complexity reduced toO(|E|log|V|). A simple implementation using an adjacency matrix graph representation andsearching an array of weights to find the minimum weight edge to add requires O (V2)running time. The time required by Prims algorithm is O(|V|2). Using a binary heap datastructure and an adjacency list representation, Prims algorithm requires run in time O ((V 23
  9. 9. International Journal of Computer Engineering and Technology (IJCET), ISSN 0976 – 6367(Print),ISSN 0976 – 6375(Online) Volume 1, Number 2, Sep - Oct (2010), © IAEME+ E) log(V)) where E is the number of edges and V is the number of vertices. Using amore sophisticated Fibonacci heap, this can be brought down to O (E + V log V). Whereas an easy ACS implementation produces O (E log V) complexity.According to various parameters the comparative study of these algorithms are tabulatedas follow: Parameters Prim’s Dijkstra’s ACS Complexity (a)Using Array: O(V2) (a)Using Array: (a) Using Array/ (b)Using Heap: O(m*(V2+E)) Adjacency List: O(V+E) log V (b)Using Heap: O(E log V) (c)Using Fibonacci O(m* |E|log|V|). Heap: O(E +V logV) Where m=no of destination nodes Nature of the Undirected Directed Undirected graph used Convergence Medium Medium Faster speed Alternate Path No No Yes Flexibility Do not allow Do not allow Allow constraints Dynamic No No Yes Approach Incur any Extra No No No cost3. CONCLUSION: Though Dijkstra’s and Prim’s approaches are reliable and are in use, ant colonysystem can compete for the multicast implementation as we have already discussed thedifferent advantages of ACS over other two. Complexity is relatively better in the case ofACS. The main advantages of ACS are it’s flexibility, dynamicity and the capability tofind alternate paths. If there is congestion in the shortest path, ACS can dynamically routethe packets on the alternative path. Ant colony system can be applied to different routingproblems like vehicle routing problems [8][9],MANET[10], Network Flow,etc.REFERENCES: [1].M.Barbehenn, A Note on the Complexity of Dijkstra’s Algorithm for Graphs with Weighted Vertices, IEEE Transactions on Computers, Vol. 47, No.2,1998. [2] S.Pettie and V. Ramachandran, Minimizing Randomness in Minimum Spanning Tree, Parallel Connectivity, and Set Maxima Algorithms, UTCS Technical Report TR-01- 25,2001. 24
  10. 10. International Journal of Computer Engineering and Technology (IJCET), ISSN 0976 – 6367(Print),ISSN 0976 – 6375(Online) Volume 1, Number 2, Sep - Oct (2010), © IAEME [3].Ant Colony Optimization, Marco Dorigo, Mauro Biratarri, and Thomas Stutzle, 2006. [4]. M. Dorigo and L.M. Gambardella, Ant colony system: a cooperative learning approach to the traveling salesman problem, IEEE Transaction on Evolutionary Computation 1(1997), 53--66. [5]. A Modified Ant Colony Algorithm for Multi-Constraint Multicast Routing, Hua Wang, ZhaoShi, Jun May, 2006. [6]. L. Bianchi, L.M. Gambardella, M.Dorigo. An ant colony optimization approach to the probabilistic traveling salesman problem. In Proceedings of PPSN-VII, Seventh International Conference on Parallel Problem Solving from Nature, Lecture Notes in Computer Science. Springer Verlag, Berlin, Germany, 2002. [7]. C. Chao-Hsien, G. JunHua, H. Xiang Dan, G. Qijun, A heuristic ant algorithm for solving QoS multicast routing problem, in Proceedings of the 2002 congress on Evolutionary Computation, Honolulu, USA. [8]. N. Kohl, J. Desrosiers, O. B. G. Madsen, M. M. Solomon, F. Soumis, K-Path Cuts for the Vehicle Routing Problem with Time Windows, Technical Report IMM-REP-1997. [9]. L.M. Gambardella, E. Taillard, and G. Agazzi, Ant colonies for vehicle routing problems, vol. New Ideas in Optimization, McGraw-Hill, London, 1999. [10]. X. Wu and D. K. Y. Yau. Mitigating Denial-of-Service Attacks in MANET by Distributed Packet Filtering: A Game-theoretic Approach. ASIACCS, March 2007. 25

×