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.2, Problem 3E
Program Plan Intro
To prove that the total cost of tour is not more than the twice the cost of an optimal hour.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Given N cities represented as vertices V₁, V2,..., UN on an undirected graph (i.e., each edge can be traversed
in both directions). The graph is fully-connected where the edge eij connecting any two vertices v; and vj
is the straight-line distance between these two cities. We want to search for the shortest path from v₁ (the
source) to VN (the destination).
Assume that all edges have different values, and e₁, has the largest value among the edges. That is, the
source and destination have the largest straight-line distance. Compare the lists of explored vertices
when we run the uniform-cost search and the A* search for this problem.
Hint: The straight-line distance is the shortest path between any two cities. If you do not know how to
start, try to run the algorithms by hand on some small cases first; but remember to make sure your graphs
satisfy the conditions in the question.
Consider a connected undirected graph G=(V,E) in which every edge e∈E has a distinct and nonnegative cost. Let T be an MST and P a shortest path from some vertex s to some other vertex t. Now suppose the cost of every edge e of G is increased by 1 and becomes ce+1. Call this new graph G′. Which of the following is true about G′ ? a) T must be an MST and P must be a shortest s - t path. b) T must be an MST but P may not be a shortest s - t path. c) T may not be an MST but P must be a shortest s - t path. d) T may not be an MST and P may not be a shortest s−t path.
Pls use Kruskal's algorithm to reason about the MST.
3) The graph k-coloring problem is stated as follows: Given an undirected graph G = (V,E)
with N vertices and M edges and an integer k. Assign to each vertex v in Va color c(v)
such that 1< c(v)
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
- Algorithm : (1. Single-destination Shortest Path, 2. Bellman-Ford, 3. Negative-Weight Cycles), Dynamic Programming Define and prove a recurrence for the following problem: Given a directed graph G = (V, E) with edge weight function w : E → R and a source vertex s ∈ V , find a shortest path from s to v for every vertex v ∈ V .arrow_forwardWe have undirected graph K, with two distinct vertices z, k. And let O be a minimum spanning tree of K. Prove that the path from z to k along O is a minmax path. Assume that K has distinct edge weights. (Assume for contradiction that the minmax path is not completely on the minimum spanning tree.) Note: A MinMax path in an undirected Graph K is a path between two vertices z, k that minimizes the maximum weight of the edges on the pat h.h.arrow_forwardConsider the following graph. We are finding the lengths of the shortest paths from vertex a to all vertices by the Relaxation algorithm from the lecture: At the beginning, every vertex v is set as unmarked and h(v) = +∞. Then a is set as open and h(a) = 0. How many ways there are to select five (at that moment) open vertices so that after their relaxation (and closing) the value of h(v) will represent the shortest path length from a to every v in the graph? Specify the number of ways and one such way separated by commas and spaces, for example 25, b, а, с, а, d. d 3 1 a 1 -4 -4arrow_forward
- Let G = (V, E) be a directed graph. Assume that each edge ij belongs to E has a non-negative weightw(i, j) associated with it. Design a dynamic programming algorithm (Floyd-Warshal) for computing a shortest path between any vertex pair. You should define all necessary terms and then, write a recurrence relation. What is the time complexity of your algorithm.arrow_forwardGiven an undirected graph G = (V, E), a vertex cover is a subset of V so that every edge in E has at least one endpoint in the vertex cover. The problem of finding a minimum vertex cover is to find a vertex cover of the smallest possible size. Formulate this problem as an integer linear programming problem.arrow_forward3) The graph k-coloring problem is stated as follows: Given an undirected graph G= (V,E) with N vertices and M edges and an integer k. Assign to each vertex v in V a color c(v) such that 1arrow_forwardConsider eight points on the Cartesian two-dimensional xx-yy plane. For each pair of vertices uu and vv, the weight of edge uvuv is the Euclidean (Pythagorean) distance between those two points. For example, dist(a,h) = \sqrt{4^2 + 1^2} = \sqrt{17}dist(a,h)=42+12=17 and dist(a,b) = \sqrt{2^2 + 0^2} = 2dist(a,b)=22+02=2. Using the algorithm of your choice, determine one possible minimum-weight spanning tree and compute its total distance, rounding your answer to one decimal place. Clearly show your steps.arrow_forwardGiven N cities represented as vertices V₁, V2,...,UN on an undirected graph (i.e., each edge can be traversed in both directions). The graph is fully-connected where the edge ei, connecting any two vertices vį and vj is the straight-line distance between these two cities. We want to search for the shortest path from v₁ (the source) to UN (the destination). Assume that all edges have different values, and e₁, has the largest value among the edges. That is, the source and destination have the largest straight-line distance. Compare the lists of explored vertices when we run the uniform-cost search and the A* search for this problem. Hint: The straight-line distance is the shortest path between any two cities. If you do not know how to start, try to run the algorithms by hand on some small cases first; but remember to make sure your graphs satisfy the conditions in the question.arrow_forwardGiven N cities represented as vertices V₁, V2, un on an undirected graph (i.e., each edge can be traversed in both directions). The graph is fully-connected where the edge eij connecting any two vertices vį and vj is the straight-line distance between these two cities. We want to search for the shortest path from v₁ (the source) to VN (the destination). ... Assume that all edges have different values, and €₁,7 has the largest value among the edges. That is, the source and destination have the largest straight-line distance. Compare the lists of explored vertices when we run the uniform-cost search and the A* search for this problem. Hint: The straight-line distance is the shortest path between any two cities. If you do not know how to start, try to run the algorithms by hand on some small cases first; but remember to make sure your graphs satisfy the conditions in the question.arrow_forwardGiven a vertex set W = {1, 2, 3, 4}, solve for the following questions: (i) Knowing that edges are the same if and only if they have the same endpoint, how many different edges are possible? (ii) Suppose for this question that graphs are different if they have different sets of edges (they do not depend on if the graphs are isomorphic or not). How many simple graphs are there with the vertex set W? (iii) Draw the eleven nonisomorphic simple graphs that have four vertices.arrow_forwardudent question Consider m rectangles, where the i-th rectangle is represented by the x- and y-coordinates Xil < Xi2 and Yil < Yi2 of its vertices. Here we assume that Yil is negative and Yi2 is positive to simplify the solution, i.e., all rectangles intersect with the x-axis. You are further given a set of n >= m points (a1, b1),(a2,b2),...,(an,bn), and would like to know whether each point is covered by at least one of the rectangles. Design an algorithm for this problem with a running time faster than O(mn), and analyze its correctness and running time.Hint: First use a divide-and-conquer algorithm to find the area covered by the rectangles, so that for any x-coordinate you can find the maximum and minimum y-coordinates covered by the rectangles. Then, process the points one by one.arrow_forward(1) T F Given a directed graph G and a vertex v in the graph, breath first search (BFS) can be used to detect if v is part of a cycle in the graph. (2) T F Let P be a shortest path from some vertex s to some other vertex t in a directed graph. If the weight of each edge in the graph is decreased by one, then P will still be a shortest path from s to t. (3) T F edge Kruskal's algorithm is always correct even in graphs with negative weights. (4) T F For any flow network, there is only one unique way to assign flow value to the edges so as to achieve the maximum flow for the network. NP problems are those problems that cannot be solved in polynomial (5) T F time.arrow_forwardarrow_back_iosSEE MORE QUESTIONSarrow_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