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
Pyotr Tchaikovsky Sporting Goods operates on a 45% overhead based on the selling price, which results in an overhead of $65.34 o
lapo4ka [179]

Answer:

Selling price of hockey game set is $145.32 , markup price is $210.54 and profit is $96 .

Step-by-step explanation:

Let us assume that the selling price of hockey game set be x .

As given

Pyotr Tchaikovsky Sporting Goods operates on a 45% overhead based on the selling price, which results in an overhead of $65.34 on the newest version of an air hockey game set.

45% is written in the decimal form .

= \frac{45}{100}

= 0.45

Thus the equation becomes  

0.45 × x = 65.34

0.45x = 65.34

x = \frac{65.34}{0.45}

x = 145.2

Therefore the selling price of the hockey game set is $145.2 .

Thus

Markup price = Selling price + Overhead Price

                      = $145.2 + $65.34

                      = $ 210.54

As given

If the air hockey game set costs Pyotr Tchaikovsky Sports $49.32 .

i.e Cost price of the  hockey game set = $ 49.32

Profit = Selling price -  Cost price

         = 145.32 - 49.32

         = $ 96

Therefore selling price of hockey game set is $145.32 , markup price is $210.54 and profit is $96 .

7 0
3 years ago
If it costs £12 for 4 cakes, what is the cost of 6 cakes?
andrew11 [14]
It cost £18.you find out how much 2 cakes cost which is £6. then you do £12+£6(sorry if wrong)
8 0
3 years ago
Tasha invests in an account that pays 1.5% compound interest annually. She uses the expression P(1+r)t to find the total value o
zhenek [66]
\bf ~~~~~~ \textit{Compound Interest Earned Amount}
\\\\
A=P\left(1+\frac{r}{n}\right)^{nt}
\quad 
\begin{cases}
A=\textit{accumulated amount}\\
P=\textit{original amount deposited}\to &\$3000\\
r=rate\to 1.5\%\to \frac{1.5}{100}\to &0.015\\
n=
\begin{array}{llll}
\textit{times it compounds per year}\\
\textit{annually, thus once}
\end{array}\to &1\\
t=years\to &5
\end{cases}
\\\\\\
A=3000\left(1+\frac{0.015}{1}\right)^{1\cdot 5}\implies A=3000(1.015)^5\implies A\approx 3231.852
5 0
3 years ago
Read 2 more answers
Evaluate the expression, m^n if m = 6 and n= 4
Tasya [4]

Answer:

1296

Step-by-step explanation:

Evaluate the expression, m^n if

m = 6 and n= 4

m^n = 6^4

m^n = 6⁴

m^n = 1296

7 0
3 years ago
Can more than one triangle be drawn if you are given the specifications of two side lengths and one angle? yes or no
Vladimir [108]

Answer:no

Step-by-step explanation:

8 0
3 years ago
Other questions:
  • Can someone answer the highlighted question!!! PLEASE
    9·1 answer
  • BRAINLIEST!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    7·1 answer
  • Given that f(x) =
    12·1 answer
  • Find the domain of the given function. f(x) = square root of quantity x plus six divided by quantity x plus seven times quantity
    6·1 answer
  • A store sells cooking oil of two different brands in bottles of the same size. The table below and the equation each show the pr
    14·2 answers
  • Given the proportion 3/4 = x/10 , the value of x is:
    13·2 answers
  • There are 45 students in a class. 40% of those students are boys.
    14·2 answers
  • For a science experiment, students need to find 25% of 60 grams. Jada says, "I can find this by calculating 1/4 of 60." Andre sa
    7·1 answer
  • Matt paid $450 in interest on a 15 month note for<br> $5600. Find the rate of interest paid.
    9·1 answer
  • Solve the following equation by combining like terms:<br> 6x + 2 + 32 - 6 = 32<br> Please help
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!