Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

5. (12 points total) Let G = (V,E) be a complete digraph on |V| = n vertices indexed from 1 to n. Thus for

 

5. (12 points total) Let G = (V,E) be a complete digraph on |V| = n vertices indexed from 1 to n. Thus for any pair of distinct vertices i and j in V, there is an edge (i, j) in E. Assume that each edge (i, j) in E has an associated nonnegative weight w(i, j). For any i and j in {1,..., n}, let f(i, j) denote the maximum weight of any simple directed path from vertex i to vertex j. (Remark: Thus f(i,i) = 0 for all i in {1,..., n}.) The all-pairs longest path distances (APLPD) problem asks us to compute f(i, j) for all i and j in {1,..., n}. Bob wants to create a polynomial-time algorithm for the APLPD problem. He proposes the following variant of the Floyd-Warshall all-pairs shortest paths algorithm. 1: procedure BOB (G) for 1 to n do for j1 ton do if i = j then Xij 0 2: 3: 4: 5: 6: else 7: xijw(i, j) 8: end if 9: end for 10: end for 11: for k 1 ton do 12: for 1 to n do 13: 14: 15: 16: 17: 18: for j1 ton do if i j then Tij+max(2i_j, nh thi) end if end for end for 19: end for 20: end procedure In each of the following parts, prove or disprove whether the stated claim is guaranteed to hold (for all G) upon termination of Bob's algorithm. (a) (6 points) For all i and j in {1,..., n}, we have xij f(i, j). (b) (6 points) For all i and j in {1,. ,n}, we have xij f(i, j).

Step by Step Solution

There are 3 Steps involved in it

Step: 1

a To prove or disprove that for all i and j in 1 n we have xij fi j we need to consider the correctn... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Discrete Mathematics and Its Applications

Authors: Kenneth H. Rosen

7th edition

0073383090, 978-0073383095

More Books

Students also viewed these Programming questions

Question

Show that (p r) (q r) and (p q) r are logically equivalent.

Answered: 1 week ago