Access over 20 million homework & study documents

Analysis of Algorithms Presentation

Content type
User Generated
Showing Page:

Sign up to view the full document!

lock_open Sign Up
Showing Page:

Sign up to view the full document!

lock_open Sign Up
Showing Page:

Sign up to view the full document!

lock_open Sign Up
End of Preview - Want to read all 19 pages?
Access Now
Unformatted Attachment Preview
Analysis of Algorithms Presentation Members • • • • Muhammad Burhan Khan Khawaja Abubakr Najaf Muhammad Zubair Arshad Tatheer e Zainab (16008020021) (15007020018) (15007065057) (15007065008) All Short paths The all pairs of shortest paths problem (APSP) is to find a shortest path from u to v for every pair of vertices u and v in V. Given a directed, connected Weighted graph G(V,E), for each edge ⟨u,v⟩ ∈E, a weight w(u,v) is associated with the edge. Matrix Multiplication The algorithm is based on dynamic programming, in which each major loop will invoke an operation that is very similar to matrix multiplication. DP Strategies • • if u=v, then the shortest path p from u to v is 0. otherwise, decompose p into u→x→v, where p' is a path from u to x and contains at most k edges and it is the shortest path from u to x. Recursive solution for the APSP problem • 1. • Let dij (k) be the minimum weight of any path from ( i ) to ( j ) that contains at most k edges. If k=0, then dij (0) ={ 0 if i=j ∞ if i≠j Otherwise, for k≥1, dij (k) can be computed from dij (k-1) and the adjacency matrix w. dij (k) =min{ dij (k-1) , min1 ≤ l ≤n { dil (k-1) + wlj }} = min1 ≤ l ≤n { dil (k-1) + wlj } Floyd–Warshall algorithm • Floyd–Warshall algorithm is used to find the shortest path of a weighted graph. • Developed by Bernard Roy in 1959 and Stephen Warshal in 1962. • Recognized by Robert Floyd in 1962. • Instead of Single ...
Purchase document to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Nice! Really impressed with the quality.