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

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