In a particular network G = (V, E) whose edges have integer capacities ce, we have already found the maximum flow f from node to node t. However, we now find out that one of the capacity values we used was wrong: for edge (u, v) we used cuv whereas it should have been cuv. -1 This is unfortunate because the flow f uses that particular edge at full capacity: f = c.

We could redo the flow computation from scratch, but there’s a faster way. Show how a new optimal flow can be computed inO(|V|+|E|) time.

Short Answer

Expert verified

The flow that meets the new capacity restriction and has size F - 1. Under the new capacity limit, it has its optimal flow.

Step by step solution

01

Algorithm for finding the new optimal flow

  1. Let E' be the edges eE which F(e) > 0, and let G' = (V,E'). Find in G' a path P1 from s to u and a path P2 from v to t.
  2. [Special case: If P1 from P2 have some edge in common, then role="math" localid="1659793051037" eEP1u,vP2has a directed cycle containing (u,v). In this case, the flow along this cycle can be reduced by one unit without changing the size of the overall flow. Return the resulting flow.]
  3. Reduce flow by one unit along P1u,vP2.
  4. Run Ford-Fulkerson with this starting flow.
  5. Flow start base on reduce unit and changing size of overall flow.
02

Step  2: Justification and running time

This source circulation had size F, as evidenced by the explanation and running time. Let's overlook the unique circumstance (2).

We have a valid flow that fulfils the new capacity limit and has size F - 1 during step (3) of the procedure. Its ideal flow underneath the new capacity limit is then determined by step (4), Ford-Fulkerson.

Therefore, the stream is at most F, Ford-Fulkerson only runs for one iteration. Because each step is shorter, the overall running time is linear O(|V|+|E|).

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

Consider the following linear program.

maximize 5x+3y

5x-2y0x+y7x5x0y0

Plot the feasible region and identify the optimal solution.

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?

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

A quadratic programming problem seeks to maximize a quadratic objective function (with terms like 3x12or5x1x2) subject to a set of linear constraints. Give an example of a quadratic program in two variables x1, x2 such that the feasible region is nonempty and bounded, and yet none of the vertices of this region optimize the (quadratic) objective.

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=(V1V2,E)be a bipartite graph (so each edge has one endpoint in V1and one endpoint in V2), and letMEbe 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.

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