Introduction to Algorithms
3rd Edition
ISBN: 9780262033848
Author: Thomas H. Cormen, Ronald L. Rivest, Charles E. Leiserson, Clifford Stein
Publisher: MIT Press
expand_more
expand_more
format_list_bulleted
Question
Chapter 26.3, Problem 4E
Program Plan Intro
To explain that there exists a perfect matching in graph
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Consider an undirected graph G = (V;E). An independent set is a subset I V such that for any vertices i; j 2 I,
there is no edge between i and j in E. A set i is a maximal independent set if no additional vertices of V can be
added to I without violating its independence. Note, however, that a maximal independent sent is not necessarily
the largest independent set in G. Let (G) denote the size of the largest maximal independent set in G.
1) What is (G) if G is a complete graph on n vertices? What if G is a cycle on n vertices?
A directed graph G= (V,E) consists of a set of vertices V, and a set of edges E such that each element e in E is an ordered pair (u,v), denoting an edge directed from u to v. In a directed graph, a directed cycle of length three is a triple of vertices (x,y,z) such that each of (x,y) (y,z) and (z,x) is an edge in E. Write a Mapreduce algorithm whose input is a directed graph presented as a list of edges (on a file in HDFS), and whose output is the list of all directed cycles of length three in G.
Write the pseudocode for the mappers/reducers methods. Also, assuming that there are M mappers, R reducers, m edges and n vertices -- analyze the (upper-bound of the) communication cost(s).
Consider an undirected graph G = (V;E). An independent set is a subset I V such that for any vertices i; j 2 I,
there is no edge between i and j in E. A set i is a maximal independent set if no additional vertices of V can be
added to I without violating its independence. Note, however, that a maximal independent sent is not necessarily
the largest independent set in G. Let (G) denote the size of the largest maximal independent set in G.
One way of trying to avoid this dependence on ordering is the use of randomized algorithms. Essentially, by processing
the vertices in a random order, you can potentially avoid (with high probability) any particularly bad orderings. So
consider the following randomized algorithm for constructing independent sets:
@ First, starting with an empty set I, add each vertex of G to I independently with probability p.
@ Next, for any edges with both vertices in I, delete one of the two vertices from I (at random).
@ Note - in this second step,…
Chapter 26 Solutions
Introduction to Algorithms
Ch. 26.1 - Prob. 1ECh. 26.1 - Prob. 2ECh. 26.1 - Prob. 3ECh. 26.1 - Prob. 4ECh. 26.1 - Prob. 5ECh. 26.1 - Prob. 6ECh. 26.1 - Prob. 7ECh. 26.2 - Prob. 1ECh. 26.2 - Prob. 2ECh. 26.2 - Prob. 3E
Ch. 26.2 - Prob. 4ECh. 26.2 - Prob. 5ECh. 26.2 - Prob. 6ECh. 26.2 - Prob. 7ECh. 26.2 - Prob. 8ECh. 26.2 - Prob. 9ECh. 26.2 - Prob. 10ECh. 26.2 - Prob. 11ECh. 26.2 - Prob. 12ECh. 26.2 - Prob. 13ECh. 26.3 - Prob. 1ECh. 26.3 - Prob. 2ECh. 26.3 - Prob. 3ECh. 26.3 - Prob. 4ECh. 26.3 - Prob. 5ECh. 26.4 - Prob. 1ECh. 26.4 - Prob. 2ECh. 26.4 - Prob. 3ECh. 26.4 - Prob. 4ECh. 26.4 - Prob. 5ECh. 26.4 - Prob. 6ECh. 26.4 - Prob. 7ECh. 26.4 - Prob. 8ECh. 26.4 - Prob. 9ECh. 26.4 - Prob. 10ECh. 26.5 - Prob. 1ECh. 26.5 - Prob. 2ECh. 26.5 - Prob. 3ECh. 26.5 - Prob. 4ECh. 26.5 - Prob. 5ECh. 26 - Prob. 1PCh. 26 - Prob. 2PCh. 26 - Prob. 3PCh. 26 - Prob. 4PCh. 26 - Prob. 5PCh. 26 - Prob. 6P
Knowledge Booster
Similar questions
- Let G = (X ∪ Y, E) be a bipartite graph such that the vertices are partitioned into two groups Xand Y , and each edge has one end point in X and one end point in Y .A 2-1 generalized matching is a set of edges S ⊂ E satisfying the following two conditions:1. Every vertex in X belongs to at most two edges in S.2. Every vertex in Y belongs to at most one edge in S.Give an algorithm to find the size (number of edges) of maximum 2-1 generalized matchingarrow_forward. Let G be a weighted, connected, undirected graph, and let V1 and V2 be a partition of the vertices of G into two disjoint nonempty sets. Furthermore, let e be an edge in the minimum spanning tree for G such that e has one endpoint in V1 and the other in V2. Give an example that shows that e is not necessarily the smallest- weight edge that has one endpoint in V1 and the other in V2.arrow_forwardLet G be a directed graph where each edge is colored either red, white, or blue. A walk in G is called a patriotic walk if its sequence of edge colors is red, white, blue, red, white, blue, and soon. Formally ,a walk v0 →v1 →...vk is a patriotic walk if for all 0≤i<k, the edge vi →vi+1 is red if i mod3=0, white if i mod3=1,and blue if i mod3=2. Given a graph G, you wish to find all vertices in G that can be reached from a given vertex v by a patriotic walk. Show that this can be accomplished by efficiently constructing a new graph G′ from G, such that the answer is determined by a single call to DFS in G′. Do not forget to analyze your algorithm.arrow_forward
- What is the largest and what is the smallest possible cardinality of a matching in a bipartite graph G = <V, U, E> with n vertices in each vertex set V and U and at least n edges?arrow_forwardTrue or false: let G be an arbitrary connected, undirected graph with a distinct cost c(e) on every edge e. suppose e* is the cheapest edge in G; that is, c(e*) <c(e) for every edge e is not equal to e*. Any minimum spanning tree T of G contains the edge e*arrow_forwardLet G = (V, E) be an undirected graph and each edge e ∈ E is associated with a positive weight ℓ(e).For simplicity we assume weights are distinct. Is the following statement true or false? Prove by contradiction or counterexample. Let T be a minimum spanning tree for the graph with the original weight. Suppose we replace eachedge weight ℓ(e) with ℓ(e)^2, then T is still a minimum spanning tree.arrow_forward
- Throughout, a graph is given as input as an adjacency list. That is, G is a dictionary where the keysare vertices, and for a vertex v,G[v] = [u such that there is an edge going from v to u].In the case that G is undirected, for every edge u − v, v is in G[u] and u is in G[v]. 3. Write the full pseudocode for the following problem.Input: A directed graph G, and an ordering on the vertices given in a list A.Output: Is A a topological order? In other words, is there an i, j such that i < j and there is an edge fromA[j] to A[i]?arrow_forwardWe have a connected graph G=(V,E), and a specific vertex u∈V. Suppose we compute a depth-first search tree rooted at u, and obtain a tree T that includes all nodes of G. Suppose we then compute a breadth-first search tree rooted at u, and obtain the same tree T. Prove that G=T. (In other words, if T is both a depth-first search tree and a breadth-first search tree rooted at u, then G cannot contain any edges that do not belong to T.)arrow_forwardLet G = (V, E) be a graph with vertex-set V = {1, 2, 3, 4, 5} and edge-set E = {(1, 2), (3, 2), (4, 3), (1, 4), (2, 4), (1, 3)}. (a) Draw the graph. Find (b) maximal degree, i.e. ∆(G), (c) minimal degree, i.e. δ(G), (d) the size of biggest clique, i.e. ω(G),(e) the size of biggest independent set, i.e. α(G), ter(f) the minimal number of colours needed to color the graph, i.e. χ(G).arrow_forward
- Let G be a graph with 7 vertices, where eachvertex is labelled by a number from 1 to 7. Twovertices are selected at random. Let us call themu and v. Now, directed edges are drawn from u toall other vertices except v and directed edges aredrawn from all vertices to v except from u. Let xbe the total possible topological sortings of G.hint: You may remember the terms factorials orfibonacci?Write down the value of x:arrow_forwardLet G be a connected graph with n vertices and m edges.Which of the following statements are true?(i) G is a tree if and only if n = m+1.(ii) G is a tree if and only if m = n+1.(iii) G is a tree if and only if the addition of any edgeto G will produce a unique cycle.(iv) G is a tree if and only if G contains at least onepath b etween any two vertices.(v) If G is connected, then G is a tree if and only if Gcontains at most one path between any two vertices.(vi) A connected subgraph of a tree is always a tree.arrow_forwardSuppose X is a subset of vertices in a G = (V,E). Give a polynomial-time algorithm to test whether there exists a matching in G covering X.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education