6
Bellman Ford’s Algo Data Structure and Algorithm Zain Zahid (bscs) Air university, islamabad [email protected] PART - I

Bellman ford (part-i)

Embed Size (px)

Citation preview

Page 1: Bellman ford (part-i)

Bellman Ford’s AlgoData Structure and Algorithm

Zain Zahid (bscs)Air university, [email protected]

PART - I

Page 2: Bellman ford (part-i)

WHAT IS IT ?The Bellman–Ford algorithm is an algorithm that computes shortest paths from a single source vertex to all of the other vertices in a weighted digraph. Alternative algorithm to Bellman-Ford for finding shortest path is Dijkstra's Algorithm but Bellman-Ford is more versatile, as it is capable of handling graphs in which some of the edge weights are negative numbers.

Page 3: Bellman ford (part-i)

WHAT IS IT ?

HISTORY

• The algorithm was first proposed by Alfonso Shimbel in 1955

• Named after Richard Bellman and Lester Ford Jr who published it in 1956 and 1958

• Edward F. Moore also published the same algorithm in 1957, and for this reason it is also sometimes called the Bellman–Ford–Moore algorithm

Page 4: Bellman ford (part-i)

WHAT DATA STRUCTURE IS USED?

• Graph Data Structure is Used Because It Solve the Problem of Weighted Directed Graph

Page 5: Bellman ford (part-i)

REAL LIFE APPLICATIONSA Google Map may uses Bellman-Ford for finding Shortest Path b/w to locations :-

• consider map as a GRAPH• locations in the map are our VERTICES• roads and road lengths between loacations are EDGES and WEIGHTS

Page 6: Bellman ford (part-i)

REAL LIFE APPLICATIONSIn a telephone network the lines have bandwidth(BW) We want to route the phone call via the highest BW and consider the transmition lines with highest BW as Shortest Path

• consider telephone network as a GRAPH• switching station in the network are our VERTICES• transmission lines in network are EDGES• Bandwidths in network are WEIGHTS