15.082 and 6.855J

14
1 15.082 and 6.855J Flow Decomposition

description

15.082 and 6.855J. Flow Decomposition. begin Initialize while y   do begin Select(s, y) Search(s, y) if a cycle C is found then do begin let D = Capacity(C, y) Add Flow( D , C) to cycle flows Subtract Flow( D , C) from y. end if a path P is found then do - PowerPoint PPT Presentation

Transcript of 15.082 and 6.855J

Page 1: 15.082 and 6.855J

1

15.082 and 6.855J

Flow Decomposition

Page 2: 15.082 and 6.855J

2

beginInitializewhile y dobegin

Select(s, y)Search(s, y)if a cycle C is found then dobegin

let = Capacity(C, y)Add Flow(, C) to cycle flowsSubtract Flow(, C) from y.

endif a path P is found then dobegin

let = Capacity(P, y)Add Flow(, P) to path flowsSubtract Flow(, P) from y.

endend

Page 3: 15.082 and 6.855J

3

The initial flow

1

2 4

53

6

2

3

47

3

4 48

59

2 -2

00

00

A supply node

A demand node

A balanced node

The flow x

Page 4: 15.082 and 6.855J

4

Find a Path or Cycle

1

2 4

53

6

2

3

47

3

4 48

59

2 -2

00

Select a supply node

1Carry out a depth first search until a cycle C or a path P is found

Determine the capacity

The capacity is 2.

Page 5: 15.082 and 6.855J

5

Update the decomposition

1

2 4

53

6

2

3

47

3

4 48

59

2 -2

00

Add the cycle flow to the decomposition

1

update the current flow

cycle flows path flows

2 units around 1-2-4-5-3-1

25

6

7

0

Page 6: 15.082 and 6.855J

6

Find the next path or cycle

1

2 4

53

63

3

4 4

5

2 -2

00

Start at a supply node and find the next cycle or path

1

cycle flows path flows

2 units around 1-2-4-5-3-1

2

5

6

7

Page 7: 15.082 and 6.855J

7

update the decomposition and current flow

1

2 4

53

63

3

4 4

5

2 -2

00

update the current flow and decomposition

1

cycle flows path flows

2 units around 1-2-4-5-3-1

2

5

6

7

3 units around 2-4-5-3-2

0

2

3

4

Page 8: 15.082 and 6.855J

8

Find the next flow or cycle

1

2 4

53

6

3

4 4

5

2 -2

00

start with a supply node and find the next flow or cycle.

1

cycle flows path flows

2 units around 1-2-4-5-3-1

2

3 units around 2-4-5-3-2

2

3

4The capacity of 4-5-3-4 is 3

Page 9: 15.082 and 6.855J

9

Update

1

2 4

53

6

3

4 4

5

2 -2

00

1

cycle flows path flows

2 units around 1-2-4-5-3-1

2

3 units around 2-4-5-3-2

2

3

4

update the current flow and decomposition

0

1

1

3 units around 4-5-3-4

Page 10: 15.082 and 6.855J

10

1

Find the next flow or cycle

1

2 4

53

6

3

4

5

2 -2

00

1

cycle flows path flows

2 units around 1-2-4-5-3-1

2

3 units around 2-4-5-3-2

2

41

3 units around 4-5-3-4

start with a supply node and find the next flow or cycle.

The capacity of 1-2-4-6 is 2

Page 11: 15.082 and 6.855J

11

1

Update

1

2 4

53

6

3

4

5

2 -2

00

1

cycle flows path flows

2 units around 1-2-4-5-3-1

2

3 units around 2-4-5-3-2

2

41

3 units around 4-5-3-4

update the current flow and decomposition

0

01

0 0

2 units in 1-2-4-6

Page 12: 15.082 and 6.855J

12

1

Find the next path or cycle

1

2 4

53

64

5

0 -2

00

cycle flows path flows

2 units around 1-2-4-5-3-1

3 units around 2-4-5-3-2

41

3 units around 4-5-3-4

10

0

2 units in 1-2-4-6

start with any node incident to an arc with flow and find the next flow or cycle.

3

Page 13: 15.082 and 6.855J

13

1

Update

1

2 4

53

64

5

0 -2

00

cycle flows path flows

2 units around 1-2-4-5-3-1

3 units around 2-4-5-3-2

41

3 units around 4-5-3-4

10

0

2 units in 1-2-4-6

3

0

0

40

1 units around 3-4-6-5-3

Page 14: 15.082 and 6.855J

14

The Final Decomposition

1

2 4

53

640 -2

00

cycle flows path flows

2 units around 1-2-4-5-3-1

3 units around 2-4-5-3-2

3 units around 4-5-3-4

0

0

2 units in 1-2-4-6

4

1 units around 3-4-6-5-3

4 units around 5-6-5

0

0