UNCW Faculty and Staff Web Pages
Routing Path Optimization in Autonomous SystemsJames SilvaMaxwell CrawfordBradley KozelekAbstract:Three pathing algorithms are utilized and tested to optimize the path taken from a starting node to an end node in a directed acyclic graph with weights on each edge. Two of these algorithms, Dijkstra and Bellman-Ford, use a relaxation method to iterate through each path. Edmonds-Karp, a breadth-first search focused variation of Ford-Fulkerson, uses the max flow problem as a model for analyzing the minimum cut of a graph. Each of these algorithms have their merits, although the dated Dijkstra’s algorithm is found to be the least efficient, in terms of time.Keywords:Network, routing, pathing, shortest, optimization, latencyIntroduction:The goal of our project is to highlight a key problem faced by network administrators and routing hardware to this day, which is how to reduce net latency. Net latency is the total amount of time (measured in milliseconds) it takes for a packet to travel from source to destination. Data is carried in packets, which must “hop” through many intermediate nodes first before it can truly reach its destination. In our project, we will test the efficacy of Dijkstra’s, Bellman-Ford’s, and Edmond-Karp’s algorithm in regards to reducing latency, then we will attempt to improve upon the algorithm that fares the best.In order for a user get the data they're requesting from a server, their router needs to establish a connection from their computer to the server that the data they want is stored on. During the connection process the source router jumps from node to node within a vast network of routers that are each passed information about the end destination until it finally reaches the server that the user wishes to connect to. There are a few algorithms that achieve this traversal within a network that will be addressed within this analysis; those algorithms being Dijkstra's algorithm, the Bellman-Ford algorithm and lastly the Edmonds-Karp Algorithm. In the infancy of the internet age an algorithm such as Dijkstra's would suffice when attempting data transfers due to the low number of nodes within the network. As the internet grows with our growing cyber community so does the demand on routing paths and since there is an increasing demand on networks, route path optimization has become the primary concern. Applying the Bellman Ford algorithm to traversing nodes within a network was an answer to this concern. When applied, the Bellman Ford algorithm makes the traversal of the network faster than Dijkstra's algorithm due to directed edges between each node but has a pitfall in that it doesn't account for the flow of traffic on a given edge caused by other users. By optimizing the routing paths, it means that there is a focus on minimizing the variables that account for latency, otherwise the delay time from input to output. This is why the Edmonds-Karp algorithm has become so vital to network infrastructure due to the algorithm allowing for a parameter that accounts for the network flow between each node within a network and the usage of directed edges. The implementation of each previously stated algorithm is worth analyzing to see how well each respective one can handle the loss of data, loss of nodes within a network and lastly the increase of traffic on a specific network while still maintaining an optimal net rmal Problem Statement:Optimize the route taken by data packets in a network flow (a directed acyclic graph of nodes with connecting edges) by testing each of our three shortest path type algorithms. The potential path options will be given weights (in terms of time in milliseconds), and the path that adds up to the lowest amount of net distance (latency) will be chosen as the optimal path.Formal Problem Statement:Minimize the net distance (measured in latency in milliseconds) taken from the source client to the end client at the end of the path.Given a Directed Acyclic Graph G(V,E) such that:E = set of edges, e = edge weight(u,v)V = set of Vertices (nodes)Dist(c,n) = distance from c to n, stored as latency in millisecondsq = Net distance for shortest path found, qc = current (stored) path, qp = potential pathc = current node, n = next nodes=source (start) node, t=sink (end) nodeu-v = path/edgeMinimize q (net distance for optimal path) for the equation:q = min(∑ Dist(c,n)) ?(e) ∈ E, where qc < qpConstraints: Graph is connected from source to sink nodeData flow from source to end is completed (no data loss or interruption during iteration)The time it took for each path will be measured in milliseconds, and each algorithm will be represented and compared, in terms of complexity, by Big O notation. The best, worst, and average results will be shown for each algorithm.Context - Other Works:In 1984, Michael L. Fredman and Robert Endre Tarjan introduced Fibonacci heap structures, which allow faster running times in many network optimization scenarios [1]. The worst case bound for the single-source shortest path problem, with non-negative edges, is O(n*log(n)+m), where n is number of vertices and m is number of edges. This heap, a set of items with attached keys, has insert, find, delete, and meld functions, where a key may be used to produce an item within a certain heap. The melding function can take the conjunction of two disjoint heaps, form a new heap, and eliminate the original two heaps. Fibonacci heaps can use delete and delete min, where delete min removes an item of minimum key from a heap, in only O(log n) time. Originally they wanted to use Fibonacci heaps to enhance Dijkstra’s algorithm with regards to the single-source shortest path problem.In 1997, Vincent D. Park and M. Scott Corson proposed a new distributed routing protocol for mobile wireless networks [2]. It was a “link reversal” type algorithm called the Temporally-Ordered Routing Algorithm. Their approach was to obtain adaptability, efficiency and scalability in dense mobile networks. The T.O.R. algorithm is meant to handle link failures by using a localized single pass and a dependence upon clock timing in order to restructure the topology. Park and Corson take into account the fact that mobile networks are often quicker to change their topology, and are more “prone to congestion” [2]. Most algorithms assume relatively static networks, with links that do not physically alter their locations. Also, many pathing algorithms return only one optimal route at a route, which could exacerbate congestion issues if that returned path is used many times over. The T.O.R. aims to “minimize reaction to topological changes” [2] and return several possible paths, without suffering from information overhead.Steven H. Low and David E. Lapsley worked on optimization of flow control in 1999 where they worked to maximize the source utility over the transmission rates [3]. They use the gradient projection algorithm to select transmission rates and allow links to adjust their “bandwidth prices” [3] for proper coordination. The focus is “reactive flow control, where sources adjust their transmission rates in response to changes in network conditions” [3]. Low and Lapsley show a convergence of synchronous and asynchronous flow algorithms in static networks, and how a unified algorithm emerges in a “time-varying environment” [3].Srinivasan Keshav investigates three different protocols for flow control and tests the difference in speed, which is affected by whether the state of the network is properly monitored [4]. When delays are involved, protocols that fail to check network state, or need multiple trips to acquire optimal transmission rate, will take a hit in performance. Keshav claims the packet-pair protocol handles these issues. A fundamental issue in large, global scale networks is that that the data that the flow algorithm receives is likely to be outdated and possibly incomplete, due to newer connections being made during the delay period. Keshav evaluates generic flow control with Tahoe TCP flow control and packet-pair flow control, in conjunction with First Come First Served and Fair Queueing packet scheduling techniques.Jennifer Rexford, during the mid 2000’s, discussed the issue of optimizing the routing policies that interact and control flow from one network to another [5]. Typically, routing protocols focus on topology and configurations, rather than traffic load on network links. Algorithms based on local search tend to be helpful in tuning routing protocols to be more efficient. Rexford confirms that routers use control messages, in a distributed fashion, to give integer link weights to protocols, which in turn provide shortest path routing. Rexford notes that the distributed approach allows adaptability to changing topologies, but does not “incorporate information about network load and performance into the selection of the paths.” [5]Our Experiment:Dijkstra’s Algorithm (Link-state)Gets the shortest distance between a starting node and any other node in the graph G. Excludes longer distances found with each update, leaving shorter and shorter paths in the list. Running Time: O(|E|*log(|V|))Where: V = number of Vertices/Nodes, and E = total number of edgesDiagram Explanation:Step 1: Assign C(A)=0 and C(x)=infinity for all other x. C(A) is cost of A, C(x) is cost of getting to node xStep 2: Node with smallest temp value is node A (C(A)=0). Run algorithm until no temp nodes are left, or c(x) is infinity.Step 3: Calculate to cost to get to any node connected to currently selected node. Cost is current node value + edge cost.Step 4: Iterate by returning to Step 2; find next node x with smallest temp value of C(x). Choose that node and calculate new costs.Continue until all nodes have been selected.Pseudocode:Function Dijkstra(Graph, source):Create vertex set, QFor each vertex v in Graph:dist[v] = max_number;prev[v] = null;add v to Qdist[source] = 0;while (Q != empty):u = node in Q with smallest distremove u from Q;for each neighbor v of u: Alt = dist[u] + length(u,v); if (alt < dist[v]): dist[v] = alt; prev[v] = u;Return dist[], prev[];Python code:from pythonds.graphs import PriorityQueue, Graph, Vertexdef dijkstra(aGraph,start): pq = PriorityQueue()start.setDistance(0) pq.buildHeap([(v.getDistance(),v) for v in aGraph]) while not pq.isEmpty():currentVert = pq.delMin() for nextVert in currentVert.getConnections():newDist = currentVert.getDistance() \+ currentVert.getWeight(nextVert) if newDist < nextVert.getDistance():nextVert.setDistance( newDist )nextVert.setPred(currentVert) pq.decreaseKey(nextVert,newDist)Pros:Greedy approach might mean finding a shortest path fairly quickly, but is inconsistentCan’t handle negative edge weightsCons:Greedy approach to edge relaxation means it either finds great solution right away, or much later; may not always find best solutionBellman-Ford Equation (Distance vector)Continually checks if the distance from the source to the first node plus edge length is less than the distance to the second node. If the first distance is less, than the first node is selected as the predecessor of the second node and distance to the second node is computed again. After running this loop, the shortest path is returned as a list (or tree).Running Time: O(|V|*|E|)Where: V = number of Vertices/Nodes, and E = total number of edgesNote that outer loop is run |V|-1 times.Diagram Explanation:Step 1: Node n1 sends distance vector to neighbors (n2, n3)Step 2: Node n2 sends distance vector to its neighbors (n1, n3, n5)Step 3: Node n4 sends distance vector to its neighbors (n1, n5)Step 4: Node n3 sends distance vector to its neighbors (n2, n5)Step 5: Node n5 sends distance vector to its neighbors (n2, n3, n4)Step 6: Update all tables of distance information (graph is now “stable”)Pseudocode:function BellmanFord(Graph G, Vertex source) for i in 1 to number of vertices do distance[i] = max_value predecessors[i] = null distance[source] = 0 for i in 1 to (number of vertices-1) do for each Edge e in Edges(G) do if distance[e.prev] + length(e) < distance[e.next] dodistance[e.next] = distance[e.prev] + length(e) predecessors[e.prev] =e.next for each Edge e in Edges(G) do if distance[e.prev] + length(e) < distance[e.next] do error("Graph contains cycles of negative length") return predecessors //list, or tree, of shortest path Pros:Can handle negative edge weightsSince it relaxes all edges, always finds best path or solutionCons:Must update an internal table of neighbors; some overheadRuns ‘relaxation’ on ALL possible edges; |V|-1 iterations neededEdmonds-Karp AlgorithmUses a flow network, which is a directed graph G=(V,E) such that each edge has a non-negative capacity c(u,v)≥0. In the graph G, the Source (s) vertex has in-degree of 0, and the Sink (t) vertex has out-degree of 0. The flow value |f| = Σ f(s,v) = Σ f(v,t), where the summations are of vertices in the total set of vertices in graph G, s=source node, v=current vertex, t=sink node, and f=current flow.For each edge (u,v) in E, the flow f(u,v) is a function that is satisfies 3 conditions:Capacity Constraint : u,v V, f(u,v) c(u,v)Skew Symmetry : u,v V, f(u,v)= -f(v,u)Flow Conservation: u V – {s,t} f(s,v)=0 vVRunning Time: O(|V|*|E|2) – worst caseWhere: V = number of Vertices/Nodes, and E = total number of edgesNote that Breadth-First Search can take O(|E|) time in a graph where vertices have at least one edge.Diagram Explanation: Step 1: Pick an s->t path on a residual network (Gf) of flow network GStep 2: On Gf, update s->b->c->t path, then pick new (s->t) path: s->a->tStep 3: On Gf, update s->a->t path, then pick s->d->t pathStep 4: On Gf, update s->d->t path, then choose last path: s->a->c->b->d->tStep 5: On Gf, update last path. No more (s->t) paths available! Calculate flow pushed: 8+5+5+3=21, which is the max flow in G.Pseudocode:Function minCut(Graph G, node s, node t):f=0, Gf = G; //initialize flow and flow graphwhile Gf has u-v path P do: Run BFS on Gf to visit each u-v path Let P be a u-v path in Gf with the min. number of edges Augment f using P Update Gfend whilereturn f[6]Where: G=graph, Gf=flow/residual graph, f=current flow, s=source node, t=sink node, E(G)=edges in the graph, u,v=current nodes, P=pathPros:Uses BFS and minimum-cuts to reduce the number of iterations needed to evaluate all pathsDoes not need to keep or update a table of neighbors; has minimal overheadCons:BFS can sometimes, although rarely, but less effective than DFS, depending on length and branching factor of a pathResults and Conclusions:We tested our three main algorithms across two cases for our results. The first “base case” was a simple traceroute example with 20 nodes, varying latencies, and no branching factor. The second “Breadth-3” case had a maximum branching factor of 3, and had relatively close values for latency.For each case, a NODE is a server hop, with out-degree “weights”, which are the distance measured (equivalent to latency in ms)“Base Case” GraphNODE 1 = SOURCE, NODE 20 = SINK/ENDTrial #DijkstraBellman-FordEdmonds-Karp152.00140.00124254.0064018352.00142.00124449.99539.9961855244.00118654.00642.00118754.00139.99418848.00141.99618952.00147.996161052.0074818AVG52.001942.598619NOTE: LOWER IS BETTERResults: Dijkstra is 3rd place, Bellman-Ford is 2nd place, Edmonds-Karp is 1st placeBellman-Ford is, on average, 9.4033 ms faster than DijkstraEdmonds-Karp is, on average, 23.5986 ms faster than Bellman-FordBreadth-3 GraphNODE 1 = SOURCE, NODE 14 = SINK/ENDTrial #DijkstraBellman-FordEdmonds-Karp152.00115.99520250.0061616348.00115.99516448.0011414550.00115.99514650.0011616748.0061616845.99615.99416947.99518161047.99615.99514AVG48.800415.997415.8NOTE: LOWER IS BETTERResults: Dijkstra is 3rd place, Bellman-Ford is 2nd place, Edmonds-Karp is 1st placeBellman-Ford is, on average, 32.803 ms faster than DijkstraEdmonds-Karp is, on average, 0.1974 ms faster than Bellman-FordNOTE: Bellman-Ford was extremely close to Edmonds-Karp’s score in this case!Overall ComparisonBase CaseDijkstraBellman-FordEdmonds-KarpBest48.00139.99416Worst54.0064824Average52.001942.598619Breadth GraphDijkstraBellman-FordEdmonds-KarpBest45.9961414Worst52.0011820Average48.800415.997415.8Overall, Edmonds-Karp was consistently faster than the other two, with Bellman-Ford coming close in the Breadth-3 case. Dijkstra’s greedy iteration fell short compared to Bellman-Ford’s linear relaxation on all edges. Dijkstra’s greed may have caused the algorithm to check some edges more than once, as each node had its neighbors and branching neighbors checked. As for Edmonds-Karp, breaking up the graph into residual graph “cuts” may have itself worthy in increasing the efficiency, especially in linear cases. However, since Bellman-Ford and Edmonds-Karp ran in such similar times, it may be worth further experimentation and tweaking in order to further improve these algorithms.Future Work:Rather than use Edmonds-Karp as a basis for max flow, it may be beneficial to use Dinic’s Algorithm instead for O(V2E) base running time instead. Comparing the net latency of Dinic's Algorithm to the net latency of Edmonds-Karp Algorithm may produce some very contrasting results depending on the network layout. Dinic's Algorithm doubles the number of vertices during its implementation which could prove to having a faster run time than Edmonds-Karp algorithm because Edmonds-Karp doubles the number of edges in it's implementation. In a network layout where all the vertices have a significantly larger amount of edges than vertices, the run time of Dinic's Algorithm could potentially prove that it can handle the max flow problem much better than Edmonds-Karp Algorithm could.Other possible future applications of this research could include applying these algorithms to other real world problems such as finding the quickest or least congested route while navigating via GPS on a driverless vehicle depending on the user's constraints. Applying a max flow algorithm such as Edmonds-Karp to smart car technology has potential to lower net travel time as well alleviate traffic jams. After seeing the analysis of Bellman-Ford and Edmonds-Karp efficiency showing that there is a very close relationship in terms of net latency between the two algorithms it would important to see if that same close relationship would exist in the net travel time of an automated vehicle. Questions:1. What is a routing protocol?A: ?A routing protocol establishes a 'grammar' in which nodes that exist in a network must adhere to in order to provide information needed for varying routing algorithms.2. Is Dijkstra a Link-State or Distance-Vector Routing Protocol? ?What's the difference between Link-State and Distance-Vector Routing Protocols?A: Dijkstra is a Link-State Routing Protocol. ?Nodes in Link-State broadcast to all other nodes in network. ?Nodes in Distance-Vector broadcast only to their respective neighbors.?3. ?What can the Bellman-Ford algorithm handle that Dijkstra cannot?A: ?Negative edge weights4. Is Edmonds-Karp a Distance-Vector Routing Algorithm or a Link-State Routing Algorithm? ?A: Distance-Vector.?5. ?What distinguishes Ford-Fulkerson from Edmonds-Karp?A: The difference between the Ford-Fulkerson and Edmonds-Karp algorithms is the utilization of a breadth first search in order to decrease the time complexity.Sources:[1] [2] [3] [4] [5] [6] Member AssignmentsNameResponsibilitiesMaxwell CrawfordImplementation/testing of the Ford-Fulkerson (Edmonds-Karp) algorithm, organization of the paper and shared online resources for the projectJames SilvaImplementation/testing of the Bellman-Ford algorithm, collection and organization of data sets for our experimentationBradley KozelekImplementation/testing of Dijkstra’s algorithm, organization and implementation of presentations and its material ................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related download
- jmeter quick reference guide
- ee 477 final report purdue university
- uncw faculty and staff web pages
- laboratory manual for computer programming with python
- osisoft honeywell phd interface to the pi system
- diagnostics and logging for tswp scalability
- automated log analysis using ai intelligent intrusion
- cdf home page
Related searches
- narrator for web pages microsoft edge
- scranton prep faculty and student portal
- plug and play web cam
- copy and paste web link
- web pages not responding
- plug and play web camera
- employees and staff uc health
- and subtract fractions pages 695 698
- marshall university faculty and staff
- upenn faculty and staff
- 14 1 geography and early cultures pages 382 385
- 14 1 geography and early cultures pages 386 391