Introduction to Algorithms
Introduction to Algorithms
3rd Edition
ISBN: 9780262033848
Author: Thomas H. Cormen, Ronald L. Rivest, Charles E. Leiserson, Clifford Stein
Publisher: MIT Press
Question
Chapter 34.1, Problem 1E
Program Plan Intro

To show the optimization problem LONGEST-PATH-LENGTH could be solved in polynomial time only if LONGEST-PATHP

Blurred answer
Students 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…
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.
    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
    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…
  • 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.
    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).).
    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.
    • SEE MORE QUESTIONS
    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