15.082 and 6.855j

19
1 15.082 and 6.855J Cycle Canceling Algorithm

Upload: anne-cash

Post on 31-Dec-2015

27 views

Category:

Documents


1 download

DESCRIPTION

15.082 and 6.855J. Cycle Canceling Algorithm. A minimum cost flow problem. 0. 0. 10, $4. 2. 4. 30, $7. 25, $5. 25. 1. 20, $2. 20, $6. 20, $1. 3. 5. 25, $2. 0. -25. The Original Capacities and Feasible Flow. 0. 0. 10, 10. 2. 4. 30, 25. 25, 15. 25. 1. 20, 10. 20, 20. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: 15.082 and 6.855J

1

15.082 and 6.855J

Cycle Canceling Algorithm

Page 2: 15.082 and 6.855J

2

A minimum cost flow problem

1

2 4

3 5

10, $4

20, $120, $2

25, $2

25, $5

20, $6

30, $7

25

0 0

0 -25

Page 3: 15.082 and 6.855J

3

The Original Capacities and Feasible Flow

1

2 4

3 5

10,10

20,20

20,10

25,5

25,15

20,0

30,25

25

0 0

0 -25

The feasible flow can be found by solving a max flow.

Page 4: 15.082 and 6.855J

4

Capacities on the Residual Network

1

2 4

3 5

10

20

20

5

25 101015

5

20

10

Page 5: 15.082 and 6.855J

5

Costs on the Residual Network

1

2 4

3 5

2

26

7

-7

-5 -2

-2

-1

-4

5

Find a negative cost cycle, if there is one.

Page 6: 15.082 and 6.855J

6

Send flow around the cycle

Send flow around the negative cost cycle

1

2 4

3 5

20

2515

The capacity of this cycle is 15.

Form the next residual network.

Page 7: 15.082 and 6.855J

7

Capacities on the residual network

1

2 4

3 5

10

20

5

20

10 1025

5

20

1015

Page 8: 15.082 and 6.855J

8

Costs on the residual network

1

2 4

3 5

2

26

7

-7

-2

-2

-1

-4

-6

Find a negative cost cycle, if there is one.

5

Page 9: 15.082 and 6.855J

9

Send flow around the cycle

1

2 4

3 5

Send flow around the negative cost cycle

The capacity of this cycle is 10.

Form the next residual network.

20

2010

Page 10: 15.082 and 6.855J

10

Capacities on the residual network

1

2 4

3 5

10

10

5

20

10 2025

15

10

1510

Page 11: 15.082 and 6.855J

11

Costs in the residual network

1

2 4

3 5

12

2

5

6

7

-7

-6

-2

-1

-4

Find a negative cost cycle, if there is one.

Page 12: 15.082 and 6.855J

12

Send Flow Around the Cycle

1

2 4

3 5

Send flow around the negative cost cycle

The capacity of this cycle is 5.

Form the next residual network.

10

5

10 20

Page 13: 15.082 and 6.855J

13

Capacities on the residual network

1

2 4

3 5

5

10

25

5 1525

15

10

2010

5

5

Page 14: 15.082 and 6.855J

14

Costs in the residual network

1

2 4

3 5

12

2

7

-7

-6

-2

-1

-4

4

-25

Find a negative cost cycle, if there is one.

Page 15: 15.082 and 6.855J

15

Send Flow Around the Cycle

Send flow around the negative cost cycle

The capacity of this cycle is 5.

Form the next residual network.

1

2 4

3 510

105

Page 16: 15.082 and 6.855J

16

Capacities on the residual network

1

2 4

3 5

5

15

25

5 2025

20

5

205

5

Page 17: 15.082 and 6.855J

17

Costs in the residual network

1

2 4

3 5

12

2

7

-7

-6

-2

-1

-4

4

5

Find a negative cost cycle, if there is one.

There is no negative cost cycle. But what is the proof?

Page 18: 15.082 and 6.855J

18

Compute shortest distances in the residual network

1

2 4

3 5

12

2

7

-7

-6

-2

-1

-4

4

5

Let d(j) be the shortest path distance from node 1 to node j.

Next let (j) = -d(j)

0

7 11

1210

And compute c

Page 19: 15.082 and 6.855J

19

Reduced costs in the residual network

1

2 4

3 5

0

7 11

1210

0

0

2

0 -0

40 0

0

0

1

The reduced costs in G(x*) for the optimal flow x* are all non-negative.