1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
SVETLANKA909090 [29]
3 years ago
8

Let G = (V, E) be a flow network with source s, sink t, and integer capacities. Suppose that we are given a maximum flow in G. (

a) Suppose that the capacity of a single edge (u, v) ∈ E is increased by 1. Give an O(V + E)-time algorithm to update the maximum flow. (b) Suppose that the capacity of a single edge (u, v) ∈ E is decreased by 1. Give an O(V + E)-time algorithm to update the maximum flow.
Mathematics
1 answer:
Tema [17]3 years ago
6 0

Answer and explanation:

a) Just executive one iteration of the ford —Fulkerson algorithm. The edge (u, v) in E with increased capacity ensures that the edge (u,v) is in the residual graph. So look for an augmenting path and update the flow if a path is found. Time: 0 (V + E) = 0(E) if we find the augmenting path with either depth — first or breadth — first search.

To see that only one iteration is needed, consider separately the cases in which (u,v) is or is not an edge that crosses a minimum cut, then increasing its capacity does not change the capacity of any minimum cut. And hence the values of the maximum flow does not change. If (u,v)does cross a minimum cut, then increasing its capacity by 1 increases the capacity of that minimum cut by 1, and hence possibly the value of the maximum flow by 1. In this case, there is either no augmenting path, or the augmenting path increases flow by 1. No matter what, one iteration of ford —Fulkerson suffices.  

b) Let f be the maximum flow before reducing C(u,v).

If f (u,v) = 0, we don't need to do anything.

If f (u,v)> 0, we will need to update the maximum flow assume from now on that f (u,v) > 0, which in turn implies that f (u,v) \ge 1  

Define f' (x,y) = f (x,y) for all x,y ∈ V , except that f f(u,v) = f (u,v) - 1, although f' obeys all capacity constraints even after C(u,v) has been reduced. It is not a legal flow as it violates skew symmetry and flow conservation at u and v. f ' has one more unit of flow entering u then leaving u, and it has on more unit of flow leaving v than entering v. The idea is to try to reroute this unit of flow so that it goes out of u and into v via some other path. If that is not possible, we must reduce the flow from s to u and from v to t by one unit.  

Look for an augmenting path from u to v.If there is such a path, augment the flow along that path. If there is no such path reduce the flow from s to u by augmenting the flow from u to s. That is, find an augmenting path it and augment. The flow along that path similarly, reduce the flow from v to t by finding an augmenting path I and augmenting the flow along that path.  

Time: 0 (V + E) = O(E) if we find the paths with either DFS or BFS.  

You might be interested in
Chalk contains 10% calcium 3% carbon and 12% oxygen find the amount in grams of each of these compounds in 1 kg of chalk
LUCKY_DIMON [66]

Answer:

100 gm calcium, 30gm carbon and 120gm oxygen

Step-by-step explanation:

10% of a kg is 100gm of calcium, 3% of 1 kg is 30gm of carbon and 12% of a kg is 120gm of oxygen

6 0
3 years ago
The ratio of coins to notes in a bag is 3 to 8. If there are a total of 24 coins then how many notes are there? 
BaLLatris [955]
Set up a proportion 
3 coins:8 notes and then the other one 24 coins : x (unknown notes)
they have a relationship so we can set them equal to each other.
3/8=24/x cross multiply: 8 * 24 = 192
Now divide that by 3: 192/3 = 64 
So there are 64 notes in the bag
8 0
3 years ago
If Tom and Jane have fifteen books on the shelf and each is taking one down to read, how many potential choices do the two of th
scZoUnD [109]

Answer:

D. 210

<h2>Step-by-step explanation:</h2><h2>its easy</h2>
5 0
4 years ago
Which of the following tables shows a proportional relationship between x and y
VLD [36.1K]

Answer:

B.

Step-by-step explanation:

6 0
3 years ago
Read 2 more answers
II
Anon25 [30]

Answer:

2.17

Answer and Explanation:

The critical value of z for 97% confidence interval is 2.17, which is obtained by using a z score table, that is: {eq}P(-2.17 < Z <...

5 0
3 years ago
Other questions:
  • Is this set of fractions in order from least to greatest? 4/5, 6/8, 7/12
    15·1 answer
  • Derive the equation of the parabola with a focus at (0, 1) and a directrix of y = −1. f(x) = −one fourth x^2
    9·1 answer
  • Y=3x+12 positive or negative
    5·1 answer
  • A square pyramid is shown below: What is the surface area of the pyramid?
    8·1 answer
  • Simplify the ratio km : 400 m​
    9·2 answers
  • AB passes through the points (1,3) and (3,17). If CD is perpendicular to AB, what is the slope of CD?​
    15·1 answer
  • Ven Diagrams with union and intersection problems shading in diagram
    6·1 answer
  • Suppose that 18 inches of a wire cost 72 cents. At the same rate, how many inches of wire can be bought for $.56
    11·1 answer
  • The gas tank in Manny's car holds 25.05 gallons of gasoline. The car gets 36.05 miles to the gallon.
    5·2 answers
  • The table below gives the points scored by a basketball player for 8 randomly selected games. Find the basketball player's mean
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!