Warning: foreach() argument must be of type array|object, bool given in /var/www/html/web/app/themes/studypress-core-theme/template-parts/header/mobile-offcanvas.php on line 20

Question: A linear program for shortest path. Suppose we want to compute the shortest path from node s to node t in a directed graph with edge lengths le>0.

a) Show that this is equivalent to finding an s - tflow fthat minimizes elefesubject to size (f) = 1. There are no capacity constraints.

b) Write the shortest path problem as a linear program.

c) Show that the dual LP can be written as

role="math" localid="1659250472483" maxxs-xtxu-xvluvforall(u,v)E

d) An interpretation for the dual is given in the box on page 223. Why isn’t our dual LP identical to the one on that page?

Short Answer

Expert verified

a) It can be shown that the equivalent to an s - t flow f that minimizes elefeto size(f)=1.

b) Linear program:

minelefe(s,u)Ef(s,u)=1(v,t)Ef(v,t)=1uV,us,ut:(w,u)Ef(w,u)-(u,v)Ef(u,v)=0uE:fe0

c) Yes, the dual LP can be written as given.

d) Because, the dual in the box is written for undirected graph and the dual written in this problem is written for directed graph.

Step by step solution

01

Explain Directed Graph with edge

Consider the oriented graph's flowing network is represented by (V,E)A current node and a sinks vertex, where the source vertex issV and the sink vertex is tV, where edgeu,vE which has the capacity ofcu,v>0 and flow fu,v0. As a result, the cost of sending flows down the edge (u,v).

02

Show that this is equivalent to finding an flow that minimizes subject to .

(a)

Consider that the length of the shortest path be s, then selefehas to be proved. Knowing that f can be decomposed into one or more paths p1,p2,p3,K,pn. Since size(f) = 1, that means elefeis not less than the weighted average paths. Since the length of these paths is not less than s, selefe. In addition, the shortest path is the flow path s=elefe, shows that the inequality can be changed as the equal sign.

Therefore, It has been shown that the equivalent to an s - t flow f that minimizes elefetosize(f)=1.

03

Write the shortest path problem as a linear program.

(b)

A linear algorithm for the shortest-path problem is as follows,

Linear program:

minelefe(s,u)Ef(s,u)=1(v,t)Ef(v,t)=1uV,us,ut:(w,u)Ef(w,u)-(u,v)Ef(u,v)=0eE:fe0

Therefore, the linear program for the shortest path problem has been derived.
04

Step 4:Show that the dual LP can be written as given.

(c)

Consider the linear program in the part (b) solution, in that except for last fe0, each vertex corresponds to a constraint.

For each vertex vE, multiply the constraint by the factor x, and add up all the constraints to get the equation (u,v)Exu-xvf(u,v)=xs-st.

The above equation is linked to the objective function, thus the dual LP can be written as given.

Therefore, yes It has been shown that the dual LP can be written as given.

05

Explain Why isn’t the given dual LP identical to the one on 223 page

(d)

Because, the dual in the box is written for undirected graph and the dual written in this problem is written for directed graph.

Unlock Step-by-Step Solutions & Ace Your Exams!

  • Full Textbook Solutions

    Get detailed explanations and key concepts

  • Unlimited Al creation

    Al flashcards, explanations, exams and more...

  • Ads-free access

    To over 500 millions flashcards

  • Money-back guarantee

    We refund you if you fail your exam.

Over 30 million students worldwide already upgrade their learning with Vaia!

One App. One Place for Learning.

All the tools & learning materials you need for study success - in one app.

Get started for free

Most popular questions from this chapter

In a satisfiable system of linear inequalities

a11x1+···+a1nxnb1:am1x1+···+amnxnbm

we describe the inequality as forced-equal if it is satisfied with equality by every solution x = (x1,...,xn)of the system. Equivalently,Piajixibj is not forced-equal if there exists an x that satisfies the whole system and such that Piajixibj.

For example, in

x1+x22-x1-x2-2x11-x20

Consider the following network (the numbers are edge capacities).

(a)Find the maximum flow fand a minimum cut.

(b)Draw the residual graphGf (along with its edge capacities). In this residual network, mark the vertices reachable fromS and the vertices from whichT is reachable.

(c)An edge of a network is called a bottleneck edge if increasing its capacity results in an increase in the maximum flow. List all bottleneck edges in the above network.

(d)Give a very simple example (containing at most four nodes) of a network which has no bottleneck edges.

(e)Give an efficient algorithm to identify all bottleneck edges in a network.

A cargo plane can carry a maximum weight of 100 tons and a maximum volume of 60 cubic meters. There are three materials to be transported, and the cargo company may choose to carry any amount of each, up to the maximum available limits given below.

  • Material 1 has density 2tons/cubicmeters, maximum available amount 40 cubic meters, and revenue \(1,000 per cubic meter.
  • Material 2 has density 1ton/cubicmeters,maximum available amount 30 cubic meters, and revenue \)1,200 per cubic meter.
  • Material 3 has density 3tons/cubicmeters, maximum available amount 20 cubic meters, and revenue $12,000 per cubic meter.

Write a linear program that optimizes revenue within the constraints.

A vertex cover of an undirected graph G = (V,E) is a subset of the vertices which touches every edge—that is, a subset SVsuch that for each edge {U,V}E, one or both of u, v are in S. Show that the problem of finding the minimum vertex cover in a bipartite graph reduces to maximum flow. (Hint: Can you relate this problem to the minimum cut in an appropriate network?)

Question: Consider the following simple network with edge capacities as shown.

a) Show that, if the Ford-Fulkerson algorithm is run on this graph, a careless choice of updates might cause it to take 1000iterations. Imagine if the capacities were a million instead of 1000.

We will now find a strategy for choosing paths under which the algorithm is guaranteed to terminate in a reasonable number of iterations.

Consider an arbitrary directed network (G=V,E,s,t,ce)in which we want to find the maximum flow.Assume for simplicity that all edge capacities are at least 1, and define the capacity of an s - t path to be the smallest capacity of its constituent edges. The fattest path from s to t is the path with the most capacity.

b) Show that the fattest s - t path in a graph can be computed by a variant of Dijkstra’s algorithm.

c) Show that the maximum flow in Gis the sum of individual flows along at most|E|paths from s to t.

d) Now show that if we always increase flow along the fattest path in the residual graph, then the Ford-Fulkerson algorithm will terminate in at mostO(ElogF) iterations, where F is the size of the maximum flow. (Hint: It might help to recall the proof for the greedy set cover algorithm in Section 5.4.)

In fact, an even simpler rule—finding a path in the residual graph using breadth-first search— guarantees that atO(V.E)most iterations will be needed.

See all solutions

Recommended explanations on Computer Science Textbooks

View all explanations

What do you think about this solution?

We value your feedback to improve our textbook solutions.

Study anywhere. Anytime. Across all devices.

Sign-up for free