Maximum Flow - Data Structures and Algorithm - Lecture Slides, Slides of Data Structures and Algorithms

Some concept of Data Structures and Algorithm are Permutation, Representation, Implemented, Algorithm Design, Dynamic Programming, Graph Data Structures, String Processing, General Trees. Main points of this lecture are: Maximum Flow, Max Flow, Two Algorithmic Problems, Details, Nontrivial Applications, Network Connectivity, Traffic Control, Airline Scheduling, Project Selection, General Scheduling

Typology: Slides

2012/2013

Uploaded on 04/27/2013

shareeka_555
shareeka_555 🇮🇳

4

(6)

74 documents

1 / 19

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Data Structures & Algorithm
Analysis
Docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13

Partial preview of the text

Download Maximum Flow - Data Structures and Algorithm - Lecture Slides and more Slides Data Structures and Algorithms in PDF only on Docsity!

Data Structures & Algorithm

Analysis

Maximum Flow and

Minimum Cut

  • Max flow and min cut.
    • Two algorithmic problems.
    • See Cormen et.al for more details
  • Nontrivial applications / reductions.
    • Network connectivity.
    • Traffic control
    • Data mining.
    • Airline scheduling.
    • Project selection.
    • General scheduling
      • Network reliability.
      • Distributed computing.
      • Distributed computing.
      • Many many more...

Flows

• An s-t flow is a function f: E → ℜ that satisfies:

  • For each e ∈ E: 0 ≤ f(e) ≤ u(e) (capacity)
  • For each v ∈ V – {s, t}: ∑ ∑ (conservation)

e v e v

f e f e

into out of

s

2

3

4

5

6

7

t

Capacity

Flow

∑ = ∑

e v w v wE

f e f v w

outof :( , )

∑ = ∑ ( ) : ( , )

e v w wvE

f e f w v

into :( , )

( ) : ( , )

Flows

• An s-t flow is a function f: E → ℜ that satisfies:

  • For each e ∈ E: 0 ≤ f(e) ≤ u(e) (capacity)
  • For each v ∈ V – {s, t}: ∑ ∑ (conservation)

e v e v

f e f e

into out of

s

2

3

4

5

6

7

t

Capacity

Flow

= ∑

e s

f f e

out of

Value = 4

MAX FLOW: find s-t flow that

maximizes net flow out of the source.

Flows

• An s-t flow is a function f: E → ℜ that satisfies:

  • For each e ∈ E: 0 ≤ f(e) ≤ u(e) (capacity)
  • For each v ∈ V – {s, t}: ∑ ∑ (conservation)

e v e v

f e f e

into out of

= ∑

e s

f f e

out of

MAX FLOW: find s-t flow that

maximizes net flow out of the source.

s

2

3

4

5

6

7

t

Value = 28

Capacity

Flow

Networks Flow Examples

communication

Network

telephone exchanges,

computers, satellites

Nodes Arcs

cables, fiber optics,

microwave relays

Flow

voice, video,

packets

circuits

gates, registers,

processors

wires current

mechanical joints rods, beams, springs heat, energy

hydraulic

reservoirs, pumping

stations, lakes

pipelines fluid, oil

financial stocks, currency transactions money

transportation

airports, rail yards,

street intersections

highways, railbeds,

airway routes

freight,

vehicles,

passengers

chemical sites bonds energy

Cuts

• An s-t cut is a node partition (S, T) such that s ∈ S, t ∈ T.

– The capacity of an s-t cut (S, T) is:

• Min s-t cut: find an s-t cut of minimum

capacity.

s

2

3

4

5

6

7

t

Capacity = 62

∑ ∑

∈ ∈

=

v S w T

e S vw E

u e u v w

,

outof ( , )

( ) : ( , ).

Cuts

• An s-t cut is a node partition (S, T) such that s ∈ S, t ∈ T.

– The capacity of an s-t cut (S, T) is:

• Min s-t cut: find an s-t cut of minimum

capacity.

s

2

3

4

5

6

7

t

Capacity = 28

∑ ∑

∈ ∈

v S w T

e S vw E

u e u v w

,

outof ( , )

Flows and Cuts

• L1. Let f be a flow, and let (S, T) be a cut. Then, the net

flow sent across the cut is equal to the amount reaching t.

s

2

3

4

5

6

7

t

Value = 24

f e f e f e f

e S e S e s

∑ −^ ∑ = ∑^ =

outof into outof

Flows and Cuts

• L1. Let f be a flow, and let (S, T) be a cut. Then, the net flow

sent across the cut is equal to the amount reaching t.

s

2

3

4

5

6

7

t

Value = 24

f e f e f e f

e S e S e s

∑ −^ ∑ = ∑^ =

outof into outof

Flows and Cuts

• L2. Let f be a flow, and let (S, T) be a cut. Then,

| f | ≤ cap(S, T).

• Proof.

• Corollary. Let f be a flow, and let (S, T) be a cut.

If |f| = cap(S, T), then f is a max flow and (S, T) is a min cut.

cap(S, T)

outof

outof

outof into

∑ ∑

e S

e S

e S e S

u e

f e

f f e f e

s

t

S T

Max Flow and Min Cut

• Corollary. Let f be a flow, and let (S, T) be a

cut. If |f| = cap(S, T), then f is a max flow and

(S, T) is a min cut.

s

2

3

4

5

6

7

t

Flow value = 28

Cut capacity = 28

Max-Flow Min-Cut Theorem

• Intuitive Proof:

• Lemma 2  | f | ≤ cap(S, T).

– Max for |f| is a certain cut C where Max|f| = C

– Min cut for cap(S,T) is a certain flow F where

|f| = Min cut

– |f| ≤ Max |f| = C ≥ Min cut(S,T) 

– Max |f| ≥ Min cut(S,T)

– L2  Max |f| ≤ Min cut(S,T)

–  Max |f| = Min cut(S,T)