/*! This file is auto-generated */ .wp-block-button__link{color:#fff;background-color:#32373c;border-radius:9999px;box-shadow:none;text-decoration:none;padding:calc(.667em + 2px) calc(1.333em + 2px);font-size:1.125em}.wp-block-file__button{background:#32373c;color:#fff;text-decoration:none} Q28E Question: A linear program for s... [FREE SOLUTION] | 91Ó°ÊÓ

91Ó°ÊÓ

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-xv≤luvforall(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:

min∑elefe∑(s,u)∈Ef(s,u)=1∑(v,t)∈Ef(v,t)=1Ɐu∈V,u≠s,u≠t:∑(w,u)∈Ef(w,u)-∑(u,v)∈Ef(u,v)=0Ɐu∈E:fe≥0

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 iss∈V and the sink vertex is t∈V, where edgeu,v∈E which has the capacity ofcu,v>0 and flow fu,v≥0. 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 s≤∑elefehas 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, s≤∑elefe. 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:

min∑elefe∑(s,u)∈Ef(s,u)=1∑(v,t)∈Ef(v,t)=1Ɐu∈V,u≠s,u≠t:∑(w,u)∈Ef(w,u)-∑(u,v)∈Ef(u,v)=0Ɐe∈E:fe≥0

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 fe≥0, each vertex corresponds to a constraint.

For each vertex v∈E, 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 91Ó°ÊÓ!

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

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.

Consider the following linear program.

maximize 5x+3y

5x-2y≥0x+y≤7x≤5x≥0y≥0

Plot the feasible region and identify the optimal solution.

Direct bipartite matching. We’ve seen how to find a maximum matching in a bipartite graph via reduction to the maximum flow problem. We now develop a direct algorithm.

Let G=(V1∪V2,E)be a bipartite graph (so each edge has one endpoint in V1and one endpoint in V2), and letM∈Ebe a matching in the graph (that is, a set of edges that don’t touch). A vertex is said to be covered byMif it is the endpoint of one of the edges in M. An alternating path is a path of odd length that starts and ends with a non-covered vertex, and whose edges alternate between Mand E-M.

(a) In the bipartite graph below, a matching Mis shown in bold. Find an alternating path.


(b) Prove that a matchingMis maximal if and only if there does not exist an alternating path with respect to it.

(c) Design an algorithm that finds an alternating path inO(|V|+|E|)time using a variant of breadth-first search.

(d) Give a directO(|V|-|E|)algorithm for finding a maximal matching in a bipartite graph.

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.

For the following network, with edge capacities as shown, find the maximum flow from S to T, along with a matching cut.

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.