Solution for Homework set 3

Size: px
Start display at page:

Download "Solution for Homework set 3"

Transcription

1 TTIC 300 and CMSC Algorithms Winter 07 Solution for Homework set 3 Question (0 points) We are given a directed graph G = (V, E), with two special vertices s and t, and non-negative integral capacities c(e) on edges e E. Assume that s has no incoming edges and t has no outgoing edges. a. Show an efficient algorithm that finds a maximum s-t flow f in G, such that f is integral and acyclic (a flow f is acyclic, if G contains no cycles, where every edge carries positive flow; it is integral iff f(e) is an integer for all e E). Analyze the algorithm s running time; there is no need to prove its correctness. solution: We start with an initial integral maximum flow f which can be computed efficiently, e.g via the Edmonds-Karp algorithm. Then it is sufficient to show an efficient algorithm that given any feasible integral flow f, returns a feasible flow f of the same value that is integral and acyclic. The algorithm iterates through each vertex v V and uses depth-first search starting from v, where it traverses an edge e = (x, y) E from the current vertex x to y iff f(e) > 0. If v is encountered again while traversing an edge in the forward direction, then the current path in the depth-first search is a cycle C containing v. Let e = arg min {f(e ) e C} be an edge carrying minimum amount of flow in C. We modify f such that f(e) is set to f(e) f(e ) for every e C, and restart the depth-first search from v with the updated f. If no cycle is found, we move to the next vertex. The algorithm terminates when it has iterated through every vertex in V and returns the current flow f as f. running time. Each iteration of the depth-first search can be implemented in O(n + m) time. There are n starting vertices from which we run a depth-first search. Note that whenever the flow value is updated along a cycle C, at least one of the edges in the cycle gets assigned a flow value of 0. Since a flow value on any edge never increases, at most m updates of the flow, and hence m additional runs of the depth-first search, happen throughout the algorithm. Therefore, the depth-first search is run at most n + m times, for a total of O((n + m) ) running time. The update of f along a cycle C can be done in O(m) time, and thus a total of O(m ) time is spent updating the flow paths throughout the algorithm. The Edmonds-Karp algorithm can be implemented in O(m n) time, which dominates the runtime of the algorithm. b. A collection P of paths connecting s to t, together with values f (P ) 0 for each P P is called a valid flow-paths solution, iff for every edge e E, P :P:e P f (P ) c(e). The value of the flow-paths solution is v(p, f ) = P P f (P ). Assume that we are given a valid acyclic s-t flow f : E Z 0 in G, such that f is integral. Show an efficient algorithm that finds a valid flow-paths solution (P, f ), with P E, such that for each edge e E, f (P ) = f(e), P P:e P all values f (P ) are integral, and v(p, f ) = v(f), where v(f) is the value of the flow f. Prove the algorithm s correctness and analyze its running time.

2 solution: The algorithm is iterative and uses depth-first search starting at s in each iteration, where it traverses an edge e = (x, y) E from the current vertex x to y iff f(e) > 0. Whenever t is reached, the current path in the depth-first search is an s-t path P. Let e = arg min {f(e ) e P } be an edge carrying minimum amount of flow in P. We add P to P with f (P ) = f(e ), and update f(e) to be f(e) f(e ) for every e P. The algorithm terminates when no positive s-t flow path exists. correctness. We first show that if f is acyclic, f(e) = 0 must hold for all e E at termination. Assume for contradiction that some e E has f(e) > 0. If e out(s), then by flow conservation, we can traverse edges carrying positive flow starting from e in a depth-first search manner and eventually reach t, a contradiction to the termination condition that no positive s-t flow path exists. So assume all edges in out(s) carry 0 flow. If e / out(s) has f(e) > 0, we can traverse edges carrying positive flow in the reverse direction in a depth-first search manner, and by flow conservation it must eventually create a cycle, as out(s) carries no flow and t has no outgoing edges. Since f is modified such that the flow values on the edges do not increase, a flow cycle at termination would imply a flow cycle for the original flow f, a contradiction. We now verify that (P, f ) is a valid flow-paths solution satisfying the properties of the problem. The algorithm terminates in m iterations, since at each iteration at least one edge in P is updated to have flow value 0, and the flow value on an edge never increases throughout the algorithm. Thus, P E holds, as one path is added per iteration. Since f is initially integral, and f (P ) = f(e ) is integral at each iteration, the updated flow where f(e) is set to f(e) f (e ) for each e P is also integral. Therefore, {f (P )} P P are all integral. At each iteration of the algorithm, the flow value on each edge e P is decreased by exactly the amount f (P ) for P that is added to P. Therefore, P P:e P f (P ) = f(e) must hold, since f(e) = 0 for all e E at termination. Since f was a feasible flow solution originally, note that P P:e P f (P ) = f(e) c(e) holds for all e E and (P, f ) is a valid flow-paths solution. {P P:e P } f (P ) holds since every path P P is Lastly, v(p, f ) = P P f (P ) = e out(s) an s-t path that contains an edge in out(s). Since {P P:e P } f (P ) = f(e) for every edge, we have v(p, f ) = e out(s) f(e) = v(f). running time. Each iteration of depth-first search can be done in O(n + m) time. Since we have at most m iterations, the total time spent on finding positive s-t flow paths is O(m(n + m)). We update the flow and add paths to P at most m times, and the flow on the path can be updated in O(m) time. Thus, the total time spent updating f and building (P, f ) is O(m ). Thus, the algorithm runs in O(m ) time. Question (5 points) In this question we prove the observation that was omitted in class from the analysis of the Edmonds-Karp algorithm for Maximum Flow. Suppose we are given a flow network G, and a valid flow f in that network. Let G f be the corresponding residual graph, P a shortest s-t path in G f, and f a new flow obtained from f after performing a single iteration of the algorithm, with P as the augmenting path. Prove each one of the statements below. a. If e G f but e / G f, then e P. solution. Assume e = (u, v) is a forward edge in G f so c(e) f(e) > 0 must hold. If e / G f, then c(e) = f (e), and hence f (e) > f(e). Clearly, this can happen iff the flow on e increases via the augmenting path P, which implies e P. Now assume e = (u, v) is a backward edge in G f so that if e = (v, u), then f(e ) > 0 must hold. If e / G f, this means that f (e ) = 0, which can

3 only happen if the flow on e = (v, u) was decreased via the augmenting path P. This implies that e = (u, v) P. b. At least one edge of P does not belong to G f. solution. Let e G f be an edge in P with minimum residual capacity c f (e) in G f. If e is a forward edge, then f (e) = c(e) after the iteration, since c f (e) = c(e) f(e) amount of flow is increased on e. This implies that e / G f. If e is a backward edge, then f (e) = 0 after the iteration, since c f (e) = f(e) amount of flow is decreased on e. This implies that e / G f. c. If e = (u, v) G f but e / G f, then edge (v, u) belongs to path P. solution. Assume e = (u, v) is a forward edge in G f so c(e) f (e) > 0 must hold. If e / G f, then c(e) = f(e), meaning that flow value was decreased via the augmenting path P. This can happen only if (v, u) P. Assume e is a backward edge in G f so f (e) > 0 must hold. If e / G f, then f(e) = 0, meaning that flow value was increased via the augmenting path P on e. This can happen only if (v, u) P. Question 3 (5 points) We are given a flow network G = (V, E), with positive integral capacities c(e) on edges e E, a source s and a sink t. Recall that an s-t cut in G is a partition (A, B) of the vertices of V, such that s A and t B. An s-t cut (A, B) is a minimum cut iff the value C(A, B) = e E(A,B) c(e) is minimal among all s-t cuts. Notice that it is possible for a graph to contain several minimum s-t cuts. a. Show an example of a flow network that contains Ω(n) minimum s-t cuts, where n = V. solution. Consider a graph G on n 3 vertices. We fix a pair s, t of vertices, and we connect both of them to all the remaining vertices V (G)\ {s, t} via bi-directional edges of unit capacity. The capacity of any cut (S, T ) such that s S, t T, is ( T + S ) = n, and hence each such cut is a minimum cut. Since there are an exponential number of ways to divide n vertices into two groups S and T, the number of minimum s-t cuts is also exponential. b. Show an example of a flow network that contains a unique minimum s-t cut (that is, the number of minimum s-t cuts in the flow network is ). solution. Consider the following graph G on n vertices. We fix a pair s, t of vertices, and we connect s to all other vertices V (G)\ {s} via bi-directional edges of unit capacity. The capacity of any s-t cut (S, T ) is exactly T. Thus, the unique minimum s-t cut is (V (G)\{t}, {t}) of capacity. c. Show an efficient algorithm to determine whether G contains a unique minimum s-t cut, or the number of such cuts is greater than. Prove the algorithm s correctness. solution. For any graph H, let ϕ(h) denote the value of minimum-cut in the graph H. For each vertex v V \ {s, t}, let G s v be the graph obtained by adding an edge (s, v) of infinite capacity in G. Similarly, let G t v be the graph obtained by adding an edge (v, t) of infinite capacity in G. The algorithm reports multiple minimum cuts iff v V such that ϕ(g s v) = ϕ(g t v) = ϕ(g). 3

4 correctness. Note that in any minimum cut (S s v, T s v ) of G s v, v S s v and similarly, v T t v in any minimum cut (S t v, T t v) of G t v. Since we are modifying G by adding an edge, any cut (S, T ) in the modified graph also induces the same cut (S, T ) of no larger capacity. Thus, if for a vertex v V \ {s, t}, ϕ(g s v) = ϕ(g t v) = ϕ(g) holds, we have found a pair of cuts in the original graph G with the same capacity. Now, assume that there are two minimum s-t cuts: (S, T ) and (S, T ). Since both of them are bi-partition of the vertices, there exists a vertex v S T. Thus, there exists a cut induced by (S, T ) in G s v of the capacity same as ϕ(g). Or in other words, ϕ(g s v) = ϕ(g). Similarly, we can show that ϕ(g t v) = ϕ(g). Since we are computing minimum cuts for only O(n) number of graphs, our algorithm runs in polynomial time. d. An s-t cut (A, B) in G is called the best minimum s-t cut iff it minimizes E(A, B) among all minimum s-t cuts. Show an efficient algorithm to compute the best minimum s-t cut in G. There is no need to analyze the algorithm. solution. Let m be the number of edges in the graph G. We multiplicity the capacities of the edges in G by m and then add an extra unit capacity. The algorithm simply reports the minimum cut in the modified graph. Question 4 (0 points) Recall that, given a graph G, a matching is a subset E of the edges of G, such that no pair of edges in E shares an endpoint. The matching is called perfect iff every vertex of G serves as an endpoint of an edge in E. In this question we assume that we are given a randomized algorithm to test whether there is a perfect matching in a given graph. Given as input an n-vertex graph G, the algorithm runs in time O(n c ) for some constant c ; if G contains a perfect matching, it always returns the answer YES, and otherwise, it returns the answer NO with probability at least /. a. Design a randomized algorithm, that finds a perfect matching in the input graph G, if it exists. The running time of the algorithm should be polynomial in n, and it should compute the perfect matching (if it exists) with probability at least ( /n 4 ). Analyze the algorithm s correctness and running time. solution. Let A be the randomized algorithm given in the problem definition. Consider a randomized algorithm A which runs A for 7 log n times, and returns NO if at least one trial resulted in NO, and YES otherwise. Then A outputs the wrong answer with probability at most /n 7. Indeed, A outputs wrong answer iff A reported YES for 7 log n times, even though the correct answer was NO, which happens with probability at most (/) 7 log n = /n 7. Using A as a black-box, we construct a randomized algorithm B to compute perfect matching. The algorithm B reports no perfect matching if A determines there is no perfect matching. It reports trivial perfect matching if the input graph is empty. In all other cases, for the input graph G, it finds an edge e = (u, v) such that the algorithm A returns YES for G[V \ {u, v}] as input. It then outputs the edge e along with recursively computed matching for G[V \ {u, v}]. If no such edge is found, the algorithm fails. correctness. Assume for now that the algorithm A correctly outputs the correct answer every time. We prove that under this assumption, B correctly outputs a perfect matching if it exists. The proof is by induction on n. 4

5 The base case is when n = 0, where the output is trivially correct. Assume now that the algorithm B reports correct answer for all n < n, and consider the case in which input graph has n vertices. Suppose there is no perfect matching, then A reports so, and the output is again trivially correct. If is there perfect matching, let e = (u, v) be any of its edges. Thus, G[V \ {u, v}] will contain perfect matching, and by our induction hypothesis, B will return the correct answer. It remains to show that with probability at least ( /4), A returns correct answer throughout the algorithm. Note that A is queried at most mn n 3 times. In any one of such queries, the probability that A fails is at most /n 7. Thus, by union bound, the probability that A fails on at least one query out of n 3 potential queries, is bounded by /n 4. Thus, our algorithm B reports correct answer with probability at least /n 4. b. Assume now that our input is some n-vertex graph G, and we would like to find the largest cardinality matching in G. Design a randomized algorithm for doing so. The algorithm should run in time poly(n), and return the largest matching with probability at least ( /n). Analyze the algorithm s correctness and running time. solution. We define the cardinality of matching as the number of vertices participating in it. For each i = 0,..., n, let G i be the graph obtained by adding i extra vertices to G, then connecting each of the extra vertices to all of the vertices of the original graph. Let M i be the perfect matching (if exists) computed by the algorithm B in the graph G i. We return the matching M i E with minimum index i. correctness. Assume for now that the algorithm B correctly outputs answer every time. We prove that under this assumption, our algorithm correctly outputs largest cardinality matching. We prove so by showing that there is a matching of cardinality n i in G iff there is a perfect matching in G i. Suppose, G has a matching M of cardinality n i. Since i extra vertices are connected to all vertices of G, we can append to M a matching between the extra vertices and the unmatched vertices: V \V (M), to get a perfect matching in G i. On the other hand, suppose that G i has perfect matching M i. Then M i E induces a matching of cardinality n i by removing the vertices of G connected to the extra vertices. It remains to show that with probability at least ( /n), B returns correct answer throughout the algorithm. Note that B is queried at most n times. In any one of such queries, the probability that B fails is at most /n 4. Thus, by union bound, the probability that B fails on at least one query out of n potential queries, is bounded by /n 3. Thus, our algorithm reports correct answer with probability at least /n 3 /n. Question 5 (0 points) In this question, we study variations of Karger s algorithm for global minimum cut. We assume that we are given an undirected connected graph G = (V, E). The graph is simple, so there are no parallel edges. Let C denote the value of the global minimum cut in G. a. Let (X, Y ) be the second-smallest minimum cut: that is, if (A, B) is a minimum cut in G, then (X, Y ) is a cut in G of minimum value, such that (X, Y ) (A, B) and (X, Y ) (B, A). Note that E(X, Y ) may be equal to C, but it may also be much larger than C. Prove that the probability that Karger s algorithm returns the cut (X, Y ) is at least Ω(/n 3 ). Can you modify the algorithm to improve the probability to Ω(/n ), without increasing its asymptotic running time? 5

6 solution. Let k be the size of the second-smallest minimum cut. Fix a second-smallest cut, and denote the edges by K. Note that there is at most one vertex with degree less than k, which implies the total number of edges k(n ) E. For the first step, let p n denote the probability that no edge in K is chosen, and we have p n = k E n. Similarly, define p i to be the minimum probability, ranging over all possible contractions such that no edges in K had been contracted before, that no edge in K is chosen at this iteration, when there are i vertices remaining. Note that after any sequence of contractions, there is at most one vertex with degree less than k. For p i, where i = n, n,..., 4, we have p i = k k(i ) i. Let E i denote the event that no edges in K are contracted when there are i vertices remaining, where i = n, n,..., 4. We have Pr[no edges in K are contracted] = Pr[E n ] Pr[E n E n ] Pr[E n E n E n ] Pr[E 4 E n E n E 5 ] p n p n p 4 n 3 n n 4 n n 5 n 3 ( ) 3 Ω n. For the last step, when 3 vertices are remaining, the number of edges is at least k +, assuming C 0. Therefore, the probability that no edges in K are chosen is bounded by k = Ω ( n). Putting them together, we conclude the probability that Karger s algorithm returns the cut is Ω ( ) n. 3 In order to improve the algorithm, for the last step, when 3 vertices are remaining, we choose two vertices uniformly at random to contract. We claim this modified algorithm will find the second-smallest minimum cut K with probability Ω ( ) n. Before the last step, no edges in K will be contracted with probability p n p n p 4 = Ω ( ) n, and in the last step, we will contract an edge in K with probability /3. Putting them together, we have probability Ω ( ) n. b. For a parameter α, we say that a cut (X, Y ) is an α-approximate minimum cut, iff E(X, Y ) α C. In this question, our goal is to modify Karger s algorithm, so it returns an α-approximate cut with a reasonably large probability. Suppose we are given an integer α. We run Karger s algorithm until α vertices remain in the graph. As a last step, we compute a random partition of the remaining graph vertices into two subsets, and use this partition to define a cut in the original graph. Prove that if (X, Y ) is an α-approximate cut, then the algorithm returns this cut with probability at least. Give an upper bound on the number of α-approximate minimum cuts in any ( α) n α graph. Explain your bound. 6

7 solution. The proof is similar to part a), and we adopt the same notation. First, observe that E nc/, because every vertex has degree at least C. Then p n αc E α n. For i = n, n,..., α +, when there are i vertices remaining, every vertex has degree at least C, after any contractions. Thus, Therefore, p i αc Ci = α i. Pr[no edges in E(X, Y ) are contracted] p n p n p α+ n ( α ) i i=α+ n α n ). ( n α n α n α + Conditioning on the event that no edges in E(X, Y ) are contracted at the point where there are α vertices remaining, the probability that (X, Y ) being chosen is α, because there are α cuts in total. Therefore, the algorithm returns the cut (X, Y ) with probability at least ( n α ) α. For each cut C, let p(c) denote the probability that it is being returned by the (randomized) algorithm. We have p(c) =, C where C ranges over all cuts C. If C is an α-approximate cut, then p(c), which implies α that the total number of α-approximate cut is bounded by ( n α) α. ( α) n c. (0 points extra credit) Consider the following analogue of Karger s algorithm for solving the minimum s-t cut problem. In each iteration, let s and t denote the possibly contracted nodes that contain the original vertices s and t, respectively. To make sure that s and t do not get contracted, in each iteration we select an edge to contract uniformly at random from among all edges of the current graph, excluding the edges connecting s to t. Give an example to show that the probability that this method finds a minimum s-t cut can be as small as Ω(n). You can use parallel edges in your example. solution. Let G = (V, E), where V = {s, t, v, v,..., v n } and E = {(s, v i ), (v i, t) : i =,,..., n }, where (v i, t) denotes a pair of parallel edges. It is clear that ({s}, {v, v,..., v n, t}) is the unique minimum s-t cut. The algorithm will return this cut if and only if no edges of the form (s, v i ) are contracted. However, the probability that such an edge not being chosen is 3 at each step, and therefore it will return this cut with probability ( 3) n = Ω(n). 7

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

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

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

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

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

CMPSCI 311: Introduction to Algorithms Practice Final Exam

CMPSCI 311: Introduction to Algorithms Practice Final Exam CMPSCI 311: Introduction to Algorithms Practice Final Exam Name: ID: Instructions: Answer the questions directly on the exam pages. Show all your work for each question. Providing more detail including

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

Paths, Flowers and Vertex Cover

Paths, Flowers and Vertex Cover Paths, Flowers and Vertex Cover Venkatesh Raman M. S. Ramanujan Saket Saurabh Abstract It is well known that in a bipartite (and more generally in a König) graph, the size of the minimum vertex cover is

More information

Reducing Directed Max Flow to Undirected Max Flow and Bipartite Matching

Reducing Directed Max Flow to Undirected Max Flow and Bipartite Matching Reducing Directed Max Flow to Undirected Max Flow and Bipartite Matching Henry Lin Division of Computer Science University of California, Berkeley Berkeley, CA 94720 Email: henrylin@eecs.berkeley.edu Abstract

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

Maximum flows & Maximum Matchings

Maximum flows & Maximum Matchings Chapter 9 Maximum flows & Maximum Matchings This chapter analyzes flows and matchings. We will define flows and maximum flows and present an algorithm that solves the maximum flow problem. Then matchings

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

Jessica Su (some parts copied from CLRS / last quarter s notes)

Jessica Su (some parts copied from CLRS / last quarter s notes) 1 Max flow Consider a directed graph G with positive edge weights c that define the capacity of each edge. We can identify two special nodes in G: the source node s and the sink node t. We want to find

More information

These are not polished as solutions, but ought to give a correct idea of solutions that work. Note that most problems have multiple good solutions.

These are not polished as solutions, but ought to give a correct idea of solutions that work. Note that most problems have multiple good solutions. CSE 591 HW Sketch Sample Solutions These are not polished as solutions, but ought to give a correct idea of solutions that work. Note that most problems have multiple good solutions. Problem 1 (a) Any

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

1. Suppose you are given a magic black box that somehow answers the following decision problem in polynomial time:

1. Suppose you are given a magic black box that somehow answers the following decision problem in polynomial time: 1. Suppose you are given a magic black box that somehow answers the following decision problem in polynomial time: Input: A CNF formula ϕ with n variables x 1, x 2,..., x n. Output: True if there is an

More information

CIS 121 Data Structures and Algorithms Minimum Spanning Trees

CIS 121 Data Structures and Algorithms Minimum Spanning Trees CIS 121 Data Structures and Algorithms Minimum Spanning Trees March 19, 2019 Introduction and Background Consider a very natural problem: we are given a set of locations V = {v 1, v 2,..., v n }. We want

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

12.1 Formulation of General Perfect Matching

12.1 Formulation of General Perfect Matching CSC5160: Combinatorial Optimization and Approximation Algorithms Topic: Perfect Matching Polytope Date: 22/02/2008 Lecturer: Lap Chi Lau Scribe: Yuk Hei Chan, Ling Ding and Xiaobing Wu In this lecture,

More information

Algorithms for Minimum Spanning Trees

Algorithms for Minimum Spanning Trees Algorithms & Models of Computation CS/ECE, Fall Algorithms for Minimum Spanning Trees Lecture Thursday, November, Part I Algorithms for Minimum Spanning Tree Sariel Har-Peled (UIUC) CS Fall / 6 Sariel

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

Advanced Combinatorial Optimization September 17, Lecture 3. Sketch some results regarding ear-decompositions and factor-critical graphs.

Advanced Combinatorial Optimization September 17, Lecture 3. Sketch some results regarding ear-decompositions and factor-critical graphs. 18.438 Advanced Combinatorial Optimization September 17, 2009 Lecturer: Michel X. Goemans Lecture 3 Scribe: Aleksander Madry ( Based on notes by Robert Kleinberg and Dan Stratila.) In this lecture, we

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

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

Paths, Flowers and Vertex Cover

Paths, Flowers and Vertex Cover Paths, Flowers and Vertex Cover Venkatesh Raman, M.S. Ramanujan, and Saket Saurabh Presenting: Hen Sender 1 Introduction 2 Abstract. It is well known that in a bipartite (and more generally in a Konig)

More information

/633 Introduction to Algorithms Lecturer: Michael Dinitz Topic: Approximation algorithms Date: 11/27/18

/633 Introduction to Algorithms Lecturer: Michael Dinitz Topic: Approximation algorithms Date: 11/27/18 601.433/633 Introduction to Algorithms Lecturer: Michael Dinitz Topic: Approximation algorithms Date: 11/27/18 22.1 Introduction We spent the last two lectures proving that for certain problems, we can

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

1. Chapter 1, # 1: Prove that for all sets A, B, C, the formula

1. Chapter 1, # 1: Prove that for all sets A, B, C, the formula Homework 1 MTH 4590 Spring 2018 1. Chapter 1, # 1: Prove that for all sets,, C, the formula ( C) = ( ) ( C) is true. Proof : It suffices to show that ( C) ( ) ( C) and ( ) ( C) ( C). ssume that x ( C),

More information

On Covering a Graph Optimally with Induced Subgraphs

On Covering a Graph Optimally with Induced Subgraphs On Covering a Graph Optimally with Induced Subgraphs Shripad Thite April 1, 006 Abstract We consider the problem of covering a graph with a given number of induced subgraphs so that the maximum number

More information

The Encoding Complexity of Network Coding

The Encoding Complexity of Network Coding The Encoding Complexity of Network Coding Michael Langberg Alexander Sprintson Jehoshua Bruck California Institute of Technology Email: mikel,spalex,bruck @caltech.edu Abstract In the multicast network

More information

6.856 Randomized Algorithms

6.856 Randomized Algorithms 6.856 Randomized Algorithms David Karger Handout #4, September 21, 2002 Homework 1 Solutions Problem 1 MR 1.8. (a) The min-cut algorithm given in class works because at each step it is very unlikely (probability

More information

Steiner Trees and Forests

Steiner Trees and Forests Massachusetts Institute of Technology Lecturer: Adriana Lopez 18.434: Seminar in Theoretical Computer Science March 7, 2006 Steiner Trees and Forests 1 Steiner Tree Problem Given an undirected graph G

More information

Solutions for the Exam 6 January 2014

Solutions for the Exam 6 January 2014 Mastermath and LNMB Course: Discrete Optimization Solutions for the Exam 6 January 2014 Utrecht University, Educatorium, 13:30 16:30 The examination lasts 3 hours. Grading will be done before January 20,

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

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

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

FINAL EXAM SOLUTIONS

FINAL EXAM SOLUTIONS COMP/MATH 3804 Design and Analysis of Algorithms I Fall 2015 FINAL EXAM SOLUTIONS Question 1 (12%). Modify Euclid s algorithm as follows. function Newclid(a,b) if a

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

by conservation of flow, hence the cancelation. Similarly, we have

by conservation of flow, hence the cancelation. Similarly, we have Chapter 13: Network Flows and Applications Network: directed graph with source S and target T. Non-negative edge weights represent capacities. Assume no edges into S or out of T. (If necessary, we can

More information

Introduction to Graph Theory

Introduction to Graph Theory Introduction to Graph Theory Tandy Warnow January 20, 2017 Graphs Tandy Warnow Graphs A graph G = (V, E) is an object that contains a vertex set V and an edge set E. We also write V (G) to denote the vertex

More information

Randomized Graph Algorithms

Randomized Graph Algorithms Randomized Graph Algorithms Vasileios-Orestis Papadigenopoulos School of Electrical and Computer Engineering - NTUA papadigenopoulos orestis@yahoocom July 22, 2014 Vasileios-Orestis Papadigenopoulos (NTUA)

More information

γ(ɛ) (a, b) (a, d) (d, a) (a, b) (c, d) (d, d) (e, e) (e, a) (e, e) (a) Draw a picture of G.

γ(ɛ) (a, b) (a, d) (d, a) (a, b) (c, d) (d, d) (e, e) (e, a) (e, e) (a) Draw a picture of G. MAD 3105 Spring 2006 Solutions for Review for Test 2 1. Define a graph G with V (G) = {a, b, c, d, e}, E(G) = {r, s, t, u, v, w, x, y, z} and γ, the function defining the edges, is given by the table ɛ

More information

ALGORITHMS EXAMINATION Department of Computer Science New York University December 17, 2007

ALGORITHMS EXAMINATION Department of Computer Science New York University December 17, 2007 ALGORITHMS EXAMINATION Department of Computer Science New York University December 17, 2007 This examination is a three hour exam. All questions carry the same weight. Answer all of the following six questions.

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

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

CHENNAI MATHEMATICAL INSTITUTE M.Sc. / Ph.D. Programme in Computer Science

CHENNAI MATHEMATICAL INSTITUTE M.Sc. / Ph.D. Programme in Computer Science CHENNAI MATHEMATICAL INSTITUTE M.Sc. / Ph.D. Programme in Computer Science Entrance Examination, 5 May 23 This question paper has 4 printed sides. Part A has questions of 3 marks each. Part B has 7 questions

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

Faster parameterized algorithms for Minimum Fill-In

Faster parameterized algorithms for Minimum Fill-In Faster parameterized algorithms for Minimum Fill-In Hans L. Bodlaender Pinar Heggernes Yngve Villanger Technical Report UU-CS-2008-042 December 2008 Department of Information and Computing Sciences Utrecht

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

CPS 102: Discrete Mathematics. Quiz 3 Date: Wednesday November 30, Instructor: Bruce Maggs NAME: Prob # Score. Total 60

CPS 102: Discrete Mathematics. Quiz 3 Date: Wednesday November 30, Instructor: Bruce Maggs NAME: Prob # Score. Total 60 CPS 102: Discrete Mathematics Instructor: Bruce Maggs Quiz 3 Date: Wednesday November 30, 2011 NAME: Prob # Score Max Score 1 10 2 10 3 10 4 10 5 10 6 10 Total 60 1 Problem 1 [10 points] Find a minimum-cost

More information

Faster parameterized algorithms for Minimum Fill-In

Faster parameterized algorithms for Minimum Fill-In Faster parameterized algorithms for Minimum Fill-In Hans L. Bodlaender Pinar Heggernes Yngve Villanger Abstract We present two parameterized algorithms for the Minimum Fill-In problem, also known as Chordal

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

COMP260 Spring 2014 Notes: February 4th

COMP260 Spring 2014 Notes: February 4th COMP260 Spring 2014 Notes: February 4th Andrew Winslow In these notes, all graphs are undirected. We consider matching, covering, and packing in bipartite graphs, general graphs, and hypergraphs. We also

More information

CS261: Problem Set #2

CS261: Problem Set #2 CS261: Problem Set #2 Due by 11:59 PM on Tuesday, February 9, 2016 Instructions: (1) Form a group of 1-3 students. You should turn in only one write-up for your entire group. (2) Submission instructions:

More information

Copyright 2007 Pearson Addison-Wesley. All rights reserved. A. Levitin Introduction to the Design & Analysis of Algorithms, 2 nd ed., Ch.

Copyright 2007 Pearson Addison-Wesley. All rights reserved. A. Levitin Introduction to the Design & Analysis of Algorithms, 2 nd ed., Ch. Iterative Improvement Algorithm design technique for solving optimization problems Start with a feasible solution Repeat the following step until no improvement can be found: change the current feasible

More information

CS261: A Second Course in Algorithms Lecture #16: The Traveling Salesman Problem

CS261: A Second Course in Algorithms Lecture #16: The Traveling Salesman Problem CS61: A Second Course in Algorithms Lecture #16: The Traveling Salesman Problem Tim Roughgarden February 5, 016 1 The Traveling Salesman Problem (TSP) In this lecture we study a famous computational problem,

More information

CMSC Theory of Algorithms Second Midterm

CMSC Theory of Algorithms Second Midterm NAME (please PRINT in large letters): SECTION: 01 02 (circle one) CMSC 27200 Theory of Algorithms Second Midterm 02-26-2015 The exam is closed book. Do not use notes. The use of ELECTRONIC DEVICES is strictly

More information

Graph Representations and Traversal

Graph Representations and Traversal COMPSCI 330: Design and Analysis of Algorithms 02/08/2017-02/20/2017 Graph Representations and Traversal Lecturer: Debmalya Panigrahi Scribe: Tianqi Song, Fred Zhang, Tianyu Wang 1 Overview This lecture

More information

Trees. 3. (Minimally Connected) G is connected and deleting any of its edges gives rise to a disconnected graph.

Trees. 3. (Minimally Connected) G is connected and deleting any of its edges gives rise to a disconnected graph. Trees 1 Introduction Trees are very special kind of (undirected) graphs. Formally speaking, a tree is a connected graph that is acyclic. 1 This definition has some drawbacks: given a graph it is not trivial

More information

Material handling and Transportation in Logistics. Paolo Detti Dipartimento di Ingegneria dell Informazione e Scienze Matematiche Università di Siena

Material handling and Transportation in Logistics. Paolo Detti Dipartimento di Ingegneria dell Informazione e Scienze Matematiche Università di Siena Material handling and Transportation in Logistics Paolo Detti Dipartimento di Ingegneria dell Informazione e Scienze Matematiche Università di Siena Introduction to Graph Theory Graph Theory As Mathematical

More information

Byzantine Consensus in Directed Graphs

Byzantine Consensus in Directed Graphs Byzantine Consensus in Directed Graphs Lewis Tseng 1,3, and Nitin Vaidya 2,3 1 Department of Computer Science, 2 Department of Electrical and Computer Engineering, and 3 Coordinated Science Laboratory

More information

Greedy Algorithms 1. For large values of d, brute force search is not feasible because there are 2 d

Greedy Algorithms 1. For large values of d, brute force search is not feasible because there are 2 d Greedy Algorithms 1 Simple Knapsack Problem Greedy Algorithms form an important class of algorithmic techniques. We illustrate the idea by applying it to a simplified version of the Knapsack Problem. Informally,

More information

1 Matching in Non-Bipartite Graphs

1 Matching in Non-Bipartite Graphs CS 369P: Polyhedral techniques in combinatorial optimization Instructor: Jan Vondrák Lecture date: September 30, 2010 Scribe: David Tobin 1 Matching in Non-Bipartite Graphs There are several differences

More information

Source. Sink. Chapter 10: Iterative Programming Maximum Flow Problem. CmSc250 Intro to Algorithms

Source. Sink. Chapter 10: Iterative Programming Maximum Flow Problem. CmSc250 Intro to Algorithms Chapter 10: Iterative Programming Maximum Flow Problem CmSc20 Intro to Algorithms A flow network is a model of a system where some material is produced at its source, travels through the system, and is

More information

Chapter 5 Graph Algorithms Algorithm Theory WS 2012/13 Fabian Kuhn

Chapter 5 Graph Algorithms Algorithm Theory WS 2012/13 Fabian Kuhn Chapter 5 Graph Algorithms Algorithm Theory WS 2012/13 Fabian Kuhn Graphs Extremely important concept in computer science Graph, : node (or vertex) set : edge set Simple graph: no self loops, no multiple

More information

Definition: A graph G = (V, E) is called a tree if G is connected and acyclic. The following theorem captures many important facts about trees.

Definition: A graph G = (V, E) is called a tree if G is connected and acyclic. The following theorem captures many important facts about trees. Tree 1. Trees and their Properties. Spanning trees 3. Minimum Spanning Trees 4. Applications of Minimum Spanning Trees 5. Minimum Spanning Tree Algorithms 1.1 Properties of Trees: Definition: A graph G

More information

Monotone Paths in Geometric Triangulations

Monotone Paths in Geometric Triangulations Monotone Paths in Geometric Triangulations Adrian Dumitrescu Ritankar Mandal Csaba D. Tóth November 19, 2017 Abstract (I) We prove that the (maximum) number of monotone paths in a geometric triangulation

More information

Problem set 2. Problem 1. Problem 2. Problem 3. CS261, Winter Instructor: Ashish Goel.

Problem set 2. Problem 1. Problem 2. Problem 3. CS261, Winter Instructor: Ashish Goel. CS261, Winter 2017. Instructor: Ashish Goel. Problem set 2 Electronic submission to Gradescope due 11:59pm Thursday 2/16. Form a group of 2-3 students that is, submit one homework with all of your names.

More information

Graph Connectivity G G G

Graph Connectivity G G G Graph Connectivity 1 Introduction We have seen that trees are minimally connected graphs, i.e., deleting any edge of the tree gives us a disconnected graph. What makes trees so susceptible to edge deletions?

More information

CSC 8301 Design & Analysis of Algorithms: Linear Programming

CSC 8301 Design & Analysis of Algorithms: Linear Programming CSC 8301 Design & Analysis of Algorithms: Linear Programming Professor Henry Carter Fall 2016 Iterative Improvement Start with a feasible solution Improve some part of the solution Repeat until the solution

More information

1 Minimum Cut Problem

1 Minimum Cut Problem CS 6 Lecture 6 Min Cut and Karger s Algorithm Scribes: Peng Hui How, Virginia Williams (05) Date: November 7, 07 Anthony Kim (06), Mary Wootters (07) Adapted from Virginia Williams lecture notes Minimum

More information

Ma/CS 6b Class 5: Graph Connectivity

Ma/CS 6b Class 5: Graph Connectivity Ma/CS 6b Class 5: Graph Connectivity By Adam Sheffer Communications Network We are given a set of routers and wish to connect pairs of them to obtain a connected communications network. The network should

More information

Approximation Algorithms: The Primal-Dual Method. My T. Thai

Approximation Algorithms: The Primal-Dual Method. My T. Thai Approximation Algorithms: The Primal-Dual Method My T. Thai 1 Overview of the Primal-Dual Method Consider the following primal program, called P: min st n c j x j j=1 n a ij x j b i j=1 x j 0 Then the

More information

Min-Cut and Randomization

Min-Cut and Randomization Min-Cut and Randomization Algorithm Design Kleinberg and Tardos, section 13. Notes by Scoπ Alfeld 17.11.08 1: Min-Cut We define the problem of Min-Cut as follows. Given an undirected graph G = {V, E} with

More information

CS261: A Second Course in Algorithms Lecture #3: The Push-Relabel Algorithm for Maximum Flow

CS261: A Second Course in Algorithms Lecture #3: The Push-Relabel Algorithm for Maximum Flow CS26: A Second Course in Algorithms Lecture #3: The Push-Relabel Algorithm for Maximum Flow Tim Roughgarden January 2, 206 Motivation The maximum flow algorithms that we ve studied so far are augmenting

More information

1 Linear programming relaxation

1 Linear programming relaxation Cornell University, Fall 2010 CS 6820: Algorithms Lecture notes: Primal-dual min-cost bipartite matching August 27 30 1 Linear programming relaxation Recall that in the bipartite minimum-cost perfect matching

More information

Lecture and notes by: Sarah Fletcher and Michael Xu November 3rd, Multicommodity Flow

Lecture and notes by: Sarah Fletcher and Michael Xu November 3rd, Multicommodity Flow Multicommodity Flow 1 Introduction Suppose we have a company with a factory s and a warehouse t. The quantity of goods that they can ship from the factory to the warehouse in a given time period is limited

More information

These notes present some properties of chordal graphs, a set of undirected graphs that are important for undirected graphical models.

These notes present some properties of chordal graphs, a set of undirected graphs that are important for undirected graphical models. Undirected Graphical Models: Chordal Graphs, Decomposable Graphs, Junction Trees, and Factorizations Peter Bartlett. October 2003. These notes present some properties of chordal graphs, a set of undirected

More information

Lecture 8: The Traveling Salesman Problem

Lecture 8: The Traveling Salesman Problem Lecture 8: The Traveling Salesman Problem Let G = (V, E) be an undirected graph. A Hamiltonian cycle of G is a cycle that visits every vertex v V exactly once. Instead of Hamiltonian cycle, we sometimes

More information

22 Elementary Graph Algorithms. There are two standard ways to represent a

22 Elementary Graph Algorithms. There are two standard ways to represent a VI Graph Algorithms Elementary Graph Algorithms Minimum Spanning Trees Single-Source Shortest Paths All-Pairs Shortest Paths 22 Elementary Graph Algorithms There are two standard ways to represent a graph

More information

Advanced Methods in Algorithms HW 5

Advanced Methods in Algorithms HW 5 Advanced Methods in Algorithms HW 5 Written by Pille Pullonen 1 Vertex-disjoint cycle cover Let G(V, E) be a finite, strongly-connected, directed graph. Let w : E R + be a positive weight function dened

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

(Refer Slide Time: 00:18)

(Refer Slide Time: 00:18) Programming, Data Structures and Algorithms Prof. N. S. Narayanaswamy Department of Computer Science and Engineering Indian Institute of Technology, Madras Module 11 Lecture 58 Problem: single source shortest

More information

Minimum Cost Edge Disjoint Paths

Minimum Cost Edge Disjoint Paths Minimum Cost Edge Disjoint Paths Theodor Mader 15.4.2008 1 Introduction Finding paths in networks and graphs constitutes an area of theoretical computer science which has been highly researched during

More information

HOMEWORK FILE SOLUTIONS

HOMEWORK FILE SOLUTIONS Data Structures Course (CSCI-UA 102) Professor Yap Spring 2012 HOMEWORK FILE February 13, 2012 SOLUTIONS 1 Homework 2: Due on Thu Feb 16 Q1. Consider the following function called crossproduct: int crossproduct(int[]

More information

CS 372: Computational Geometry Lecture 10 Linear Programming in Fixed Dimension

CS 372: Computational Geometry Lecture 10 Linear Programming in Fixed Dimension CS 372: Computational Geometry Lecture 10 Linear Programming in Fixed Dimension Antoine Vigneron King Abdullah University of Science and Technology November 7, 2012 Antoine Vigneron (KAUST) CS 372 Lecture

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

1 (15 points) LexicoSort

1 (15 points) LexicoSort CS161 Homework 2 Due: 22 April 2016, 12 noon Submit on Gradescope Handed out: 15 April 2016 Instructions: Please answer the following questions to the best of your ability. If you are asked to show your

More information

Math 454 Final Exam, Fall 2005

Math 454 Final Exam, Fall 2005 c IIT Dept. Applied Mathematics, December 12, 2005 1 PRINT Last name: Signature: First name: Student ID: Math 454 Final Exam, Fall 2005 I. Examples, Counterexamples and short answer. (6 2 ea.) Do not give

More information

Greedy algorithms is another useful way for solving optimization problems.

Greedy algorithms is another useful way for solving optimization problems. Greedy Algorithms Greedy algorithms is another useful way for solving optimization problems. Optimization Problems For the given input, we are seeking solutions that must satisfy certain conditions. These

More information

CME 305: Discrete Mathematics and Algorithms Instructor: Reza Zadeh HW#3 Due at the beginning of class Thursday 02/26/15

CME 305: Discrete Mathematics and Algorithms Instructor: Reza Zadeh HW#3 Due at the beginning of class Thursday 02/26/15 CME 305: Discrete Mathematics and Algorithms Instructor: Reza Zadeh (rezab@stanford.edu) HW#3 Due at the beginning of class Thursday 02/26/15 1. Consider a model of a nonbipartite undirected graph in which

More information

Framework for Design of Dynamic Programming Algorithms

Framework for Design of Dynamic Programming Algorithms CSE 441T/541T Advanced Algorithms September 22, 2010 Framework for Design of Dynamic Programming Algorithms Dynamic programming algorithms for combinatorial optimization generalize the strategy we studied

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

Complexity of Disjoint Π-Vertex Deletion for Disconnected Forbidden Subgraphs

Complexity of Disjoint Π-Vertex Deletion for Disconnected Forbidden Subgraphs Journal of Graph Algorithms and Applications http://jgaa.info/ vol. 18, no. 4, pp. 603 631 (2014) DOI: 10.7155/jgaa.00339 Complexity of Disjoint Π-Vertex Deletion for Disconnected Forbidden Subgraphs Jiong

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

On the Relationships between Zero Forcing Numbers and Certain Graph Coverings

On the Relationships between Zero Forcing Numbers and Certain Graph Coverings On the Relationships between Zero Forcing Numbers and Certain Graph Coverings Fatemeh Alinaghipour Taklimi, Shaun Fallat 1,, Karen Meagher 2 Department of Mathematics and Statistics, University of Regina,

More information

Strongly connected: A directed graph is strongly connected if every pair of vertices are reachable from each other.

Strongly connected: A directed graph is strongly connected if every pair of vertices are reachable from each other. Directed Graph In a directed graph, each edge (u, v) has a direction u v. Thus (u, v) (v, u). Directed graph is useful to model many practical problems (such as one-way road in traffic network, and asymmetric

More information

Matching. Algorithms and Networks

Matching. Algorithms and Networks Matching Algorithms and Networks This lecture Matching: problem statement and applications Bipartite matching (recap) Matching in arbitrary undirected graphs: Edmonds algorithm Diversion: generalized tic-tac-toe

More information

Tutorial for Algorithm s Theory Problem Set 5. January 17, 2013

Tutorial for Algorithm s Theory Problem Set 5. January 17, 2013 Tutorial for Algorithm s Theory Problem Set 5 January 17, 2013 Exercise 1: Maximum Flow Algorithms Consider the following flow network: a) Solve the maximum flow problem on the above network by using the

More information

Flexible Coloring. Xiaozhou Li a, Atri Rudra b, Ram Swaminathan a. Abstract

Flexible Coloring. Xiaozhou Li a, Atri Rudra b, Ram Swaminathan a. Abstract Flexible Coloring Xiaozhou Li a, Atri Rudra b, Ram Swaminathan a a firstname.lastname@hp.com, HP Labs, 1501 Page Mill Road, Palo Alto, CA 94304 b atri@buffalo.edu, Computer Sc. & Engg. dept., SUNY Buffalo,

More information