CSCE 3110 Data Structures - PowerPoint PPT Presentation

1 / 19
About This Presentation
Title:

CSCE 3110 Data Structures

Description:

rods, beams, springs. heat, energy. hydraulic. reservoirs, pumping ... street intersections. highways, railbeds, airway routes. freight, vehicles, passengers ... – PowerPoint PPT presentation

Number of Views:12
Avg rating:3.0/5.0
Slides: 20
Provided by: Adm979
Learn more at: http://www.cse.unt.edu
Category:
Tags: csce | data | rods | street | structures

less

Transcript and Presenter's Notes

Title: CSCE 3110 Data Structures


1
CSCE 3110Data Structures Algorithm Analysis
  • Graphs (I)
  • Reading Chap.9, Weiss

2
Maximum Flow and Minimum Cut
  • Network reliability.
  • Distributed computing.
  • Distributed computing.
  • Many many more . . .
  • 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

3
Max Flow Network
  • Max flow network G (V, E, s, t, u) .
  • (V, E) directed graph, no parallel arcs.
  • Two distinguished nodes s source, t sink.
  • u(e) capacity of arc e.

2
5
9
10
15
15
10
4
s
3
6
t
5
8
10
15
4
6
10
Capacity
15
4
7
30
4
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)

0
2
5
9
4
0
0
10
15
15
0
10
4
4
0
4
4
s
3
6
t
5
8
10
0
0
15
0
4
6
0
10
Capacity
15
0
Flow
4
7
30
0
5
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)
  • MAX FLOW find s-t flow that
  • maximizes net flow out of the source.

0
2
5
9
4
0
0
10
15
15
0
10
4
4
0
4
4
s
3
6
t
5
8
10
0
0
15
0
4
6
0
10
Capacity
Value 4
15
0
Flow
4
7
30
0
6
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)
  • MAX FLOW find s-t flow that
  • maximizes net flow out of the source.

6
2
5
9
10
6
0
10
15
15
0
10
4
4
3
8
8
s
3
6
t
5
8
10
1
10
15
0
4
6
0
10
Capacity
15
Value 24
11
Flow
4
7
30
11
7
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)
  • MAX FLOW find s-t flow that
  • maximizes net flow out of the source.

9
2
5
9
10
9
1
10
15
15
0
10
4
0
4
9
8
s
3
6
t
5
8
10
4
10
15
0
4
6
0
10
Capacity
15
Value 28
14
Flow
4
7
30
14
8
Networks Flow Examples
Network
Nodes
Arcs
Flow
communication
telephone exchanges,computers, satellites
cables, fiber optics,microwave relays
voice, video,packets
circuits
gates, registers,processors
wires
current
mechanical
joints
rods, beams, springs
heat, energy
hydraulic
reservoirs, pumpingstations, 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
9
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.

2
5
9
10
15
15
10
4
s
3
6
t
5
8
10
15
4
6
10
15
Capacity 30
4
7
30
10
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.

2
5
9
10
15
15
10
4
s
3
6
t
5
8
10
15
4
6
10
15
Capacity 62
4
7
30
11
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.

2
5
9
10
15
15
10
4
s
3
6
t
5
8
10
15
4
6
10
15
Capacity 28
4
7
30
12
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.

6
2
5
9
10
6
0
10
15
15
0
10
4
4
4
8
8
s
3
6
t
5
8
10
0
10
15
0
4
6
0
10
15
10
4
7
30
Value 24
10
13
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.

6
2
5
9
10
6
0
10
15
15
0
10
4
4
4
8
8
s
3
6
t
5
8
10
0
10
0
15
4
0
6
10
15
10
4
7
30
Value 24
10
14
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.

6
2
5
9
10
6
0
10
15
15
0
10
4
4
4
8
8
s
3
6
t
5
8
10
0
10
0
15
4
6
0
10
15
10
4
7
30
Value 24
10
15
Flows and Cuts
  • Let f be a flow, and let (S, T) be a cut. Then,
  • Proof by induction on S.
  • Base case S s .
  • Inductive hypothesis assume true for S
    k-1.
  • consider cut (S, T) with S k
  • S S' ? v for some v ? s, t, S' k-1
    ? cap(S', T') f .
  • adding v to S' increase cut capacity by

t
t
v
v
s
s
Before
S'
After
S
16
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.

S
T
4
8
t
s
7
6
17
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.

9
2
5
9
10
9
1
10
15
15
0
10
4
0
4
9
8
s
3
6
t
5
8
10
4
10
15
0
4
6
0
10
15
15
4
7
30
15
Flow value 28
Cut capacity 28
18
Max-Flow Min-Cut Theorem
  • MAX-FLOW MIN-CUT THEOREM (Ford-Fulkerson, 1956)
    In any network, the value of the max flow is
    equal to the value of the min cut.

9
2
5
9
10
9
1
10
15
15
0
10
4
0
4
9
8
s
3
6
t
5
8
10
4
10
15
0
4
6
0
10
15
15
4
7
30
15
Flow value 28
Cut capacity 28
19
Max-Flow Min-Cut Theorem
  • Intuitive Proof
  • Lemma 2 ? f ? cap(S, T).
  • Max for f is a certain cut C where Maxf 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)
Write a Comment
User Comments (0)
About PowerShow.com