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 35, Problem 4P
a.
Program Plan Intro
To show that a maximal matching need not be a maximum matching by drawing an undirected graph G.
b.
Program Plan Intro
To show that the linear-time greedy
c.
Program Plan Intro
To show that the size of a maximum matching in G is a lower bound on the size of any vertex cover for G.
d.
Program Plan Intro
To prove that the number of bins used by the first-fit heuristic is never more than
e.
Program Plan Intro
To prove an approximation ratio of 2 for the first-fit heuristic.
f.
Program Plan Intro
To give an efficient implementation of the first-fit heuristic, and analyze its running time.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
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).
Let 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.
The clique problem is finding cliques in a diagram. A clique is a set of vertices that are adjacent to each other. The 4-clique is a set of four knots all connected. So, in this example of the 4-clique problem, we have a graph with 7 vertices. A brute force algorithm searched all possible combinations of four vertices and found a set that formed a clique. If you want to understand more about it, the problem (and if possible read on). Note that the clique problem is NP-complete, so deterministic search is not practical for large graph sizes. This makes it an ideal candidate for evolutionary exploration. In this problem, we have to assume that we are given the problem of implementing the 4-clique problem as an evolutionary algorithm for an arbitrary graph with an arbitrary number of vertices (an n-vertex graph). If 4 cliques are found, the algorithm succeeds.
1. Provide an algebraic expression, in terms of n, for the size of the phenotypic search space (the number of possible…
Chapter 35 Solutions
Introduction to Algorithms
Ch. 35.1 - Prob. 1ECh. 35.1 - Prob. 2ECh. 35.1 - Prob. 3ECh. 35.1 - Prob. 4ECh. 35.1 - Prob. 5ECh. 35.2 - Prob. 1ECh. 35.2 - Prob. 2ECh. 35.2 - Prob. 3ECh. 35.2 - Prob. 4ECh. 35.2 - Prob. 5E
Ch. 35.3 - Prob. 1ECh. 35.3 - Prob. 2ECh. 35.3 - Prob. 3ECh. 35.3 - Prob. 4ECh. 35.3 - Prob. 5ECh. 35.4 - Prob. 1ECh. 35.4 - Prob. 2ECh. 35.4 - Prob. 3ECh. 35.4 - Prob. 4ECh. 35.5 - Prob. 1ECh. 35.5 - Prob. 2ECh. 35.5 - Prob. 3ECh. 35.5 - Prob. 4ECh. 35.5 - Prob. 5ECh. 35 - Prob. 1PCh. 35 - Prob. 2PCh. 35 - Prob. 3PCh. 35 - Prob. 4PCh. 35 - Prob. 5PCh. 35 - Prob. 6PCh. 35 - Prob. 7P
Knowledge Booster
Similar questions
- Graphs with random intervals. Consider a set of V intervals on the real line (real number pairs). An interval graph is defined by such a collection, with one vertex corresponding to each interval and edges linking vertices if the respective intervals overlap (have any points in common). Create a programme that creates V random intervals in the unit interval, each of length d, and then constructs the matching interval graph.Use a BST as a hint.arrow_forwardLet 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_forwardThroughout, 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_forward
- Apply the Breadth first traversal algorithm to the undirected graph G given in Example and replicated here for convenience. The goal is to do a Breadth first search for the key 9.arrow_forwardLet DIST (u, v) denote the distance between vertex u and v. It is well known that distances in graphs satisfy the triangle inequality. That is, for any three vertices u, v, w, DIST (u, v) ≤ DIST (u, w) + DIST (w, v). Let D∗ denote the distance between the two farthest nodes in G. Show that for any vertex s D∗ ≤ 2 max DIST (s, v).arrow_forwardA graph G=(v, e) is a _______ graph, if we can partition V=L u R, s.t. all edges in E go between L and R.arrow_forward
- Suppose you are given a fully connected graph where the weight of all the edges is the same. Now, if you want to find the Minimum Spanning Tree of that graph then is there any better algorithm to do that. If Yes then write the name of that algorithm otherwise write No.arrow_forwardWe recollect that Kruskal's Algorithm is used to find the minimum spanning tree in a weighted graph. Given a weighted undirected graph G = (V , E, W), with n vertices/nodes, the algorithm will first sort the edges in E according to their weights. It will then select (n-1) edges with smallest weights that do not form a cycle. (A cycle in a graph is a path along the edges of a graph that starts at a node and ends at the same node after visiting at least one other node and not traversing any of the edges more than once.) Use Kruskal's Algorithm to nd the weight of the minimum spanning tree for the following graph.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
- Is it true or false? If it is true, include a (short, but clear) argument why it is true, and if it is false, include a concrete graph which shows that the claim is false.a) If all vertices in a connected graph have even degree, then for whichever two vertices u and v in the graph you choose, there is an Eulerian trail between u and v. b) Given a graph G we construct a new graph H by adding a new vertex v and edges between v and every vertex of G. If G is Hamiltonian, then so is H.c) We know that if a graph has a walk between u and v it also has a path between u and v, for any two vertices u and v. Is it always true that if a graph has a circuit containing u and v it also has a cycle containing u and v? d) The complete bipartite graph K?,?(lowered indicies) is Hamiltonian if and only if m = n ≥ 2.arrow_forwardAnswer True or False to the following claims: a. If G is graph on at most 5 vertices and every vertex has degree 2, then G is a cycle. b. Let G be a forest. If we add an edge to G, then G is no longer a forest. c. Let G be a graph, and let u, v, and w be vertices in G. Suppose that a shortest path from u to v in G is of length 3, andsuppose that a shortest path from v to w in G is of length 4. Then a shortest path from u to w in G is of length 7.arrow_forwardAdvanced Physics Chegg experts gave the wrong answer the last time I asked this, so I am asking it again. Please only answer if you know how to solve the problem! Consider a directed graph G = (V, E) having a source vertex s and sink vertex t. Suppose that it has positive integer edge capacities c_e for all edges in the graph. Also suppose that is has a flow f = {f(e)} for all edges in the graph. We consider an edge to be saturated if f(e) = c_e. Suppose that f is a maximum s-t flow. Let S represent the set of all saturated edges. Consider the minimum total capacity of any given s-t cut. Will it be equal to the total capacity of S? If true, please provide a proof. Otherwise, if it is false, give a counterexample.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