Presentation is loading. Please wait.

Presentation is loading. Please wait.

Flows in Planar Graphs Hadi Mahzarnia. Outline O Introduction O Planar single commodity flow O Multicommodity flows for C 1 O Feasibility O Algorithm.

Similar presentations


Presentation on theme: "Flows in Planar Graphs Hadi Mahzarnia. Outline O Introduction O Planar single commodity flow O Multicommodity flows for C 1 O Feasibility O Algorithm."— Presentation transcript:

1 Flows in Planar Graphs Hadi Mahzarnia

2 Outline O Introduction O Planar single commodity flow O Multicommodity flows for C 1 O Feasibility O Algorithm DELTAFLOW O Algorithm MULTIFLOW1 O Multicommodity flows for C a O Feasibility O Algorithm MULTIFLOW2 2

3 Introduction O 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

4 Our Situation(1) O More than two commodity O No true polynomial time algorithm is known on general graphs O Problem statements : O Test the feasibility of flows O Finding the flows O Can be formulated as a linear program, thus it can be solved by the simplex or other LP methods 4

5 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

6 Class 1; C 1 O All sources and sinks are located on a specified face boundary 6 S1S1 S2S2 S3S3 t2t2 t1t1 t3t3

7 Class 2; C 12 O All sources and sinks are located on two specified face boundaries with each source- sink pair on the same boundary 7 S1S1 t1t1 t2t2 S2S2

8 Class 3; C 01 O 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 t3t3 t4t4 S3S3 S4S4 S2S2 S1S1 t1t1 t2t2

9 Class 4; C a O All the sources can be joined with the corresponding sinks without violating planarity 9 S1S1 t1t1 S2S2 t2t2

10 Definition O 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(s i, t i ), where source s i and sink t i 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

11 O Each source-sink pair is given a nonnegative demand d i ≥ 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

12 O 12

13 A Three-commodity flow 13 S1S1 S2S2 S3S3 t2t2 t1t1 t3t3

14 Planar single-commodity flow O The N is a 1-network in class C a. O The algorithm starts with zero flow and pushes flow as much as possible through the upper-most path. 14

15 Uppermost path algorithms O 15

16 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

17 O The algorithm merely executes the shortest path computation on the dual of G=(V, E) O G a Obtained from G by adding an edge joining s and t of infinite capacity. O Let G a * (V*, E*) be the dual of G a. 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

18 18 S t t* S*

19 O 19

20 Multimodality flows for C 1 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 v 0, v 1, …, v b 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 cut O E(x) is a cutset If G – E(x) has exactly two connected components. 20

21 O 21

22 O 22

23 Feasibility in C 1 O 23

24 O 24

25 O 25

26 Test the Feasibility O 26

27 Test the Feasibility O 27

28 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+b 2 ) time. 28

29 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

30 30 S1S1 t1t1

31 O We can compute c(e, e’) in o(T(n)) time for a fixed e and in o(bT(n)) or o(T all (n)) for all e. O Above all the feasibility can be tested in o(bT(n)) or o(T all (n)) time. 31

32 Algorithm: DELTAFLOW O 32

33 O 33

34 34

35 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

36 Obstructions … 1. If edge e 0 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

37 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

38 Obstruction 1 O First select an arbitrary edge e 0 =(v 0,v 1 ) on B; apply the operation of DELTAFLOW for e 0 with respect to each flow having v 0 as a source, in the order that the corresponding sink appears on B in clockwise order (procedure PUSH(N,e 0 )). O Next select the edge clockwise next to e 0 on B as the new e 0. O Repeat this procedure until there exists no source-sink pairs. 38

39 Obstruction 2 O Although MULTIFLOW1 also makes a new source-sink pair it does not introduce the new flow function f k+1, but simply attaches to the pair a number indicating the kind of commodity between s k+1 and t k+1. 39

40 Obstruction 3 O If graph G’ is disconnected by the deletion of edge e 0 then we find multicommodity flows in each connected component of G’. Note that G’ consists of two components. 40

41 O 41

42 O Procedure ROTATE(N, e 0 ) This procedure rotates e 0 around B in clockwise order using procedure PUSH(N,e 0 ) O PUSH(N,e 0 ) This procedure pushes flows through e 0 by applying the operation of DELTAFLOW to each flow having v 0 as a source, in the order that the corresponding sink appears on B in clockwise order. Note that c(e 0 ) may decrease when the procedure terminates. 42

43 O Theorem 11.3 Algorithm 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

44 Directed Graphs 44 1 1 1 1 2 s2s2 s1s1 t1t1 t2t2 d 1 =1 d 2 =2

45 Multicommodity Flows fo C a O All the sources can be joined with the corresponding sinks without violating planarity 45 S1S1 t1t1 S2S2 t2t2

46 Feasibility O Theorem 11.4 A network N belonging to class C a 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

47 Some Defenitions O 47

48 O If E(X) is a cut set of G, then E a (X) is a cut set of G a and hence corresponds to a cycle of G a * O Thus theorem 11.4 and lemma 11.1 imply that network N has multicommodity flows of given demands iff G a * has no negative cycle O Hence the feasibility can be tested simply by checking the existence of negative cycle in G a * 48

49 O 49

50 Algorithm MULTIFLOW2 O Each demand edge e ai, 1≤i≤k, adjoins two faces F i1 and F i2 of the planar graph G a O Let Q i1 be the path joining s i and t i on the boundary of F i1 without passing through e ai. Similarly define Q i2 with respect to F i2. O MULTIFLOW2 is outlined as follows: 50

51 Algorithm MULTIFLOW2 O Choose an appropriate path Q ij among 2k ones; O push appropriate units D of flow f i through Q ij ; O reduced by D the demand d i and the capacities of edges in Q ij ; and delete saturated edges if any. O Repeat this operation until k-commodity flows of given demands are obtained. 51

52 O 52

53 O 53

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


Download ppt "Flows in Planar Graphs Hadi Mahzarnia. Outline O Introduction O Planar single commodity flow O Multicommodity flows for C 1 O Feasibility O Algorithm."

Similar presentations


Ads by Google