Global Constraints. Combinatorial Problem Solving (CPS) Enric Rodríguez-Carbonell (based on materials by Javier Larrosa) February 22, 2019

Size: px
Start display at page:

Download "Global Constraints. Combinatorial Problem Solving (CPS) Enric Rodríguez-Carbonell (based on materials by Javier Larrosa) February 22, 2019"

Transcription

1 Global Constraints Combinatorial Problem Solving (CPS) Enric Rodríguez-Carbonell (based on materials by Javier Larrosa) February 22, 2019

2 Global Constraints Global constraints are classes o constraints deined by a Boolean ormula o arbitrary arity E.g., the alldi(x 1,...,x n ) constraint orces that all the values o integer variables x 1,...,x n must be dierent E.g., the alo(x 1,...,x n ) constraint orces that at least one o the Boolean variables x 1,...,x n is set to true. E.g., the amo(x 1,...,x n ) constraint orces that at most one o the Boolean variables x 1,...,x n is set to true. The dual graph translation does not work well in practice. 2 / 47

3 AC or Non-binary Problems Can be naturally extended rom the binary case Value a d i is AC wrt. (non-binary) constraint c C i there exists an assignment τ (the support o a) such that: τ assigns a value to exactly the variables in scope(c) τ[x i ] = a c(τ) holds Constraint c C is AC i every a d i o every x i scope(c) has a support in c A CSP is AC i all its constraints are AC For non-binary constraints, arc consistency is also called hyperarc consistency, generalized arc consistency or domain consistency 3 / 47

4 Example Consider the constraint 3x+2y +z > 3 over x,y,z {0,1} Value 1 or x is AC: τ = (x 1,y 1,z 1) is a support Value 0 or x is not AC: it does not have any support. Hence, the constraint is not AC 4 / 47

5 Example Note that AC depends on the syntax Consider x 1 {a,b}, x 2 {a,b}, x 3 {a,c,d} Case 1: constraints are x i x j or all i < j All constraints are arc-consistent Case 2: there is only one constraint alldi(x 1,x 2,x 3 ) Value a or x 1 is AC because τ = (x 1 a,x 2 b,x 3 c) is a support or it. Value a or x 3 is not AC: does not have any support Hence, the constraint is not AC 5 / 47

6 Enorcing AC: Revise(i, c) Natural extension o binary case Removes domain values o x i without a support in c // Let (x 1,...,x i 1,x i,x i+1...,x k ) be the scope o c unction Revise(i, c) change := alse or each a d i do i a1 d 1,...,a i 1 d i 1,a i+1 d i+1,...,a k d k c(x 1 a 1,...,x i a,...,x k a k ) remove a rom d i change := true return change The time complexity o Revise(i,c) is O(k d 1 d k ) (assuming that evaluating a constraint takes linear time in the arity) 6 / 47

7 AC-3 The natural extension o binary AC-3 (i,c) Q means that we cannot guarantee that all domain values o x i have a support in c procedure AC3(X, D, C) Q := {(i,c) c C,x i scope(c)} while Q do (i,c) := Fetch(Q) // selects and removes i Revise(i, c) then Q := Q {(j,c ) c C,c c,j i,{x i,x j } scope(c )} Let m = max i { d i }, e = C and k = max c { scope(c) } Time complexity: O(e k 3 m k+1 ) Space complexity: O(e k) 7 / 47

8 AC or non-binary constraints Enorcing AC with generic algorithms is exponentially expensive in the maximum arity o the CSP Only practical with constraints o very small arity Is it possible to develop constraint-speciic algorithms? procedure Revise(c) // removes every arc-inconsistent value a d i or all x i X(c) endprocedure Next: alldi constraint... but irst a diversion to matching theory 8 / 47

9 Begin Matching Theory 9 / 47

10 Deinitions Given a graph G = (V,E), a matching M is a set o pairwise non-incident edges A vertex is matched or covered i it is an endpoint o some e M, and it is ree otherwise A maximum matching is a matching that contains the largest possible number o edges (edges in the matching, in blue) In particular, a perect matching matches all vertices o the graph 10 / 47

11 Example We have to organize one round o a ootball league. Compatibility relation between teams is given by a graph B D F A C E Perect matchings easible arrangements o matches 11 / 47

12 Bipartite Matching Graph G = (V,E) is bipartite i there is a partition (L,R) o V (i.e., L R = V,L R = ) such that each e E connects a vertex in L to one in R Now ocus on maximum bipartite matching problem: given a bipartite graph, ind a matching o maximum size From now on, assume V 2 E (isolated vertices can be removed) 12 / 47

13 Example (I) Assignment problem: n workers, m tasks list o pairs (w,t) meaning: worker w can do task t Maximum matchings tell how to assign tasks to workers so that the maximum number o tasks are carried out A Algebra B Calculus C D Geometry 13 / 47

14 Example (II) We have n variables x 1,...,x n Variable x i can take values in D i Z inite (1 i n) Constraint alldierent(x 1,...,x n ) imposes that variables should take dierent values pairwise 1 D 1 = {1} D 2 = {1,2,3} D 3 = {4} x 1 x x 3 4 Matchings covering x 1,...,x n correspond to solutions to alldierent(x 1,...,x n ) 14 / 47

15 Augmenting Paths Let M be a matching o G = (V,E) (not necessarily bipartite). We view paths as sequences o edges rather than vertices. An alternating path is a simple path in which the edges belong alternatively to M and not to M. An alternating cycle is a cycle in which the edges belong alternatively to M and not to M. An augmenting path is an alternating path that starts and ends at dierent ree vertices. Berge s Lemma. A matching is maximum i and only i it does not have any augmenting path. 15 / 47

16 Properties (I) An alternating cycle has as many edges in M as not in M An augmenting path has 1 more edge not in M than in M Given two sets A,B X, their symmetric dierence is A B = (A B) (B A) I P is an augmenting path wrt. M, then M P is a matching and M P = M +1 I.e., i we paint edges M in blue and edges M in red, then lipping the colors o P results in a valid matching 16 / 47

17 Proo o Berge s Lemma (I) Let us prove the contrapositive: G has a matching larger than M i and only i G has an augmenting path wrt. M ( ) Just proved in the last slide. 17 / 47

18 Proo o Berge s Lemma (II) ( ) Let M be a matching in G larger than M. Each vertex o M M has degree at most two: incident with 1 edge rom M and 1 edge rom M So M M is a vertex-disjoint union o simple paths and cycles. Furthermore, paths and cycles in M M are alternating (wrt. M, and wrt. M ) Edges M, M Edges M, M 18 / 47

19 Proo o Berge s Lemma (III) ( ) (cont.) Since M > M, M M must contain at least one connected component that has more edges rom M than rom M. Such a component is a simple path in G that starts and ends at dierent vertices with edges M. The extreme vertices are ree. So the path is augmenting. 19 / 47

20 Aug. Paths in Bipartite Graphs Idea: Starting rom the empty matching, increase the size o the current matching by inding augmenting paths Now assume the graph is bipartite. For inding augmenting paths, do the ollowing: 1. Mark vertices as matched or ree. 2. Start DFS (Depth First Search) or BFS (Breadth First Search) rom each o the ree vertices in L. 3. Traverse edges M rom L to R. 4. Traverse edges M rom R to L. 5. Stop successully i a ree vertex rom R is reached. 6. Stop with ailure i search terminates without inding a ree vertex rom R. Cost: O( E ) 20 / 47

21 Algorithm int MAX_BIPARTITE_MATCHING(bipartite_graph G) { M = ; P = AUG_PATH(G, M); while (P!= NULL) { M = M P; P = AUG_PATH(G, M); } return M.size(); } Cost: O( V E ) Each iteration costs O( E ) At each iteration 2 new vertices are matched (one rom L and one rom R) So at most min( L, R ) = O( V ) iterations suice 21 / 47

22 Example Bipartite graph G = (L R,E) Initially matching M is empty. Blue edges: e M Red edges: e M Let us look or an augmenting path using DFS. L R 22 / 47

23 Example Mark vertices as matched (m) or ree (). Start at a ree vertex in L. Let right: red edges Right let: blue edges 22 / 47

24 Example Found a ree vertex in R. Found an augmenting path. 22 / 47

25 Example Flip colors o augmenting path and a new M is obtained 22 / 47

26 Example Let us look or another augmenting path. By symmetry. 22 / 47

27 Example Let us look or another augmenting path. Mark vertices as matched (m) or ree (). Start at a ree vertex in L. Let right: red edges Right let: blue edges m m m m 22 / 47

28 Example m Found a ree vertex in R. Found an augmenting path. m m m 22 / 47

29 Example Flip colors o augmenting path and a new M is obtained 22 / 47

30 Example By symmetry. No more augmenting paths, M is a maximum matching 22 / 47

31 Hopcrot-Karp Algorithm I P 1,...,P k are vertex-disjoint augmenting paths wrt. M, then M (P 1 P k ) is a matching o M +k edges Idea: instead o inding 1 augmenting path per iteration, let us ind a maximal set o vertex-disjoint shortest augmenting paths This reduces the number o iterations rom O( V ) to O( V ) int HOPCROFT_KARP( bipartite_gra G) { M = ; S = MAXIMAL_SET_VD_SHORTEST_AUG_PATHS(G, M ); while (S!= ) { M = M { P P S }; S = MAXIMAL_SET_VD_SHORTEST_AUG_PATHS(G, M ); } return M.size(); } 23 / 47

32 Max. Vertex-Disjoint Shortest AP Let us ind a maximal set o vertex-disjoint shortest augmenting paths Let l be the length o the shortest augmenting paths wrt. M Goal: compute a maximal (not necessarily maximum) set o vertex-disjoint augmenting paths o length l Phase 1: compute length l and augmenting paths o length l 1. BFS but start simultaneously at all ree vertices in L 2. Traverse edges M rom L to R 3. Traverse edges M rom R to L 4. I a ree vertex is ound in R: current distance is l, the length o the shortest augmenting paths 5. Complete BFS ater inding all ree vertices in R at distance l 24 / 47

33 Max. Vertex-Disjoint Shortest AP We need augmenting paths to be vertex-disjoint Phase 2: ensure vertex-disjointness and maximality Let X be the set o all ree vertices in R at distance l 1. Compute DFS rom u X to the ree vertices in L, using the BFS distances to guide the search: the DFS is only allowed to ollow edges that lead to an unused vertex in the previous distance layer the DFS must alternate between matched and unmatched edges. 2. Once an augmenting path is ound, mark its vertices as used and continue the DFS rom the next u X. Cost o Phase 1: O( E ) (1 single BFS!) Cost o Phase 2: O( E ) (1 single DFS!) 25 / 47

34 Progress in Hopcrot-Karp Theorem. Let: l = length o a shortest augmenting path wrt. M P 1,...,P k = a maximal set o vertex-disjoint shortest augmenting paths wrt. M M = M (P 1... P k ) P = a shortest augmenting path with respect to M Then P > l. I.e., rom one iteration to the next one, the length o the shortest augmenting path increases 26 / 47

35 Progress in Hopcrot-Karp Proo. Let us consider two cases: 1. P is vertex-disjoint rom P 1,...,P k. By contradiction. Since P is an augmenting path wrt. M and is vertex-disjoint rom P 1,...,P k, P is an augmenting path wrt. M. Then P l. I P = l, then P is a shortest augmenting path wrt. M. But this contradicts the maximality o P 1,...,P k. So P > l. 27 / 47

36 Progress in Hopcrot-Karp 2. P is not vertex-disjoint rom P 1,...,P k. By de., M = M (P 1... P k ). So M M = (M M) (P 1... P k ) = P 1... P k. So H := M M P = (P 1... P k ) P. But H is a set o vertex-disjoint cycles and simple paths. And M P M = M P M + M M = k +1 So there are at least k +1 simple paths in H that use more edges rom M P than rom M. Each o these is an augmenting path wrt. M. So H contains k+1 vertex-disjoint augmenting paths with respect to M, each o which o length l. 28 / 47

37 Progress in Hopcrot-Karp (cont.) So H = (P 1... P k ) P (k +1)l. Hence (P 1... P k ) P + P (P 1... P k ) (k+1)l As P 1,...,P k are vertex-disjoint and have length l, they contribute to (P 1... P k ) P with at most kl distinct edges. So P (P 1... P k ) contributes with at least l edges to the inequality. I.e., P (P 1... P k ) l. So P = P (P 1... P k ) + P (P 1... P k ) l+ P (P 1... P k ) Now let us see that P (P 1... P k ) 1 Let v be a vertex shared by P and some P i. As P i is an augmenting path wrt. M, there is an edge e P i M with endpoint v. So e M and e is the only edge o M with endpoint v. As v is matched in M, v P and P is an augmenting path wrt. M, there is a unique edge in P M with endpoint v, which must be e. So we have that e P P i, that P (P 1... P k ) 1, and P > l 29 / 47

38 Complexity o Hopcrot-Karp We already know that each iteration takes O( E ) time. Theorem. Hopcrot-Karp runs in O( V E ) time. (actually, in O( min( L, R ) E ) time) Best known algorithm or bipartite matching. Lema. Hopcrot-Karp takes at most 2 min( L, R ) iterations. Proo. Wlog. let us assume that L R. Ater L iterations: 1. either the algorithm terminated because a maximum matching was ound, or 2. a matching M was obtained or which the shortest augmenting path (wrt. M) has length 2 L / 47

39 Complexity o Hopcrot-Karp Proo. (contd.) Assume 2. Let M be a maximum matching o G. M M contains at least M M vertex-disjoint augmenting paths with respect to M. Each o those paths has length 2 L +1. Since each vertex o M M has degree 2, M M is a vertex-disjoint union o simple paths and cycles. As the graph G is bipartite: 1. In a simple path P M M o odd length, the number o vertices rom L is ( P +1)/2, which is P /2. 2. In a simple path P M M o even length, the number o vertices rom L is P /2 or 1+ P /2, which is P /2. 3. In a cycle C M M (thus, o even length, as it is alternating), the number o vertices rom L is C /2. By vertex-disjointness, there are M M 2 vertices rom L in M M. So in L there are at least M M 2 dierent vertices. 31 / 47

40 Complexity o Hopcrot-Karp Proo. (contd.) Thus 2 L M M ( M M )(2 L +1) So M M 2 L = 2 L L 2 L +1 2 L +1 (2 L +1) L 2 L +1 = L. Hence, ater another at most L iterations, the algorithm is guaranteed to ind a maximum matching. 32 / 47

41 Example Bipartite graph G = (L R,E) Initially matching M is empty. Blue edges: e M Red edges: e M Let us look or a maximal set o shortest augmenting paths using BFS. L R 33 / 47

42 Example Mark vertices as matched (m) or ree (). Start at all ree vertices in L. Let right: red edges Right let: blue edges 33 / 47

43 Example Shortest augmenting path has length 1. Found all ree vertices in R at distance 1. Found maximal set o shortest aug. paths. (note that it is not maximum) 33 / 47

44 Example Flip colors o augmenting paths and new M is obtained 33 / 47

45 Example Another maximal set o shortest augmenting paths? Mark vertices as matched (m) or ree (). Start at all ree vertices in L. Let right: red edges Right let: blue edges m m m m 33 / 47

46 Example m Shortest augmenting path has length 3. Found all ree vertices in R at distance 3. Found maximal set o shortest aug. paths m m m 33 / 47

47 Example Flip colors o augmenting path and a new M is obtained No more augmenting paths, M is a maximum matching 33 / 47

48 End Matching Theory 34 / 47

49 Arc Consistency or alldi [reminder] Consider x 1 {1,2}, x 2 {2,3}, x 3 {2,3} and the constraint alldi(x 1,x 2,x 3 ) Value 1 or x 1 is AC since τ = (x 1 1,x 2 2,x 3 3) is a support or it. Value 2 or x 1 is not AC: it does not have any support (no room let or x 2,x 3 ) Ater enorcing AC: x 1 {1}, x 2 {2,3}, x 3 {2,3} 35 / 47

50 Value Graph o alldi Given variables X = {x 1,...,x n } with domains D 1,...,D n, the value graph o alldi(x 1,...,x n ) is the bipartite graph G = (X n i=1 D i,e) where (x i,v) E i v D i alldi(x 1,x 2,x 3 ) D 1 = {1,2} D 2 = {2,3} D 3 = {2,3} x 1 x 2 x / 47

51 Solutions and Matchings We say a matching M covers a set S i every vertex in S is covered (i.e, is an endpoint o an edge in M) Solutions to alldi(x) = matchings covering X alldi(x 1,x 2,x 3 ) D 1 = {1,2} D 2 = {2,3} D 3 = {2,3} x 1 = 1 x 2 = 2 x 3 = 3 x 1 x 2 x / 47

52 Solutions and Matchings We say a matching M covers a set S i every vertex in S is covered (i.e, is an endpoint o an edge in M) Solutions to alldi(x) = matchings covering X alldi(x 1,x 2,x 3 ) D 1 = {1,2} D 2 = {2,3} D 3 = {2,3} x 1 = 1 x 2 = 3 x 3 = 2 x 1 x 2 x / 47

53 Solutions and Matchings We say a matching M covers a set S i every vertex in S is covered (i.e, is an endpoint o an edge in M) Solutions to alldi(x) = matchings covering X alldi(x 1,x 2,x 3 ) D 1 = {1,2} D 2 = {2,3} D 3 = {2,3} x 1 = 1 x 2 = 3 x 3 = 2 x 1 x 2 x A matching covering X is a maximum matching There are solutions to alldi(x) i size o maximum matchings is X 37 / 47

54 Solutions and Matchings Algorithm or checking easibility o alldi(x): (with Hopcrot-Karp, in time O(dn n), where n = X, d = max i { D i }) // Returns true i there is a solution to alldi(x) // G is the value graph o alldi(x) M = COMPUTE MAXIMUM MATCHING(G) i ( M < X ) return alse return true 38 / 47

55 Solutions and Matchings Algorithm or checking easibility o alldi(x): (with Hopcrot-Karp, in time O(dn n), where n = X, d = max i { D i }) // Returns true i there is a solution to alldi(x) // G is the value graph o alldi(x) M = COMPUTE MAXIMUM MATCHING(G) i ( M < X ) return alse else REMOVE EDGES FROM GRAPH(G, M) return true But rather than checking easibility we want to ind arc-inconsistent values I alldi(x) has a solution then: value v rom the domain o variable x is arc-inconsistent i there is no solution to alldi(x) that assigns value v to x i there is no matching covering X that contains edge (x,v) i there is no maximum matching that contains edge (x,v) So we have to remove the edges not belonging to any maximum matching Next: we ll extend the algorithm to do so by using the matching M 38 / 47

56 Filtering A vital edge belongs to any maximum matching Theorem. Let M be an arbitrary maximum matching. An edge belongs to a maximum matching i it is vital; or it belongs to an alternating cycle wrt. M; or it belongs to an even-length simple alternating path starting at a ree vertex wrt. M x 1 x 2 x / 47

57 Filtering A vital edge belongs to any maximum matching Theorem. Let M be an arbitrary maximum matching. An edge belongs to a maximum matching i it is vital; or it belongs to an alternating cycle wrt. M; or it belongs to an even-length simple alternating path starting at a ree vertex wrt. M x 1 x 2 x / 47

58 Filtering Proo: ) Let us consider all cases: I edge e is vital, then by deinition it belongs to a maximum matching I e belongs to an alternating cycle P wrt. maximum matching M, then M and M P are maximum matchings, one contains e and the other does not Similary i e belongs to an even-length path starting at a ree vertex that is alternating wrt. maximum matching M 40 / 47

59 Filtering Proo: ) Let e be an edge that belongs to a maximum matching. Let us assume that e is not vital. Two cases: Suppose e M. Since e is not vital, there exists a maximum matching M such that e M. Then e M M. But M M is a vertex-disjoint union o: 41 / 47

60 Filtering Proo: ) Let e be an edge that belongs to a maximum matching. Let us assume that e is not vital. Two cases: Suppose e M. Since e is not vital, there exists a maximum matching M such that e M. Then e M M. But M M is a vertex-disjoint union o: Recall that M,M are maximum matchings 41 / 47

61 Filtering Proo: ) Let e be an edge that belongs to a maximum matching. Let us assume that e is not vital. Two cases: Suppose e M. Let M be a maximum matching such that e M (which exists by hypothesis). Then the same argument as beore applies. 41 / 47

62 Orienting Edges It simpliies things to orient edges: Matching edges are oriented rom let to right Free edges are oriented rom right to let x 1 x 2 x / 47

63 Orienting Edges Corollary. Let M be an arbitrary maximum matching. An edge belongs to a maximum matching i it belongs to a cycle wrt. M; or it belongs to a simple path starting at a ree vertex wrt. M; or it is vital in the oriented graph. x 1 x 2 x / 47

64 Removing Arc-Inconsistent Edges We will actually identiy AC edges, and the remaining ones will be non-ac An edge (u,v) belongs to a cycle in a digraph G i u,v belong to the same strongly connected component o G REMOVE EDGES FROM GRAPH(G, M) 0) Mark all edges in G as UNUSED 1) Compute SCCs, mark as USED edges with vertices in same SCC 2) Look or all edges that belong to a simple path starting at a ree vertex with graph traversal (DFS/BFS) rom ree vertices, and mark them as USED 3) Mark UNUSED edges o M as VITAL 4) Remove remaining UNUSED edges Time complexity: linear in the size o the value graph 44 / 47

65 Computing SCC s Given a directed graph G = (V,E), its SCC s can be computed in time O( V + E ): Tarjan s algorithm Path-based strong component algorithm Kosaraju s algorithm 1. Do a DFS 2. Reverse the direction o the edges 3. Do a DFS in reverse chronological order wrt. irst DFS 4. Each tree in the previous DFS orest is a SCC 45 / 47

66 Example Variables {w,x,y,z} Domains d(w) = {b,c,d,e}, d(x) = {b,c}, d(y) = {a,b,c,d}, d(z) = {b,c} w x y z a b c d e 46 / 47

67 Example We assume we already have a maximum matching All variables are covered w x y z a b c d e 46 / 47

68 Example Direct the edges w x y z a b c d e 46 / 47

69 Example Compute SCC s w x y z a b c d e 46 / 47

70 Example Compute all simple paths starting at a ree vertex w x y z a b c d e 46 / 47

71 Example Remove unused edges that are not vital Ater enorcing arc consistency: d(w) = {d,e}, d(x) = {b,c}, d(y) = {a,d}, d(z) = {b,c} w x y z a b c d e 46 / 47

72 Complexity Consider CSP with a single constraint alldi(x 1,...,x k ) where m = max i { D i } Cost o enorcing AC with AC-3: O(k 3 m k+1 ) Cost o enorcing AC with bipartite matching: O(km k) Cost o constructing maximum matching: O(km k) Cost o removing edges: O(km) 47 / 47

Matching Theory. Figure 1: Is this graph bipartite?

Matching Theory. Figure 1: Is this graph bipartite? Matching Theory 1 Introduction A matching M of a graph is a subset of E such that no two edges in M share a vertex; edges which have this property are called independent edges. A matching M is said to

More information

Number Theory and Graph Theory

Number Theory and Graph Theory 1 Number Theory and Graph Theory Chapter 6 Basic concepts and definitions of graph theory By A. Satyanarayana Reddy Department of Mathematics Shiv Nadar University Uttar Pradesh, India E-mail: satya8118@gmail.com

More information

PERFECT MATCHING THE CENTRALIZED DEPLOYMENT MOBILE SENSORS THE PROBLEM SECOND PART: WIRELESS NETWORKS 2.B. SENSOR NETWORKS OF MOBILE SENSORS

PERFECT MATCHING THE CENTRALIZED DEPLOYMENT MOBILE SENSORS THE PROBLEM SECOND PART: WIRELESS NETWORKS 2.B. SENSOR NETWORKS OF MOBILE SENSORS SECOND PART: WIRELESS NETWORKS 2.B. SENSOR NETWORKS THE CENTRALIZED DEPLOYMENT OF MOBILE SENSORS I.E. THE MINIMUM WEIGHT PERFECT MATCHING 1 2 ON BIPARTITE GRAPHS Prof. Tiziana Calamoneri Network Algorithms

More information

Section 3.1: Nonseparable Graphs Cut vertex of a connected graph G: A vertex x G such that G x is not connected. Theorem 3.1, p. 57: Every connected

Section 3.1: Nonseparable Graphs Cut vertex of a connected graph G: A vertex x G such that G x is not connected. Theorem 3.1, p. 57: Every connected Section 3.1: Nonseparable Graphs Cut vertex of a connected graph G: A vertex x G such that G x is not connected. Theorem 3.1, p. 57: Every connected graph G with at least 2 vertices contains at least 2

More information

DO NOT RE-DISTRIBUTE THIS SOLUTION FILE

DO NOT RE-DISTRIBUTE THIS SOLUTION FILE Professor Kindred Math 104, Graph Theory Homework 2 Solutions February 7, 2013 Introduction to Graph Theory, West Section 1.2: 26, 38, 42 Section 1.3: 14, 18 Section 2.1: 26, 29, 30 DO NOT RE-DISTRIBUTE

More information

Advanced Algorithms Class Notes for Monday, October 23, 2012 Min Ye, Mingfu Shao, and Bernard Moret

Advanced Algorithms Class Notes for Monday, October 23, 2012 Min Ye, Mingfu Shao, and Bernard Moret Advanced Algorithms Class Notes for Monday, October 23, 2012 Min Ye, Mingfu Shao, and Bernard Moret Greedy Algorithms (continued) The best known application where the greedy algorithm is optimal is surely

More information

PERFECT MATCHING THE CENTRALIZED DEPLOYMENT MOBILE SENSORS THE PROBLEM SECOND PART: WIRELESS NETWORKS 2.B. SENSOR NETWORKS OF MOBILE SENSORS

PERFECT MATCHING THE CENTRALIZED DEPLOYMENT MOBILE SENSORS THE PROBLEM SECOND PART: WIRELESS NETWORKS 2.B. SENSOR NETWORKS OF MOBILE SENSORS SECOND PART: WIRELESS NETWORKS.B. SENSOR NETWORKS THE CENTRALIZED DEPLOYMENT OF MOBILE SENSORS I.E. THE MINIMUM WEIGHT PERFECT MATCHING ON BIPARTITE GRAPHS Prof. Tiziana Calamoneri Network Algorithms A.y.

More information

Lecture 10,11: General Matching Polytope, Maximum Flow. 1 Perfect Matching and Matching Polytope on General Graphs

Lecture 10,11: General Matching Polytope, Maximum Flow. 1 Perfect Matching and Matching Polytope on General Graphs CMPUT 675: Topics in Algorithms and Combinatorial Optimization (Fall 2009) Lecture 10,11: General Matching Polytope, Maximum Flow Lecturer: Mohammad R Salavatipour Date: Oct 6 and 8, 2009 Scriber: Mohammad

More information

Matchings in Graphs. Definition 1 Let G = (V, E) be a graph. M E is called as a matching of G if v V we have {e M : v is incident on e E} 1.

Matchings in Graphs. Definition 1 Let G = (V, E) be a graph. M E is called as a matching of G if v V we have {e M : v is incident on e E} 1. Lecturer: Scribe: Meena Mahajan Rajesh Chitnis Matchings in Graphs Meeting: 1 6th Jan 010 Most of the material in this lecture is taken from the book Fast Parallel Algorithms for Graph Matching Problems

More information

Undirected Graphs. DSA - lecture 6 - T.U.Cluj-Napoca - M. Joldos 1

Undirected Graphs. DSA - lecture 6 - T.U.Cluj-Napoca - M. Joldos 1 Undirected Graphs Terminology. Free Trees. Representations. Minimum Spanning Trees (algorithms: Prim, Kruskal). Graph Traversals (dfs, bfs). Articulation points & Biconnected Components. Graph Matching

More information

Lecture 3: Graphs and flows

Lecture 3: Graphs and flows Chapter 3 Lecture 3: Graphs and flows Graphs: a useful combinatorial structure. Definitions: graph, directed and undirected graph, edge as ordered pair, path, cycle, connected graph, strongly connected

More information

Approximation slides 1. An optimal polynomial algorithm for the Vertex Cover and matching in Bipartite graphs

Approximation slides 1. An optimal polynomial algorithm for the Vertex Cover and matching in Bipartite graphs Approximation slides 1 An optimal polynomial algorithm for the Vertex Cover and matching in Bipartite graphs Approximation slides 2 Linear independence A collection of row vectors {v T i } are independent

More information

Mathematical and Algorithmic Foundations Linear Programming and Matchings

Mathematical and Algorithmic Foundations Linear Programming and Matchings Adavnced Algorithms Lectures Mathematical and Algorithmic Foundations Linear Programming and Matchings Paul G. Spirakis Department of Computer Science University of Patras and Liverpool Paul G. Spirakis

More information

1 Bipartite maximum matching

1 Bipartite maximum matching Cornell University, Fall 2017 Lecture notes: Matchings CS 6820: Algorithms 23 Aug 1 Sep These notes analyze algorithms for optimization problems involving matchings in bipartite graphs. Matching algorithms

More information

Exercise set 2 Solutions

Exercise set 2 Solutions Exercise set 2 Solutions Let H and H be the two components of T e and let F E(T ) consist of the edges of T with one endpoint in V (H), the other in V (H ) Since T is connected, F Furthermore, since T

More information

Matching Algorithms. Proof. If a bipartite graph has a perfect matching, then it is easy to see that the right hand side is a necessary condition.

Matching Algorithms. Proof. If a bipartite graph has a perfect matching, then it is easy to see that the right hand side is a necessary condition. 18.433 Combinatorial Optimization Matching Algorithms September 9,14,16 Lecturer: Santosh Vempala Given a graph G = (V, E), a matching M is a set of edges with the property that no two of the edges have

More information

1. [1 pt] What is the solution to the recurrence T(n) = 2T(n-1) + 1, T(1) = 1

1. [1 pt] What is the solution to the recurrence T(n) = 2T(n-1) + 1, T(1) = 1 Asymptotics, Recurrence and Basic Algorithms 1. [1 pt] What is the solution to the recurrence T(n) = 2T(n-1) + 1, T(1) = 1 1. O(logn) 2. O(n) 3. O(nlogn) 4. O(n 2 ) 5. O(2 n ) 2. [1 pt] What is the solution

More information

Advanced Combinatorial Optimization September 15, Lecture 2

Advanced Combinatorial Optimization September 15, Lecture 2 18.438 Advanced Combinatorial Optimization September 15, 2009 Lecture 2 Lecturer: Michel X. Goemans Scribes: Robert Kleinberg (2004), Alex Levin (2009) In this lecture, we will present Edmonds s algorithm

More information

Lecture 4: Primal Dual Matching Algorithm and Non-Bipartite Matching. 1 Primal/Dual Algorithm for weighted matchings in Bipartite Graphs

Lecture 4: Primal Dual Matching Algorithm and Non-Bipartite Matching. 1 Primal/Dual Algorithm for weighted matchings in Bipartite Graphs CMPUT 675: Topics in Algorithms and Combinatorial Optimization (Fall 009) Lecture 4: Primal Dual Matching Algorithm and Non-Bipartite Matching Lecturer: Mohammad R. Salavatipour Date: Sept 15 and 17, 009

More information

1 Matchings in Graphs

1 Matchings in Graphs Matchings in Graphs J J 2 J 3 J 4 J 5 J J J 6 8 7 C C 2 C 3 C 4 C 5 C C 7 C 8 6 J J 2 J 3 J 4 J 5 J J J 6 8 7 C C 2 C 3 C 4 C 5 C C 7 C 8 6 Definition Two edges are called independent if they are not adjacent

More information

Adjacent: Two distinct vertices u, v are adjacent if there is an edge with ends u, v. In this case we let uv denote such an edge.

Adjacent: Two distinct vertices u, v are adjacent if there is an edge with ends u, v. In this case we let uv denote such an edge. 1 Graph Basics What is a graph? Graph: a graph G consists of a set of vertices, denoted V (G), a set of edges, denoted E(G), and a relation called incidence so that each edge is incident with either one

More information

MATH 363 Final Wednesday, April 28. Final exam. You may use lemmas and theorems that were proven in class and on assignments unless stated otherwise.

MATH 363 Final Wednesday, April 28. Final exam. You may use lemmas and theorems that were proven in class and on assignments unless stated otherwise. Final exam This is a closed book exam. No calculators are allowed. Unless stated otherwise, justify all your steps. You may use lemmas and theorems that were proven in class and on assignments unless stated

More information

Topics in Combinatorial Optimization February 5, Lecture 2

Topics in Combinatorial Optimization February 5, Lecture 2 8.997 Topics in Combinatorial Optimization February 5, 2004 Lecture 2 Lecturer: Michel X. Goemans Scribe: Robert Kleinberg In this lecture, we will: Present Edmonds algorithm for computing a maximum matching

More information

Lecture 2 - Graph Theory Fundamentals - Reachability and Exploration 1

Lecture 2 - Graph Theory Fundamentals - Reachability and Exploration 1 CME 305: Discrete Mathematics and Algorithms Instructor: Professor Aaron Sidford (sidford@stanford.edu) January 11, 2018 Lecture 2 - Graph Theory Fundamentals - Reachability and Exploration 1 In this lecture

More information

Paths, Trees, and Flowers by Jack Edmonds

Paths, Trees, and Flowers by Jack Edmonds Paths, Trees, and Flowers by Jack Edmonds Xiang Gao ETH Zurich Distributed Computing Group www.disco.ethz.ch Introduction and background Edmonds maximum matching algorithm Matching-duality theorem Matching

More information

COL351: Analysis and Design of Algorithms (CSE, IITD, Semester-I ) Name: Entry number:

COL351: Analysis and Design of Algorithms (CSE, IITD, Semester-I ) Name: Entry number: Name: Entry number: There are 6 questions for a total of 75 points. 1. Consider functions f(n) = 10n2 n + 3 n and g(n) = n3 n. Answer the following: (a) ( 1 / 2 point) State true or false: f(n) is O(g(n)).

More information

5.1 Min-Max Theorem for General Matching

5.1 Min-Max Theorem for General Matching CSC5160: Combinatorial Optimization and Approximation Algorithms Topic: General Matching Date: 4/01/008 Lecturer: Lap Chi Lau Scribe: Jennifer X.M. WU In this lecture, we discuss matchings in general graph.

More information

Important separators and parameterized algorithms

Important separators and parameterized algorithms Important separators and parameterized algorithms Dániel Marx 1 1 Institute for Computer Science and Control, Hungarian Academy of Sciences (MTA SZTAKI) Budapest, Hungary School on Parameterized Algorithms

More information

CS 161: Design and Analysis of Algorithms

CS 161: Design and Analysis of Algorithms CS 161: Design and Analysis o Algorithms Announcements Homework 3, problem 3 removed Greedy Algorithms 4: Human Encoding/Set Cover Human Encoding Set Cover Alphabets and Strings Alphabet = inite set o

More information

1. Lecture notes on bipartite matching

1. Lecture notes on bipartite matching Massachusetts Institute of Technology 18.453: Combinatorial Optimization Michel X. Goemans February 5, 2017 1. Lecture notes on bipartite matching Matching problems are among the fundamental problems in

More information

CS 341: Algorithms. Douglas R. Stinson. David R. Cheriton School of Computer Science University of Waterloo. February 26, 2019

CS 341: Algorithms. Douglas R. Stinson. David R. Cheriton School of Computer Science University of Waterloo. February 26, 2019 CS 341: Algorithms Douglas R. Stinson David R. Cheriton School of Computer Science University of Waterloo February 26, 2019 D.R. Stinson (SCS) CS 341 February 26, 2019 1 / 296 1 Course Information 2 Introduction

More information

Larger K-maps. So far we have only discussed 2 and 3-variable K-maps. We can now create a 4-variable map in the

Larger K-maps. So far we have only discussed 2 and 3-variable K-maps. We can now create a 4-variable map in the EET 3 Chapter 3 7/3/2 PAGE - 23 Larger K-maps The -variable K-map So ar we have only discussed 2 and 3-variable K-maps. We can now create a -variable map in the same way that we created the 3-variable

More information

Graph Algorithms. Tours in Graphs. Graph Algorithms

Graph Algorithms. Tours in Graphs. Graph Algorithms Graph Algorithms Tours in Graphs Graph Algorithms Special Paths and Cycles in Graphs Euler Path: A path that traverses all the edges of the graph exactly once. Euler Cycle: A cycle that traverses all the

More information

Pentagon contact representations

Pentagon contact representations Pentagon contact representations Stean Felsner Institut ür Mathematik Technische Universität Berlin Hendrik Schrezenmaier Institut ür Mathematik Technische Universität Berlin August, 017 Raphael Steiner

More information

AMS /672: Graph Theory Homework Problems - Week V. Problems to be handed in on Wednesday, March 2: 6, 8, 9, 11, 12.

AMS /672: Graph Theory Homework Problems - Week V. Problems to be handed in on Wednesday, March 2: 6, 8, 9, 11, 12. AMS 550.47/67: Graph Theory Homework Problems - Week V Problems to be handed in on Wednesday, March : 6, 8, 9,,.. Assignment Problem. Suppose we have a set {J, J,..., J r } of r jobs to be filled by a

More information

Network flows and Menger s theorem

Network flows and Menger s theorem Network flows and Menger s theorem Recall... Theorem (max flow, min cut strong duality). Let G be a network. The maximum value of a flow equals the minimum capacity of a cut. We prove this strong duality

More information

Notes for Lecture 20

Notes for Lecture 20 U.C. Berkeley CS170: Intro to CS Theory Handout N20 Professor Luca Trevisan November 13, 2001 Notes for Lecture 20 1 Duality As it turns out, the max-flow min-cut theorem is a special case of a more general

More information

A graph is finite if its vertex set and edge set are finite. We call a graph with just one vertex trivial and all other graphs nontrivial.

A graph is finite if its vertex set and edge set are finite. We call a graph with just one vertex trivial and all other graphs nontrivial. 2301-670 Graph theory 1.1 What is a graph? 1 st semester 2550 1 1.1. What is a graph? 1.1.2. Definition. A graph G is a triple (V(G), E(G), ψ G ) consisting of V(G) of vertices, a set E(G), disjoint from

More information

Graphs and Network Flows IE411. Lecture 21. Dr. Ted Ralphs

Graphs and Network Flows IE411. Lecture 21. Dr. Ted Ralphs Graphs and Network Flows IE411 Lecture 21 Dr. Ted Ralphs IE411 Lecture 21 1 Combinatorial Optimization and Network Flows In general, most combinatorial optimization and integer programming problems are

More information

9.5 Equivalence Relations

9.5 Equivalence Relations 9.5 Equivalence Relations You know from your early study of fractions that each fraction has many equivalent forms. For example, 2, 2 4, 3 6, 2, 3 6, 5 30,... are all different ways to represent the same

More information

Characterizing Graphs (3) Characterizing Graphs (1) Characterizing Graphs (2) Characterizing Graphs (4)

Characterizing Graphs (3) Characterizing Graphs (1) Characterizing Graphs (2) Characterizing Graphs (4) S-72.2420/T-79.5203 Basic Concepts 1 S-72.2420/T-79.5203 Basic Concepts 3 Characterizing Graphs (1) Characterizing Graphs (3) Characterizing a class G by a condition P means proving the equivalence G G

More information

LECTURES 3 and 4: Flows and Matchings

LECTURES 3 and 4: Flows and Matchings LECTURES 3 and 4: Flows and Matchings 1 Max Flow MAX FLOW (SP). Instance: Directed graph N = (V,A), two nodes s,t V, and capacities on the arcs c : A R +. A flow is a set of numbers on the arcs such that

More information

1 Variations of the Traveling Salesman Problem

1 Variations of the Traveling Salesman Problem Stanford University CS26: Optimization Handout 3 Luca Trevisan January, 20 Lecture 3 In which we prove the equivalence of three versions of the Traveling Salesman Problem, we provide a 2-approximate algorithm,

More information

Lecture 10. Elementary Graph Algorithm Minimum Spanning Trees

Lecture 10. Elementary Graph Algorithm Minimum Spanning Trees Lecture 10. Elementary Graph Algorithm Minimum Spanning Trees T. H. Cormen, C. E. Leiserson and R. L. Rivest Introduction to Algorithms, 3rd Edition, MIT Press, 2009 Sungkyunkwan University Hyunseung Choo

More information

DFS & STRONGLY CONNECTED COMPONENTS

DFS & STRONGLY CONNECTED COMPONENTS DFS & STRONGLY CONNECTED COMPONENTS CS 4407 Search Tree Breadth-First Search (BFS) Depth-First Search (DFS) Depth-First Search (DFS) u d[u]: when u is discovered f[u]: when searching adj of u is finished

More information

Graph Theory S 1 I 2 I 1 S 2 I 1 I 2

Graph Theory S 1 I 2 I 1 S 2 I 1 I 2 Graph Theory S I I S S I I S Graphs Definition A graph G is a pair consisting of a vertex set V (G), and an edge set E(G) ( ) V (G). x and y are the endpoints of edge e = {x, y}. They are called adjacent

More information

MATH 682 Notes Combinatorics and Graph Theory II

MATH 682 Notes Combinatorics and Graph Theory II 1 Matchings A popular question to be asked on graphs, if graphs represent some sort of compatability or association, is how to associate as many vertices as possible into well-matched pairs. It is to this

More information

3.1 Basic Definitions and Applications

3.1 Basic Definitions and Applications Graphs hapter hapter Graphs. Basic efinitions and Applications Graph. G = (V, ) n V = nodes. n = edges between pairs of nodes. n aptures pairwise relationship between objects: Undirected graph represents

More information

6. Lecture notes on matroid intersection

6. Lecture notes on matroid intersection Massachusetts Institute of Technology 18.453: Combinatorial Optimization Michel X. Goemans May 2, 2017 6. Lecture notes on matroid intersection One nice feature about matroids is that a simple greedy algorithm

More information

CS473-Algorithms I. Lecture 13-A. Graphs. Cevdet Aykanat - Bilkent University Computer Engineering Department

CS473-Algorithms I. Lecture 13-A. Graphs. Cevdet Aykanat - Bilkent University Computer Engineering Department CS473-Algorithms I Lecture 3-A Graphs Graphs A directed graph (or digraph) G is a pair (V, E), where V is a finite set, and E is a binary relation on V The set V: Vertex set of G The set E: Edge set of

More information

MC302 GRAPH THEORY Thursday, 10/24/13

MC302 GRAPH THEORY Thursday, 10/24/13 MC302 GRAPH THEORY Thursday, 10/24/13 Today: Return, discuss HW 3 From last time: Greedy Algorithms for TSP Matchings and Augmenting Paths HW 4 will be posted by tomorrow Reading: [CH] 4.1 Exercises: [CH]

More information

r=1 The Binomial Theorem. 4 MA095/98G Revision

r=1 The Binomial Theorem. 4 MA095/98G Revision Revision Read through the whole course once Make summary sheets of important definitions and results, you can use the following pages as a start and fill in more yourself Do all assignments again Do the

More information

Discrete mathematics , Fall Instructor: prof. János Pach

Discrete mathematics , Fall Instructor: prof. János Pach Discrete mathematics 2016-2017, Fall Instructor: prof. János Pach - covered material - Lecture 1. Counting problems To read: [Lov]: 1.2. Sets, 1.3. Number of subsets, 1.5. Sequences, 1.6. Permutations,

More information

Lecture 8: PATHS, CYCLES AND CONNECTEDNESS

Lecture 8: PATHS, CYCLES AND CONNECTEDNESS Discrete Mathematics August 20, 2014 Lecture 8: PATHS, CYCLES AND CONNECTEDNESS Instructor: Sushmita Ruj Scribe: Ishan Sahu & Arnab Biswas 1 Paths, Cycles and Connectedness 1.1 Paths and Cycles 1. Paths

More information

Graph theory - solutions to problem set 1

Graph theory - solutions to problem set 1 Graph theory - solutions to problem set 1 1. (a) Is C n a subgraph of K n? Exercises (b) For what values of n and m is K n,n a subgraph of K m? (c) For what n is C n a subgraph of K n,n? (a) Yes! (you

More information

{ 1} Definitions. 10. Extremal graph theory. Problem definition Paths and cycles Complete subgraphs

{ 1} Definitions. 10. Extremal graph theory. Problem definition Paths and cycles Complete subgraphs Problem definition Paths and cycles Complete subgraphs 10. Extremal graph theory 10.1. Definitions Let us examine the following forbidden subgraph problems: At most how many edges are in a graph of order

More information

Lecture 10 Graph algorithms: testing graph properties

Lecture 10 Graph algorithms: testing graph properties Lecture 10 Graph algorithms: testing graph properties COMP 523: Advanced Algorithmic Techniques Lecturer: Dariusz Kowalski Lecture 10: Testing Graph Properties 1 Overview Previous lectures: Representation

More information

Graph Algorithms Using Depth First Search

Graph Algorithms Using Depth First Search Graph Algorithms Using Depth First Search Analysis of Algorithms Week 8, Lecture 1 Prepared by John Reif, Ph.D. Distinguished Professor of Computer Science Duke University Graph Algorithms Using Depth

More information

1 Connected components in undirected graphs

1 Connected components in undirected graphs Lecture 10 Connected components of undirected and directed graphs Scribe: Luke Johnston (2016) and Mary Wootters (2017) Date: October 25, 2017 Much of the following notes were taken from Tim Roughgarden

More information

Lecture 10: Strongly Connected Components, Biconnected Graphs

Lecture 10: Strongly Connected Components, Biconnected Graphs 15-750: Graduate Algorithms February 8, 2016 Lecture 10: Strongly Connected Components, Biconnected Graphs Lecturer: David Witmer Scribe: Zhong Zhou 1 DFS Continued We have introduced Depth-First Search

More information

CSE 417: Algorithms and Computational Complexity. 3.1 Basic Definitions and Applications. Goals. Chapter 3. Winter 2012 Graphs and Graph Algorithms

CSE 417: Algorithms and Computational Complexity. 3.1 Basic Definitions and Applications. Goals. Chapter 3. Winter 2012 Graphs and Graph Algorithms Chapter 3 CSE 417: Algorithms and Computational Complexity Graphs Reading: 3.1-3.6 Winter 2012 Graphs and Graph Algorithms Slides by Kevin Wayne. Copyright 2005 Pearson-Addison Wesley. All rights reserved.

More information

Definition. Given a (v,k,λ)- BIBD, (X,B), a set of disjoint blocks of B which partition X is called a parallel class.

Definition. Given a (v,k,λ)- BIBD, (X,B), a set of disjoint blocks of B which partition X is called a parallel class. Resolvable BIBDs Definition Given a (v,k,λ)- BIBD, (X,B), a set of disjoint blocks of B which partition X is called a parallel class. A partition of B into parallel classes (there must be r of them) is

More information

Theorem 2.9: nearest addition algorithm

Theorem 2.9: nearest addition algorithm There are severe limits on our ability to compute near-optimal tours It is NP-complete to decide whether a given undirected =(,)has a Hamiltonian cycle An approximation algorithm for the TSP can be used

More information

Chapter 3: Paths and Cycles

Chapter 3: Paths and Cycles Chapter 3: Paths and Cycles 5 Connectivity 1. Definitions: Walk: finite sequence of edges in which any two consecutive edges are adjacent or identical. (Initial vertex, Final vertex, length) Trail: walk

More information

Math 778S Spectral Graph Theory Handout #2: Basic graph theory

Math 778S Spectral Graph Theory Handout #2: Basic graph theory Math 778S Spectral Graph Theory Handout #: Basic graph theory Graph theory was founded by the great Swiss mathematician Leonhard Euler (1707-178) after he solved the Königsberg Bridge problem: Is it possible

More information

Theorem 3.1 (Berge) A matching M in G is maximum if and only if there is no M- augmenting path.

Theorem 3.1 (Berge) A matching M in G is maximum if and only if there is no M- augmenting path. 3 Matchings Hall s Theorem Matching: A matching in G is a subset M E(G) so that no edge in M is a loop, and no two edges in M are incident with a common vertex. A matching M is maximal if there is no matching

More information

Definition For vertices u, v V (G), the distance from u to v, denoted d(u, v), in G is the length of a shortest u, v-path. 1

Definition For vertices u, v V (G), the distance from u to v, denoted d(u, v), in G is the length of a shortest u, v-path. 1 Graph fundamentals Bipartite graph characterization Lemma. If a graph contains an odd closed walk, then it contains an odd cycle. Proof strategy: Consider a shortest closed odd walk W. If W is not a cycle,

More information

Pentagons vs. triangles

Pentagons vs. triangles Discrete Mathematics 308 (2008) 4332 4336 www.elsevier.com/locate/disc Pentagons vs. triangles Béla Bollobás a,b, Ervin Győri c,1 a Trinity College, Cambridge CB2 1TQ, UK b Department of Mathematical Sciences,

More information

Bipartite Roots of Graphs

Bipartite Roots of Graphs Bipartite Roots of Graphs Lap Chi Lau Department of Computer Science University of Toronto Graph H is a root of graph G if there exists a positive integer k such that x and y are adjacent in G if and only

More information

Graph Algorithms. Andreas Klappenecker. [based on slides by Prof. Welch]

Graph Algorithms. Andreas Klappenecker. [based on slides by Prof. Welch] Graph Algorithms Andreas Klappenecker [based on slides by Prof. Welch] 1 Directed Graphs Let V be a finite set and E a binary relation on V, that is, E VxV. Then the pair G=(V,E) is called a directed graph.

More information

MC 302 GRAPH THEORY 10/1/13 Solutions to HW #2 50 points + 6 XC points

MC 302 GRAPH THEORY 10/1/13 Solutions to HW #2 50 points + 6 XC points MC 0 GRAPH THEORY 0// Solutions to HW # 0 points + XC points ) [CH] p.,..7. This problem introduces an important class of graphs called the hypercubes or k-cubes, Q, Q, Q, etc. I suggest that before you

More information

Network Flow and Matching

Network Flow and Matching Chapter 4 Network Flow and Matching In this chapter, we examine the network flow problem, a graph problem to which many problems can be reduced. In fact, some problems that don t even appear to be graph

More information

1 Digraphs. Definition 1

1 Digraphs. Definition 1 1 Digraphs Definition 1 Adigraphordirected graphgisatriplecomprisedofavertex set V(G), edge set E(G), and a function assigning each edge an ordered pair of vertices (tail, head); these vertices together

More information

MTL 776: Graph Algorithms Lecture : Matching in Graphs

MTL 776: Graph Algorithms Lecture : Matching in Graphs MTL 776: Graph Algorithms Lecture : Matching in Graphs Course Coordinator: Prof. B. S. Panda Note: The note is based on the lectures taken in the class. It is a draft version and may contain errors. It

More information

(a) (b) Figure 1: Bipartite digraph (a) and solution to its edge-connectivity incrementation problem (b). A directed line represents an edge that has

(a) (b) Figure 1: Bipartite digraph (a) and solution to its edge-connectivity incrementation problem (b). A directed line represents an edge that has Incrementing Bipartite Digraph Edge-connectivity Harold N. Gabow Tibor Jordan y Abstract This paper solves the problem of increasing the edge-connectivity of a bipartite digraph by adding the smallest

More information

Sources for this lecture. 3. Matching in bipartite and general graphs. Symmetric difference

Sources for this lecture. 3. Matching in bipartite and general graphs. Symmetric difference S-72.2420 / T-79.5203 Matching in bipartite and general graphs 1 3. Matching in bipartite and general graphs Let G be a graph. A matching M in G is a set of nonloop edges with no shared endpoints. Let

More information

Matching 4/21/2016. Bipartite Matching. 3330: Algorithms. First Try. Maximum Matching. Key Questions. Existence of Perfect Matching

Matching 4/21/2016. Bipartite Matching. 3330: Algorithms. First Try. Maximum Matching. Key Questions. Existence of Perfect Matching Bipartite Matching Matching 3330: Algorithms A graph is bipartite if its vertex set can be partitioned into two subsets A and B so that each edge has one endpoint in A and the other endpoint in B. A B

More information

11.1. Definitions. 11. Domination in Graphs

11.1. Definitions. 11. Domination in Graphs 11. Domination in Graphs Some definitions Minimal dominating sets Bounds for the domination number. The independent domination number Other domination parameters. 11.1. Definitions A vertex v in a graph

More information

5 Graphs

5 Graphs 5 Graphs jacques@ucsd.edu Some of the putnam problems are to do with graphs. They do not assume more than a basic familiarity with the definitions and terminology of graph theory. 5.1 Basic definitions

More information

Restricted edge connectivity and restricted connectivity of graphs

Restricted edge connectivity and restricted connectivity of graphs Restricted edge connectivity and restricted connectivity of graphs Litao Guo School of Applied Mathematics Xiamen University of Technology Xiamen Fujian 361024 P.R.China ltguo2012@126.com Xiaofeng Guo

More information

DO NOT RE-DISTRIBUTE THIS SOLUTION FILE

DO NOT RE-DISTRIBUTE THIS SOLUTION FILE Professor Kindred Math 104, Graph Theory Homework 3 Solutions February 14, 2013 Introduction to Graph Theory, West Section 2.1: 37, 62 Section 2.2: 6, 7, 15 Section 2.3: 7, 10, 14 DO NOT RE-DISTRIBUTE

More information

Math 776 Graph Theory Lecture Note 1 Basic concepts

Math 776 Graph Theory Lecture Note 1 Basic concepts Math 776 Graph Theory Lecture Note 1 Basic concepts Lectured by Lincoln Lu Transcribed by Lincoln Lu Graph theory was founded by the great Swiss mathematician Leonhard Euler (1707-178) after he solved

More information

2. Lecture notes on non-bipartite matching

2. Lecture notes on non-bipartite matching Massachusetts Institute of Technology 18.433: Combinatorial Optimization Michel X. Goemans February 15th, 013. Lecture notes on non-bipartite matching Given a graph G = (V, E), we are interested in finding

More information

CS261: Problem Set #1

CS261: Problem Set #1 CS261: Problem Set #1 Due by 11:59 PM on Tuesday, April 21, 2015 Instructions: (1) Form a group of 1-3 students. You should turn in only one write-up for your entire group. (2) Turn in your solutions by

More information

A step towards the Bermond-Thomassen conjecture about disjoint cycles in digraphs

A step towards the Bermond-Thomassen conjecture about disjoint cycles in digraphs A step towards the Bermond-Thomassen conjecture about disjoint cycles in digraphs Nicolas Lichiardopol Attila Pór Jean-Sébastien Sereni Abstract In 1981, Bermond and Thomassen conjectured that every digraph

More information

Key Graph Theory Theorems

Key Graph Theory Theorems Key Graph Theory Theorems Rajesh Kumar MATH 239 Intro to Combinatorics August 19, 2008 3.3 Binary Trees 3.3.1 Problem (p.82) Determine the number, t n, of binary trees with n edges. The number of binary

More information

The External Network Problem

The External Network Problem The External Network Problem Jan van den Heuvel and Matthew Johnson CDAM Research Report LSE-CDAM-2004-15 December 2004 Abstract The connectivity of a communications network can often be enhanced if the

More information

Graph Algorithms. Chapter 22. CPTR 430 Algorithms Graph Algorithms 1

Graph Algorithms. Chapter 22. CPTR 430 Algorithms Graph Algorithms 1 Graph Algorithms Chapter 22 CPTR 430 Algorithms Graph Algorithms Why Study Graph Algorithms? Mathematical graphs seem to be relatively specialized and abstract Why spend so much time and effort on algorithms

More information

Outline. 1 The matching problem. 2 The Chinese Postman Problem

Outline. 1 The matching problem. 2 The Chinese Postman Problem Outline The matching problem Maximum-cardinality matchings in bipartite graphs Maximum-cardinality matchings in bipartite graphs: The augmenting path algorithm 2 Let G = (V, E) be an undirected graph.

More information

Basic Graph Theory with Applications to Economics

Basic Graph Theory with Applications to Economics Basic Graph Theory with Applications to Economics Debasis Mishra February, 0 What is a Graph? Let N = {,..., n} be a finite set. Let E be a collection of ordered or unordered pairs of distinct elements

More information

Math 170- Graph Theory Notes

Math 170- Graph Theory Notes 1 Math 170- Graph Theory Notes Michael Levet December 3, 2018 Notation: Let n be a positive integer. Denote [n] to be the set {1, 2,..., n}. So for example, [3] = {1, 2, 3}. To quote Bud Brown, Graph theory

More information

Ma/CS 6b Class 4: Matchings in General Graphs

Ma/CS 6b Class 4: Matchings in General Graphs Ma/CS 6b Class 4: Matchings in General Graphs By Adam Sheffer Reminder: Hall's Marriage Theorem Theorem. Let G = V 1 V 2, E be a bipartite graph. There exists a matching of size V 1 in G if and only if

More information

Lecture notes on: Maximum matching in bipartite and non-bipartite graphs (Draft)

Lecture notes on: Maximum matching in bipartite and non-bipartite graphs (Draft) Lecture notes on: Maximum matching in bipartite and non-bipartite graphs (Draft) Lecturer: Uri Zwick June 5, 2013 1 The maximum matching problem Let G = (V, E) be an undirected graph. A set M E is a matching

More information

Lecture 22 Tuesday, April 10

Lecture 22 Tuesday, April 10 CIS 160 - Spring 2018 (instructor Val Tannen) Lecture 22 Tuesday, April 10 GRAPH THEORY Directed Graphs Directed graphs (a.k.a. digraphs) are an important mathematical modeling tool in Computer Science,

More information

Algorithms: Lecture 10. Chalmers University of Technology

Algorithms: Lecture 10. Chalmers University of Technology Algorithms: Lecture 10 Chalmers University of Technology Today s Topics Basic Definitions Path, Cycle, Tree, Connectivity, etc. Graph Traversal Depth First Search Breadth First Search Testing Bipartatiness

More information

Constraint Programming. Global Constraints. Amira Zaki Prof. Dr. Thom Frühwirth. University of Ulm WS 2012/2013

Constraint Programming. Global Constraints. Amira Zaki Prof. Dr. Thom Frühwirth. University of Ulm WS 2012/2013 Global Constraints Amira Zaki Prof. Dr. Thom Frühwirth University of Ulm WS 2012/2013 Amira Zaki & Thom Frühwirth University of Ulm Page 1 WS 2012/2013 Overview Classes of Constraints Global Constraints

More information

Extremal results for Berge-hypergraphs

Extremal results for Berge-hypergraphs Extremal results for Berge-hypergraphs Dániel Gerbner Cory Palmer Abstract Let G be a graph and H be a hypergraph both on the same vertex set. We say that a hypergraph H is a Berge-G if there is a bijection

More information

CPSC 536N: Randomized Algorithms Term 2. Lecture 10

CPSC 536N: Randomized Algorithms Term 2. Lecture 10 CPSC 536N: Randomized Algorithms 011-1 Term Prof. Nick Harvey Lecture 10 University of British Columbia In the first lecture we discussed the Max Cut problem, which is NP-complete, and we presented a very

More information

COMP 250 Fall graph traversal Nov. 15/16, 2017

COMP 250 Fall graph traversal Nov. 15/16, 2017 Graph traversal One problem we oten need to solve when working with graphs is to decide i there is a sequence o edges (a path) rom one vertex to another, or to ind such a sequence. There are various versions

More information

Design and Analysis of Algorithms

Design and Analysis of Algorithms Design and Analysis of Algorithms CS 5311 Lecture 19 Topological Sort Junzhou Huang, Ph.D. Department of Computer Science and ngineering CS5311 Design and Analysis of Algorithms 1 Topological Sort Want

More information