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 34.1, Problem 1E
Program Plan Intro
To show the optimization problem
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Let G be a graph with n vertices. The k-coloring problem is to decide whether the vertices of G can be labeled from the set {1, 2, ..., k} such that for every edge (v,w) in the graph, the labels of v and w are different.
Is the (n-4)-coloring problem in P or in NP? Give a formal proof for your answer. A 'Yes' or 'No' answer is not sufficient to get a non-zero mark on this question.
Given a directed graph with positive edge lengths and two distinct vertices uand v in the graph, the “all-pairs uv-constrained shortest path problem” is the problemof computing for each pair of vertices i and j the length of the shortest path from i toj that goes through the vertex u or through the vertex v. If no such path exists, theanswer is ∞. Describe an algorithm that takes a graph G = (V, E) and vertices u and v asinput parameters and computes values L(i, j) that represent the length of uv-constrainedshortest path from i to j for all 1 ≤ i, j ≤ |V|, i ! = u, j ! = u, i != v, j ! = v. Provide clearpseudocode solution. Prove your algorithm correct. Your algorithm must have runningtime in O(|V| ^2).
Recall the Clique problem: given a graph G and a value k, check whether G has a set S of k vertices that's a clique. A clique is a subset of vertices S such that for all u, v € S, uv is an edge of G. The goal of this problem is to establish the NP-hardness of Clique by reducing VertexCover, which is itself an NP-hard problem, to Clique.
Recall that a vertex cover is a set of vertices S such that every edge uv has at least one endpoint (u or v) in S, and the VertexCover problem is given a graph H and a value 1, check whether H has a vertex cover of size at most 1. Note that all these problems are already phrased as decision problems, and you only need to show the NP-Hardness of Clique. In other words, we will only solve the reduction part in this problem, and you DO NOT need to show that Clique is in NP.
Q4.1
Let S be a subset of vertices in G, and let C be the complement graph of G (where uv is an edge in C if and only if uv is not an edge in G).
Prove that for any subset of vertices…
Chapter 34 Solutions
Introduction to Algorithms
Ch. 34.1 - Prob. 1ECh. 34.1 - Prob. 2ECh. 34.1 - Prob. 3ECh. 34.1 - Prob. 4ECh. 34.1 - Prob. 5ECh. 34.1 - Prob. 6ECh. 34.2 - Prob. 1ECh. 34.2 - Prob. 2ECh. 34.2 - Prob. 3ECh. 34.2 - Prob. 4E
Ch. 34.2 - Prob. 5ECh. 34.2 - Prob. 6ECh. 34.2 - Prob. 7ECh. 34.2 - Prob. 8ECh. 34.2 - Prob. 9ECh. 34.2 - Prob. 10ECh. 34.2 - Prob. 11ECh. 34.3 - Prob. 1ECh. 34.3 - Prob. 2ECh. 34.3 - Prob. 3ECh. 34.3 - Prob. 4ECh. 34.3 - Prob. 5ECh. 34.3 - Prob. 6ECh. 34.3 - Prob. 7ECh. 34.3 - Prob. 8ECh. 34.4 - Prob. 1ECh. 34.4 - Prob. 2ECh. 34.4 - Prob. 3ECh. 34.4 - Prob. 4ECh. 34.4 - Prob. 5ECh. 34.4 - Prob. 6ECh. 34.4 - Prob. 7ECh. 34.5 - Prob. 1ECh. 34.5 - Prob. 2ECh. 34.5 - Prob. 3ECh. 34.5 - Prob. 4ECh. 34.5 - Prob. 5ECh. 34.5 - Prob. 6ECh. 34.5 - Prob. 7ECh. 34.5 - Prob. 8ECh. 34 - Prob. 1PCh. 34 - Prob. 2PCh. 34 - Prob. 3PCh. 34 - Prob. 4P
Knowledge Booster
Similar questions
Consider a graph G that is comprised only of non-negative weight edges such that (u, v) € E, w(u, w) > 0. Is it possible for Bellman-Ford and Dijkstra's algorithm to produce different shortest path trees despite always producing the same shortest-path weights? Justify your answer.
arrow_forward
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 matching
arrow_forward
Consider the so-called k-Minimum Spanning Tree (k-MST) problem, which is defined as follows.
An instance of the k-MST problem is given by a connected undirected graph G=(V,E) with edge weights w:E→Q and a natural number k>2. The question is to find a tree with exactly k nodes that is a subgraph of G and minimises the weight among all such trees. Informally, k-MST is the variant of the minimum spanning tree problem, where instead of a spanning tree one wants to find a tree with exactly k nodes.
What would be the result if we apply Prim's, respectively Kruskal's, algorithm to the problem by stopping both algorithms after k−1 edges have been added? In the following we refer to these versions of Prim's and Kruskal's algorithm as the modified algorithm of Prime or Kruskal, respectively.
a) consider the following graph. (image provided- image 1)
For which of the following edge weights, assigned to the graph above, does the modified algorithm of Kruskal provide a wrong result assuming…
arrow_forward
Answer 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_forward
how could someone solce this one?
The Chinese postman problem: Consider an undirected connected graph and a given starting node. The Chinese postman has to find the shortest route through the graph that starts and ends in the starting node such that all links are passed. The same problem appears for instance for snow cleaning or garbage collection in a city. For a branch-and-bound algorithm, find a possible lower bound function. (Remark: If the problem is to pass through all nodes of the graph, it is called the travelling salesman problem - which needs different solution algorithms, but also of the branch-and-bound type).).
arrow_forward
please answer both of the questions.
7. The Bellman-Ford algorithm for single-source shortest paths on a graph G(V,E) as discussed in class has a running time of O|V |3, where |V | is the number of vertices in the given graph. However, when the graph is sparse (i.e., |E| << |V |2), then this running time can be improved to O(|V ||E|). Describe how how this can be done..
8. Let G(V,E) be an undirected graph such that each vertex has an even degree. Design an O(|V |+ |E|) time algorithm to direct the edges of G such that, for each vertex, the outdegree is equal to the indegree.
Please give proper explanation and typed answer only.
arrow_forward
LONG-Route is the issue of finding whether or not there is a simple path in G from u to v with a length of at least k given the inputs (G, u, v, k), where G is a graph, u and v are vertices, and k is an integer.Demonstrate that LONG-PATH is an NP-complete problem.
arrow_forward
If A is NP-complete, and A has a polynomial time algorithm, then there is a polynomial time algorithm to find the largest clique in a directed. A clique in a graph G(V, E) is a subset of vertices V’ such that there is an edge (u,v) in E between every two vertices u and v in V’.
For example, the four vertices u2, u3,u5, and u6 form the largest clique in the graph below.
arrow_forward
Implement The dynamic programming algorithm for the leveled graph problem.
pre-cond: G is a weighted directed layered graph, and s and t are nodes. post-cond: optSol is a path with minimum total weight from s tot, and optCost is its weight, and optNum is the number of possible optimal solutions.
arrow_forward
Suppose we have the following undirected graph, and we know that the two
bolded edges (B-E and G-E) constitute the global minimum cut of the graph.
1. If we run the Karger’s algorithm for just one time to find the global minimum cut, what is the probability for the algorithm to find the minimum cut correctly? Please show your reasoning process.
2. How many times do we need to run the Karger’s algorithm if we want to guarantee that the probability of success is greater than or equal to
0.95, by “success” we mean that there is at least one time the Karger’s algorithm correctly found the minimum cut. Please show your reasoning process. [You do not have to work out the exact value of a logarithm]
arrow_forward
Consider a directed graph G=(V,E) with n vertices, m edges, a starting vertex s∈V, real-valued edge lengths, and no negative cycles. Suppose you know that every shortest path in G from s to another vertex has at most k edges. How quickly can you solve the single-source shortest path problem? (Choose the strongest statement that is guaranteed to be true.) a) O(m+n) b) O(kn) c) O( km) d) O(mn)
arrow_forward
What is the largest and what is the smallest number of distinct solutions the maximum-cardinality-matching problem can have for a bipartite graph G = <V, U, E> with n vertices in each vertex set V and U and at least n edges?
arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
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
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