/*! 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

There are many common variations of the maximum flow problem. Here are four of them.

(a) There are many sources and many sinks, and we wish to maximize the total flow from all sources to all sinks.

(b) Each vertex also has a capacity on the maximum flow that can enter it.

(c) Each edge has not only a capacity, but also a lower bound on the flow it must carry.

(d) The outgoing flow from each node u is not the same as the incoming flow, but is smaller by a factor of (1-∈U), whererole="math" localid="1659789093525" ∈u is a loss coefficient associated with node u.

Each of these can be solved efficiently. Show this by reducing (a) and (b) to the original max-flow problem, and reducing (c) and (d) to linear programming.

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.

The pizza business in Little Town is split between two rivals, Tony and Joey. They are each investigating strategies to steal business away from the other. Joey is considering either lowering prices or cutting bigger slices. Tony is looking into starting up a line of gourmet pizzas, or offering outdoor seating, or giving free sodas at lunchtime. The effects of these various strategies are summarized in the following payoff matrix (entries are dozens of pizzas, Joey’s gain and Tony’s loss).




TONY




Gourmet

Seating

Freesoda

JOEY

Lower price

+2

0

-3


BiggerSlices

_1

-2

+1

For instance, if Joey reduces prices and Tony goes with the gourmet option, then Tony will lose 2 dozen pizzas worth of nosiness to Joey.

What is the value of this game, and what are the optimal strategies for Tony and Joey?

Write the dual to the following linear program.

maxx+y2x+y⩽3x+3y⩽5x,y⩾0

Find the optimal solutions to both primal and dual LPs

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.