flows in planar graphs

54
Flows in Planar Graphs Hadi Mahzarnia

Upload: carr

Post on 22-Feb-2016

91 views

Category:

Documents


4 download

DESCRIPTION

Flows in Planar Graphs. Hadi Mahzarnia. Outline. Introduction Planar single commodity flow Multicommodity flows for C 1 Feasibility Algorithm DELTAFLOW Algorithm MULTIFLOW1 Multicommodity flows for C a Feasibility Algorithm MULTIFLOW2. Introduction. A Classic Problem: - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Flows in Planar Graphs

Flows in Planar Graphs

Hadi Mahzarnia

Page 2: Flows in Planar Graphs

OutlineO IntroductionO Planar single commodity flowO Multicommodity flows for C1

O FeasibilityO Algorithm DELTAFLOWO Algorithm MULTIFLOW1

O Multicommodity flows for CaO FeasibilityO Algorithm MULTIFLOW2

2

Page 3: Flows in Planar Graphs

IntroductionO A Classic Problem:

O Finding the maximum flow of a single commodity in an arbitrary directed graph

O The key theorem: O Max Flow-Min Cut theorem(Ford &

Fulkerson) which holds for single commodity and two-commodity flow

O There exist efficient algorithms( o(nm log n) ) for the classic problem

3

Page 4: Flows in Planar Graphs

Our Situation(1)O More than two commodityO No true polynomial time algorithm is

known on general graphsO Problem statements :

O Test the feasibility of flowsO Finding the flows

O Can be formulated as a linear program, thus it can be solved by the simplex or other LP methods

4

Page 5: Flows in Planar Graphs

Our Situation(2)O We concentrate on planar undirected

graphs

O It has been established that the Max Flow-Min Cut theorem of multicommodity type holds for the following four classes of planar undirected graphs

5

Page 6: Flows in Planar Graphs

Class 1; C1

O All sources and sinks are located on a specified face boundary

6

S1

S2

S3

t2

t1

t3

Page 7: Flows in Planar Graphs

Class 2; C12O All sources and sinks are located on

two specified face boundaries with each source-sink pair on the same boundary

7

S1t1

t2

S2

Page 8: Flows in Planar Graphs

Class 3; C01O Some source-sink pairs are located on a

specified face boundary, and all the other pairs share a common sink located on the boundary(their sources may be located anywhere)

8

t3t4

S3

S4

S2

S1

t1

t2

Page 9: Flows in Planar Graphs

Class 4; CaO All the sources can be joined with

the corresponding sinks without violating planarity

9

S1t1

S2

t2

Page 10: Flows in Planar Graphs

DefinitionO A (flow) network N=(G, P, c) is a triplet,

where:(i) G = (V, E) is a finite undirected graph

with vertex set V and edge set E;(ii) P is the set of source-sink pairs(si, ti),

where source si and sink ti are distinguished vertices.

(iii) c: E R+ is the capacity function O A network N is planar if G is planar, and

is a K-network if it has K source-sink pairs

10

Page 11: Flows in Planar Graphs

O Each source-sink pair is given a nonnegative demand di ≥ 0

O Although G is undirected, we orient the edges so that the sign of a value of a flow function can indicate the real direction of the flow in an edge

11

Page 12: Flows in Planar Graphs

12

Page 13: Flows in Planar Graphs

A Three-commodity flow

13

S1

S2

S3

t2

t1

t3

Page 14: Flows in Planar Graphs

Planar single-commodity flow

O The N is a 1-network in class Ca.

O The algorithm starts with zero flow and pushes flow as much as possible through the upper-most path.

14

Page 15: Flows in Planar Graphs

Uppermost path algorithms

15

Page 16: Flows in Planar Graphs

O Theorem 11.1 : the uppermost path algorithm finds a maximum flow, whose value is equal to the minimum cut separating s and t.

O Proof: by induction on the number of edges.

16

Page 17: Flows in Planar Graphs

O The algorithm merely executes the shortest path computation on the dual of G=(V, E)O Ga Obtained from G by adding an edge

joining s and t of infinite capacity.O Let Ga

* (V*, E*) be the dual of Ga.

O Define a length function l on E* and potential function u on V* .

O A maximum flow function f can simply be constraucted as follows: f(i,j) = u(j *) – u(i *)

17

Page 18: Flows in Planar Graphs

18

S

t

t*

S*

Page 19: Flows in Planar Graphs

19

Page 20: Flows in Planar Graphs

Multimodality flows for C1

O Preliminary:O We generically denote by B the boundary of the

outer face of G. Also use B for the set of edges on B.

O The boundary B is a cycle if G is 2-connected, but is a closed walk in general.

O B may has some bridges in general.O Vertices on B are v0, v1, …, vb taken in clockwise order.O Further we may assume without loss of generality

that the given planar graph G is connected.O E(x,y) : set of edges between x and y with capacity

c(x, y) and demand d(x,y)O E(x) = E(x, v-x) is called a cutO E(x) is a cutset If G – E(x) has exactly two

connected components.

20

Page 21: Flows in Planar Graphs

21

Page 22: Flows in Planar Graphs

22

Page 23: Flows in Planar Graphs

Feasibility in C1

23

Page 24: Flows in Planar Graphs

24

Page 25: Flows in Planar Graphs

25

Page 26: Flows in Planar Graphs

Test the Feasibility

26

Page 27: Flows in Planar Graphs

Test the Feasibility

27

Page 28: Flows in Planar Graphs

O We shall compute c(e, e’) and d(e, e’) quickly

O We can compute d(e, e’) for e fixed e and all e’ in o(k+b) time. These values can be easily updated for the new e next to the current e on B. Thus we can compute d(e, e’) in o(k+b2) time.

28

Page 29: Flows in Planar Graphs

O To compute the c(e, e’), first construct a new graph G* as follows:O Replace every edge on B by a pair of

multiple edge.O Construct the dual of G.O Delete the outer vertex.O Define the length function using the

capacities.O The minimum value of c(e, e’) in G is equal to

the shortest path between vertices corresponding e and e’ in G*.

29

Page 30: Flows in Planar Graphs

30

S1

t1

Page 31: Flows in Planar Graphs

O We can compute c(e, e’) in o(T(n)) time for a fixed e and in o(bT(n)) or o(Tall(n)) for all e.

O Above all the feasibility can be tested in o(bT(n)) or o(Tall(n)) time.

31

Page 32: Flows in Planar Graphs

Algorithm: DELTAFLOW

32

Page 33: Flows in Planar Graphs

33

Page 34: Flows in Planar Graphs

34

Page 35: Flows in Planar Graphs

O DELTAFLOW terminates finitely if the capacities and demands are all integers. However this is not the case if they are real valued.

O There are three obstructions to the correctness of polynomial boundedness of DELTAFLOW.

35

Page 36: Flows in Planar Graphs

Obstructions… 1. If edge e0 is selected arbitrarily DELTAFLOW

does not always terminates in polynomial time: when there exists an edge e of infinite capacity of the boundary b, DELTAFLOW possibly lets a flow go and return infinitely many times through e.

2. The number of source sink pairs increases and the representation of flow functions would require a greate deal of space.

3. The new graph G’ may be disconnected even if G is connected.

36

Page 37: Flows in Planar Graphs

Algorithm MULTIFLOW1

O MULTIFLOW1 finds multicommodity flows in planar networks which spends O(kn+nT(n)) time and O(kn) space.

O MULTIFLOW1 uses the operation of DELTAFLOW but is improved under three obstructions mentioned before.

37

Page 38: Flows in Planar Graphs

Obstruction 1O First select an arbitrary edge e0=(v0,v1) on

B; apply the operation of DELTAFLOW for e0 with respect to each flow having v0 as a source, in the order that the corresponding sink appears on B in clockwise order (procedure PUSH(N,e0)).

O Next select the edge clockwise next to e0 on B as the new e0.

O Repeat this procedure until there exists no source-sink pairs.

38

Page 39: Flows in Planar Graphs

Obstruction 2O Although MULTIFLOW1 also makes a

new source-sink pair it does not introduce the new flow function fk+1 , but simply attaches to the pair a number indicating the kind of commodity between sk+1 and tk+1.

39

Page 40: Flows in Planar Graphs

Obstruction 3O If graph G’ is disconnected by the

deletion of edge e0 then we find multicommodity flows in each connected component of G’. Note that G’ consists of two components.

40

Page 41: Flows in Planar Graphs

41

Page 42: Flows in Planar Graphs

O Procedure ROTATE(N, e0)This procedure rotates e0 around B in clockwise

order using procedure PUSH(N,e0)

O PUSH(N,e0)This procedure pushes flows through e0 by applying

the operation of DELTAFLOW to each flow having v0 as a source, in the order that the corresponding sink appears on B in clockwise order. Note that c(e0) may decrease when the procedure terminates.

42

Page 43: Flows in Planar Graphs

O Theorem 11.3Algorithm MULTIFLOW1 correctly find multicommodity flows of given demands in a planar network N=(G,P,c) if all the souces and sinks are on the boundary of the outer face of a planar graph G. It spends O(kn+nT(n)) time and O(kn) space if there are n vertices and k source-sink pairs.

43

Page 44: Flows in Planar Graphs

Directed Graphs

44

1

1 1 1

2

s2

s1

t1

t2

d1=1d2=2

Page 45: Flows in Planar Graphs

Multicommodity Flows fo Ca

O All the sources can be joined with the corresponding sinks without violating planarity

45

S1t1

S2

t2

Page 46: Flows in Planar Graphs

Feasibility O Theorem 11.4

A network N belonging to class Ca has multicommodity flows if and only if N satisfies the cut condition.

O We present an account of how to quickly check the feasibility using theorem 11.4

46

Page 47: Flows in Planar Graphs

Some Defenitions

47

Page 48: Flows in Planar Graphs

O If E(X) is a cut set of G, then Ea(X) is a cut set of Ga and hence corresponds to a cycle of Ga*

O Thus theorem 11.4 and lemma 11.1 imply that network N has multicommodity flows of given demands iff Ga* has no negative cycle

O Hence the feasibility can be tested simply by checking the existence of negative cycle in Ga*

48

Page 49: Flows in Planar Graphs

49

Page 50: Flows in Planar Graphs

Algorithm MULTIFLOW2

O Each demand edge eai , 1≤i≤k, adjoins two faces Fi1 and Fi2 of the planar graph Ga

O Let Qi1 be the path joining si and ti on the boundary of Fi1 without passing through eai. Similarly define Qi2 with respect to Fi2.

O MULTIFLOW2 is outlined as follows:50

Page 51: Flows in Planar Graphs

Algorithm MULTIFLOW2

O Choose an appropriate path Qij among 2k ones;

O push appropriate units D of flow fi through Qij;

O reduced by D the demand di and the capacities of edges in Qij; and delete saturated edges if any.

O Repeat this operation until k-commodity flows of given demands are obtained.

51

Page 52: Flows in Planar Graphs

52

Page 53: Flows in Planar Graphs

53

Page 54: Flows in Planar Graphs

O Theorem 11.6If network N belongs to class Ca, then MULTIFLOW2 finds k-commodity flows satisfying given demands in O(n5/2log n) time, using O(kn) space.

54