DIJKSTRA’s Algorithm. Definition fwd search Find the shortest paths from a given SOURCE node to ALL other nodes, by developing the paths in order of increasing.

Slides:



Advertisements
Similar presentations
Ch. 12 Routing in Switched Networks
Advertisements

Ch. 12 Routing in Switched Networks Routing in Packet Switched Networks Routing Algorithm Requirements –Correctness –Simplicity –Robustness--the.
Weighted graphs Example Consider the following graph, where nodes represent cities, and edges show if there is a direct flight between each pair of cities.
1 Discrete Structures & Algorithms Graphs and Trees: III EECE 320.
Chen, Lu Mentor: Zhou, Jian Shanghai University, School of Management Chen213.shu.edu.cn.
IKI 10100: Data Structures & Algorithms Ruli Manurung (acknowledgments to Denny & Ade Azurat) 1 Fasilkom UI Ruli Manurung (Fasilkom UI)IKI10100: Lecture10.
William Stallings Data and Computer Communications 7 th Edition Chapter 12 Routing.
Data and Computer Communications Ninth Edition by William Stallings Chapter 12 – Routing in Switched Data Networks Data and Computer Communications, Ninth.
EE 4272Spring, 2003 Chapter 10 Packet Switching Packet Switching Principles  Switching Techniques  Packet Size  Comparison of Circuit Switching & Packet.
1 Dijkstra’s Shortest Path Algorithm Gordon College.
Network Optimization Problems: Models and Algorithms This handout: Minimum Spanning Tree Problem.
Graphs and Trees This handout: Trees Minimum Spanning Tree Problem.
Chapter 7 Network Flow Models.
1 Routing Algorithms. 2 Outline zBellaman-Ford Algorithm zDijkstra Algorithm.
Lecture 27 CSE 331 Nov 3, Combining groups Groups can unofficially combine in the lectures.
CS 206 Introduction to Computer Science II 03 / 30 / 2009 Instructor: Michael Eckmann.
Routing Algorithm March 3 rd, Routing Graph abstraction for routing algorithms: graph nodes are routers graph edges are physical links  link cost:
The Shortest Path Problem
Quickest Route B St Li C La time matrix (minutes) Liskeard Launceston Callington St Austell Bodmin 32 What is the quickest route from.
Time-Constrained Flooding A.Mehta and E. Wagner. Time-Constrained Flooding: Problem Definition ●Devise an algorithm that provides a subgraph containing.
Shortest Route, Minimal Spanning Tree and Maximal Flow Models
Chapter 4: Finding the Shortest Path Lesson 1: Dijkstra’s Algorithm
Using Dijkstra’s Algorithm to Find a Shortest Path from a to z 1.
Dijkstra’s Algorithm. 2 Shortest-path Suppose we want to find the shortest path from node X to node Y It turns out that, in order to do this, we need.
Shortest Path Algorithm This is called “Dijkstra’s Algorithm” …pronounced “Dirk-stra”
Chapter 9 – Graphs A graph G=(V,E) – vertices and edges
Networks and the Shortest Path Problem.  Physical Networks  Road Networks  Railway Networks  Airline traffic Networks  Electrical networks, e.g.,
COSC 2007 Data Structures II Chapter 14 Graphs III.
Which of these can be drawn without taking your pencil off the paper and without going over the same line twice? If we can find a path that goes over all.
TCP Traffic and Congestion Control in ATM Networks
COMP261 Lecture 6 Dijkstra’s Algorithm. Connectedness Is this graph connected or not? A Z FF C M N B Y BB S P DDGG AA R F G J L EE CC Q O V D T H W E.
Networking and internetworking devices. Repeater.
Graphs Upon completion you will be able to:
Decision Maths 1 Shortest path algorithm Dijkstra’s Algorithm A V Ali :
Dijkstra animation. Dijksta’s Algorithm (Shortest Path Between 2 Nodes) 2 Phases:initialization;iteration Initialization: 1. Included:(Boolean) 2. Distance:(Weight)
Graphs Definition: a graph is an abstract representation of a set of objects where some pairs of the objects are connected by links. The interconnected.
Network Problems A D O B T E C
Spanning Trees Dijkstra (Unit 10) SOL: DM.2 Classwork worksheet Homework (day 70) Worksheet Quiz next block.
SHORTEST ROUTE PROBLEM A Networking Model Report for DPA 702 QUANTITATIVE METHODS OF RESEARCH By: ALONA M. SALVA Cebu Technological University.
Routing algorithms. D(v): the cost from the source node to destination that has currently the least cost. p(v): previous node along current least.
Minimum Spanning Trees
Shortest Path from G to C Using Dijkstra’s Algorithm
Dijkstra’s shortest path Algorithm
Network Flow Problems – Shortest Path Problem
COMP 3270 Computer Networks
Network Layer – Routing 1
Party-by-Night Problem
Dijkstra’s Algorithm We are given a directed weighted graph
Minimum Spanning Trees
Link State Route Calculations
Shortest Path.
Shortest Path.
Shortest-Paths Trees Kun-Mao Chao (趙坤茂)
Dijkstra’s Shortest Path Algorithm Neil Tang 03/25/2008
Link State Route Calculations
Chapter 4: Finding the Shortest Path Lesson 1: Dijkstra’s Algorithm
Route Inspection Which of these can be drawn without taking your pencil off the paper and without going over the same line twice? If we introduce a vertex.
Advanced Computer Networks
Algorithms Lecture # 29 Dr. Sohail Aslam.
Shortest Path.
Single Source Shortest Paths Dijkstra’s Alg. (no negative lengths!)
Dijkstra’s Shortest Path Algorithm Neil Tang 3/2/2010
and 6.855J Dijkstra’s Algorithm
Minimum spanning trees
Implementation of Dijkstra’s Algorithm
Shortest Path Solutions
Dijkstra Algorithm examples
Prim’s algorithm for minimum spanning trees
CSCI 465 Data Communications and Networks Lecture 16
OSPF Protocol.
Presentation transcript:

DIJKSTRA’s Algorithm

Definition fwd search Find the shortest paths from a given SOURCE node to ALL other nodes, by developing the paths in order of increasing path length. The alg. Proceeds in stages. N = set of nodes in the network; S = sourse node; M set of nodes so far incorporated by the alg l(i,j)= link cost from node i to j;l(i,i)=0; l(i,j)=  if the two nodes are not directly connected; l(i,j)>0 if they are directly connected; C1(n) = least-cost paths from S to n

FWD. Search Algorithm 1.Set M={S}; for each node n  N-S, set C1(n)=l(S,n); 2. Find W  N-M so that C1(w) in minimum, add W to M. Set C1(n)= MIN  C1(n) and C1(w)+l(w,n) 3. Repeat 2. until M=N

Definition bwd search Find the shortest paths from a given DESTINATION node from ALL other nodes. N = set of nodes in the network; D = destination node; M set of nodes so far incorporated by the alg l(i,j)= link cost from node i to j;l(i,i)=0; l(i,j)=  if the two nodes are not directly connected; l(i,j)>0 if they are directly connected; C2(n) = least-cost paths from D to n

BWD. Search Algorithm 1.Set C2(D)=0; for each node n  N-D set C2(n)=  ; 2. For each node n  N-D set C2(n)= MIN  C2(n) and C2(w)+l(n,w) (w  N) 3. Repeat 2. until no changes in C2