15.082 and 6.855J

Preview:

DESCRIPTION

15.082 and 6.855J. The Goldberg-Tarjan Preflow Push Algorithm for the Maximum Flow Problem. Preflow Push. 4. 2. 5. 1. 3. 1. 1. 2. 4. s. 4. t. 3. 2. 1. 3. This is the original network, and the original residual network. 5. 4. 3. 2. 1. 0. Initialize Distances. 4. 2. 2. - PowerPoint PPT Presentation

Citation preview

15.082 and 6.855J

The Goldberg-Tarjan Preflow Push Algorithm for the Maximum Flow

Problem

Preflow Push

4

11

4

21

2

3

3

1

s

2

4

5

3

t

This is the original network, and the original residual network.

Initialize Distances

4

11

4

21

2

3

3

1

s

2

4

5

3

t

The node label henceforth will be the distance label.

0

5

4

3

2

1

t

4 53

s2

d(j) is at most the distance of j to t in G(x)

02

2

1

1

1

Saturate Arcs out of node s

4

11

4

21

2

3

3

1

s

2

4

5

3

t

Saturate arcs out of node s.

0

5

4

3

2

1

t

4 53

s2

Move excess to the adjacent arcs

02

2

1

1

1

3

2

12

13

6s

s

Relabel node s after all incident arcs have been saturated.

2

3 4

Select, then relabel/push

4

11

4

21

2

3

3

1

s

2

4

5

3

t

Select an active node, that is, one with excess

0

5

4

3

2

1

t

4 53

s2

Push/Relabel

02

2

1

1

1

3

2

12

13

6s

s

Update excess after a push

11

Select, then relabel/push

4

11

4

21

2

3

3

1

s

2

4

5

3

t

Select an active node, that is, one with excess

0

5

4

3

2

1

t

4 53

s202

2

1

1

1

3

2

12

1

6s

s

No arc incident to the selected node is admissible. So relabel.

11

23

3

Select, then relabel/push

4

11

4

21

2

3

3

1

s

2

4

5

t

Select an active node, that is, one with excess

0

5

4

3

2

1

t

4 5

s202

2

1

1

3

2

26

s

s

Push/Relabel

1

2

3

21

31

2

3

Select, then relabel/push

4

11

4

21

2

3

3

1

s

2

4

5

t

Select an active node.

0

5

4

3

2

1

t

4 5

s202

2

1

1

3

2

26

s

s

Push/Relabel

1

2

3

21

31

2

3 31

32

2

1

5

Select, then relabel/push

4

11

4

21

2

3

3

1

s

2

4

5

t

Select an active node.

0

5

4

3

2

1

t

4 5

s202

2

1

12

26

s

s

Push/Relabel

1

2

3

21

31

2

31

3

2

1

Select, then relabel/push

4

11

4

21

2

3

3

1

s

2

4

5

t

Select an active node.

0

5

4

3

2

1

t

4 5

s202

2

1

12

26

s

s

There is no incident admissible arc. So Relabel.

1

2

3

21

31

2

31

3

2

12

5

5

Select, then relabel/push

4

11

4

21

2

3

3

1

s

2

4

5

t

Select an active node.

0

5

4

3

2

1

t

4

5s202

2

1

12

26

s

s

Push/Relabel

1

2

3

21

3

2

31

3

2

22

1

41

Select, then relabel/push

4

11

4

21

2

3

3

1

s

2

4

5

t

Select an active node.

0

5

4

3

2

1

t

4

5s202

2

1

12

26

s

s

There is no incident admissible arc. So relabel.

1

2

3

21

3

2

31

3

2

22

1

41

3

5

5

Select, then relabel/push

4

11

4

21

2

3

3

1

s

2

4

5

t

Select an active node.

0

5

4

3

2

1

t

4 5

s202

2

1

12

26

s

s

Push/Relabel

1

2

3

21

3

2

31

3

2

22

1

41

3

5

5

3

Select, then relabel/push

4

11

4

21

2

3

3

1

s

2

4

5

t

Select an active node.

0

5

4

3

2

1

t

4 5

s202

2

1

12

26

s

s

Push/Relabel

1

2

3

21

3

22

222

41

3

5

5

3

1

141

4

Select, then relabel/push

4

11

4

21

2

3

3

1

s

2

4

5

t

Select an active node.

0

5

4

3

2

1

t

4 5

s202

2

1

12

26

s

s

Push/Relabel

1

2

3

21

3

22

222

41

3

5

5

3

1

4

24

2

2

Select, then relabel/push

4

11

4

21

2

3

3

1

s

2

4

5

t

Select an active node.

0

5

4

3

2

1

t

4 5

s02

2

1

12

26

s

s

Push/Relabel

1

2

3

21

3

22

222

41

3

5

5

3

1

4

4

2

4

Select, then relabel/push

4

11

4

21

2

3

3

1

s

2

4

5

t

Select an active node.

0

5

4

3

2

1

t

4 5

s02

2

1

12

26

s

s

Push/Relabel

1

2

3

21

3

21

322

41

3

5

5

3

1

4

4

2

4 35

5

5

Select, then relabel/push

4

11

4

21

2

3

3

1

s

2

4

5

t

One can keep pushing flow between nodes 2 and 5 until eventually all flow returns to node s.

0

5

4

3

2

1

t

4 5

s02

2

1

12

26

s

s

There are no paths from nodes 2 and 5 to t, and there are ways to speed up the last iterations.

1

2

3

21

3

21

322

41

3

5

5

3

1

4

4

2

4 35

5

5

Recommended