Presentation is loading. Please wait.

Presentation is loading. Please wait.

Network Routing.

Similar presentations


Presentation on theme: "Network Routing."— Presentation transcript:

1 Network Routing

2 Network Routing In order to quickly transfer data between two computers on a network (LAN or WAN) a path must be taken This involves a packet of information jumping from one computer to the next until it reaches it’s destination It is very beneficial for efficiency and speed to have the route (and essentially the path of computers) computed ahead of time.

3 Network Routing Think of going on a trip Florida
You would probably want your path to be thought out before you left Finding the shortest distance when traveling from city to city is a very similar task to network routing. Similar algorithms are employed in each case.

4 Network Routing Dijkstra’s Algorithm is one of these algorithms
It is considered a greedy algorithm because it takes the shortest distance after each computer/city/node This algorithm runs in polynomial time That is within a reasonable time to compute using current technology Mathematically it is of the order Θ|V|log|E| Very fast

5 Walk through – Dijkstra’s Algorithm
function Dijkstra(Graph, source): for each vertex v in Graph: // Initializations dist[v] := infinity // Unknown distance function from source to v previous[v] := undefined dist[source] := 0 // Distance from source to source Q := copy(Graph) // All nodes in the graph are unoptimized - thus are in Q while Q is not empty: // The main loop u := extract_min(Q) // Remove and return best vertex from nodes in two given // we would use a path finding algorithm on the new graph, //such as depth-first search. for each neighbor v of u: // where v has not yet been considered alt = dist[u] + length(u, v) if alt < dist[v] // Relax (u,v) dist[v] := alt previous[v] := u return previous[]

6 Dijkstra’s Applet


Download ppt "Network Routing."

Similar presentations


Ads by Google