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
(Shortest-paths optimality criteria) Demonstrate Proposition P. Let G be an edge-weighted digraph, with s as a source vertex in G and distTo[] a vertex-indexed array of path lengths in G such that the value of distTo[v] is the length of some path from s to v for all v accessible from s, and distTo[v] equal to infinity for all v not reachable from s. These are the lengths of the shortest routes if and only if they meet distTo[w] = distTo[v] + e.weight() for each edge e from v to w (or no edge is eligible).
Let G = (V, E) be a connected, undirected graph, and let s be a fixed vertex in G. Let TB be the spanning tree of G found by a bread first search starting from s, and similarly TD the spanning tree found by depth first search, also starting at s. (As in problem 1, these trees are just sets of edges; the order in which they were traversed by the respective algorithms is irrelevant.) Using facts, prove that TB = TD if and only if TB = TD = E, i.e., G is itself a tree.
Consider the following greedy algorithm to solve the Traveling Salesman Problem: Start from any vertex (city). At any vertex, always select, among its neighbouring cities that have not been visited, the vertex that is the closest. Show that this algorithm does not always produce an optimal solution by giving a counter example. Note that by the definition of the TSP, the graph you provide must be a weighted and complete graph.
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
- Q1) how many graphs are there on 20 nodes? (To make this question precise, we have to make sure we known what it mean that two graphs are the same . For the purpose of this exercise,we consider the nodes given and labeled,say,asAlice ,Bob,...... The graph consisting of a single edge connecting Alice and Bob is different from the graph consisting of a single edge connecting Eve and frank.) Q2) Formulate the following assertion as a theorem about graphs and prove it :At every party one can find two people who know the same number of other people (like Bob and Eve in our first example).arrow_forwardThe following solution designed from a problem-solving strategy has been proposed for finding a minimum spanning tree (MST) in a connected weighted graph G: Randomly divide the vertices in the graph into two subsets to form two connected weighted subgraphs with equal number of vertices or differing by at most Each subgraph contains all the edges whose vertices both belong to the subgraph’s vertex set. Find a MST for each subgraph using Kruskal’s Connect the two MSTs by choosing an edge with minimum wight amongst those edges connecting Is the final minimum spanning tree found a MST for G? Justify your answer.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_forward
- We 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 problem for path finding where S is the source, G is the Goal and O are obstacles. We can only move horizontally and vertically (not diagonally). We will not re-visit an already visited cell. - Simulate the application of Breadth-first search tree to find all paths from S to G. Provide the order of visit for each node. - Simulate the application of Depth-first search tree to find all paths from S to G. Provide the order of visit for each node. S O G Oarrow_forwardVertex S denotes the start state and vertices G1 and G2 denote the two goal states. Directed edges are labelled with the actual costs of traversing the edge. In what order would Best-First Search retrieve the states from the frontier when starting the search in S? If all else is equal, consider states in alphabetic order. options are : a. S, A, B, C, D, E, F, G1 b. S, A, B, C, E, F, D, G1 c. S, A, B, C, E, F, G1 d. S, A, B, C, G1 e. S, A, C, G1 f. S, A, E, G1 g. S, B, A, C, E, G1 h. S, B, F, D, G2 i. S, C, B, F, A, D, E, G1 j. S, C, G1arrow_forward
- Consider the navigation problem shown in Figure 1. The number next to each edge is the cost of the performing the action corresponding to that edge. You start from A and your goal is to get to F. List the order in which nodes are expanded, which nodes are added to the fringe and which states are added to the closed set when performing Graph Search using: breadth-first search. depth-first search. iterative deepening search. uniform cost searcharrow_forwardLet A, B, C, D be the vertices of a square with side length 100. If we want to create a minimum-weight spanning tree to connect these four vertices, clearly this spanning tree would have total weight 300 (e.g. we can connect AB, BC, and CD). But what if we are able to add extra vertices inside the square, and use these additional vertices in constructing our spanning tree? Would the minimum-weight spanning tree have total weight less than 300? And if so, where should these additional vertices be placed to minimize the total weight? Let G be a graph with the vertices A, B, C, D, and possibly one or more additional vertices that can be placed anywhere you want on the (two-dimensional) plane containing the four vertices of the square. Determine the smallest total weight for the minimum-weight spanning tree of G. Round your answer to the nearest integer. Note: I encourage you to add n additional points (for n=1, 2, 3) to your graph and see if you can figure out where these point(s) need to…arrow_forwardLet A, B, C, D be the vertices of a square with side length 100. If we want to create a minimum-weight spanning tree to connect these four vertices, clearly this spanning tree would have total weight 300 (e.g. we can connect AB, BC, and CD). But what if we are able to add extra vertices inside the square, and use these additional vertices in constructing our spanning tree? Would the minimum-weight spanning tree have total weight less than 300? And if so, where should these additional vertices be placed to minimize the total weight? Let G be a graph with the vertices A, B, C, D, and possibly one or more additional vertices that can be placed anywhere you want on the (two-dimensional) plane containing the four vertices of the square. Determine the smallest total weight for the minimum-weight spanning tree of G. Round your answer to the nearest integer. Attention: Please don't just copy these two following answers, which are not correct at all. Thank you.…arrow_forward
- Prove that (Generic shortest-paths algorithm) Proposition Q Initialise all distTo[] values to infinity and distTo[s] to 0, then carry out the following: Every edge in G should be relaxed until none are left. The value of distTo[w] after this calculation is the length of the shortest path from s to w (and the value of edgeTo[] is the final edge on that path) for all vertices w accessible from s.arrow_forwardConsider the Network N in Figure Q3. The two numbers on an arc indicate the minimum and maximum capacities of the arc. a) Find a feasible flow from the source vertex S to the terminal vertex T ? Show your working and write down a feasible flow in Network N.arrow_forwardVertex S denotes the start state and vertices G1 and G2 denote the two goal states. Directed edges are labelled with the actual costs of traversing the edge. In what order would Breadth-First Search retrieve the states from the frontier when starting the search in S? If all else is equal, consider states in alphabetic order. There are two possible correct answers, depending on what variant of Breadth-First Search you are using. Select either one of them to receive full marks. options are S, A, B, C, D, E, F, G1 b. S, A, B, C, E, F, D, G1 c. S, A, B, C, E, F, G1 d. S, A, B, C e. S, A, C, G1 f. S, A, E, G1 g. S, B, A, C, E h. S, B, F, D, G2 i. S, C, B, F, A, D, E, G1 j. S, C, G1arrow_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