×
Get Full Access to Introduction To Algorithms - 3 Edition - Chapter 24 - Problem 24-1
Get Full Access to Introduction To Algorithms - 3 Edition - Chapter 24 - Problem 24-1

×

# Yens improvement to Bellman-Ford Suppose that we order the ISBN: 9780262033848 130

## Solution for problem 24-1 Chapter 24

Introduction to Algorithms | 3rd Edition

• Textbook Solutions
• 2901 Step-by-step solutions solved by professors and subject experts
• Get 24/7 help from StudySoup virtual teaching assistants Introduction to Algorithms | 3rd Edition

4 5 1 249 Reviews
18
4
Problem 24-1

Yens improvement to Bellman-Ford Suppose that we order the edge relaxations in each pass of the Bellman-Ford algorithm as follows. Before the first pass, we assign an arbitrary linear order 1; 2;:::;jV j to the vertices of the input graph G D .V; E/. Then, we partition the edge set E into Ef [ Eb, where Ef D f.i; j / 2 E W ij g. (Assume that G contains no self-loops, so that every edge is in either Ef or Eb.) Define Gf D .V; Ef / and Gb D .V; Eb/. a. Prove that Gf is acyclic with topological sort h1; 2;:::;jV ji and that Gb is acyclic with topological sort hjV j; jV j1;:::;1i. Suppose that we implement each pass of the Bellman-Ford algorithm in the following way. We visit each vertex in the order 1; 2;:::;jV j, relaxing edges of Ef that leave the vertex. We then visit each vertex in the order jV j; jV j1;:::;1, relaxing edges of Eb that leave the vertex. b. Prove that with this scheme, if G contains no negative-weight cycles that are reachable from the source vertex s, then after only djV j =2e passes over the edges, :d D .s; / for all vertices 2 V . c. Does this scheme improve the asymptotic running time of the Bellman-Ford algorithm?

Step-by-Step Solution:
Step 1 of 3

Step 2 of 3

Step 3 of 3

##### ISBN: 9780262033848

The answer to “Yens improvement to Bellman-Ford Suppose that we order the edge relaxations in each pass of the Bellman-Ford algorithm as follows. Before the first pass, we assign an arbitrary linear order 1; 2;:::;jV j to the vertices of the input graph G D .V; E/. Then, we partition the edge set E into Ef [ Eb, where Ef D f.i; j / 2 E W ij g. (Assume that G contains no self-loops, so that every edge is in either Ef or Eb.) Define Gf D .V; Ef / and Gb D .V; Eb/. a. Prove that Gf is acyclic with topological sort h1; 2;:::;jV ji and that Gb is acyclic with topological sort hjV j; jV j1;:::;1i. Suppose that we implement each pass of the Bellman-Ford algorithm in the following way. We visit each vertex in the order 1; 2;:::;jV j, relaxing edges of Ef that leave the vertex. We then visit each vertex in the order jV j; jV j1;:::;1, relaxing edges of Eb that leave the vertex. b. Prove that with this scheme, if G contains no negative-weight cycles that are reachable from the source vertex s, then after only djV j =2e passes over the edges, :d D .s; / for all vertices 2 V . c. Does this scheme improve the asymptotic running time of the Bellman-Ford algorithm?” is broken down into a number of easy to follow steps, and 222 words. Introduction to Algorithms was written by and is associated to the ISBN: 9780262033848. This full solution covers the following key subjects: vertex, ford, order, bellman, Pass. This expansive textbook survival guide covers 35 chapters, and 151 solutions. This textbook survival guide was created for the textbook: Introduction to Algorithms, edition: 3. The full step-by-step solution to problem: 24-1 from chapter: 24 was answered by , our top Engineering and Tech solution expert on 11/10/17, 05:55PM. Since the solution to 24-1 from 24 chapter was answered, more than 610 students have viewed the full step-by-step answer.

Unlock Textbook Solution