a) True for more than two node and False for 2 nodes and cost of the edge is 1
If the number of the nodes in the graph are more than 2 and as the edge costs are distinct and integer the the sum of squares of integers is always greater than its corresponding integer so P in original instance is always less than P in new instance, but if there are only two nodes and its cost of the edge is 1 then afer squaring it its cost remains same which is not strictly increasing(exception)
b)False
There can be any number of shortest paths for a given graph. Let us say a graph has two paths
First Path(AB,BC,CD) edge costs are (4,3,6)
Second path(AE,EF,FD) edge costs are (7,1,5)
Here we can see two shortest paths for the given graph,
However we can only have one minimum spanning tree for edges with distinct edge costs
c)False
P can or can't be a minimum cost s-t pathfor new instance,Let us say there are two paths
Before squaring
First Path(AB,BC,CD) edge costs are (3,4,5) total cost is 12
Second path(AE,EF,FD) edge costs are (1,2,7) total cost is 10
Here the second path is shortest path,
But after squaring the same costs become
First Path(AB,BC,CD) edge costs are (9,16,25) total cost is 50
Second path(AE,EF,FD) edge costs are (1,4,49) total cost is 54
Here the first path is shortest path,
which contradicts the given statement
Shortest Path Suppose we are given an instance of the Shortest s-t Path Problem on a...
Problem E: For each of the following parts, state True or False. If true, give a short proof. If false, givera counterexample: (1). Using Kruskal's algorithm, edges are (always) inserted into the MST in the same order as using Prim's (2). If an edge e is part of a TSP tour found by the quick TSP method then it must also be part of the (3). If an edge e is part of a Shortest Path Tree rooted at A...
True or False? Explain why? The problem of finding a shortest path in a graph can be polynomially reduced to an instance of the integer knapsack problem
Suppose we have two weighted graphs G1 = (V, E, w) and G2 = (V, E, w0 ) where w 0 (e) = w(e)+1 and w, w0 are the edge weights in the two graphs. The graphs are identical, except that all the edges weights in G2 are one larger than the corresponding edge in G1. Suppose that in G1, we have computed the shortest weighted path from some fixed node s ∈ V to some other node t ∈...
Problem 1: Shortest Path-ish Suppose that you want to get from vertex s to vertex t in an unweighted graph G = (V, E), but you would like to stop by vertex u if it is possible to do so without increasing the length of your path by more than a factor of a. Describe an efficient algorithm that would determine an optimal s-t path given your preference for stopping at u along the way if doing so is not prohibitively costly....
Find the shortest path P: s P by heavier lines. t and its length by Moore's BFS algorithm: sketch the graph with the labels and indicate Find the shortest path P: s P by heavier lines. t and its length by Moore's BFS algorithm: sketch the graph with the labels and indicate
Problem 4 Shortest Path Problem-15 points You are in the market for a new car and a new car costs $10,000. The annual operating costs and resale value of a used car are shown in the Table below. e of Car (Years) Resale Value (S) Costs (S) 300 (year 1) 500 (year 2) 800 (year 3) 1200 (year 4 1600 (year 5) 2200 (year 6) 8000 6000 5000 3000 1500 Assuming that you now have a new car, determine a...
Problem 6. (Weighted Graph Reduction) Your friend has written an algorithm which solves the all pairs shortest path problem for unweighted undirected graphs. The cost of a path in this setting is the number of edges in the path. The algorithm UNWEIGHTEDAPSP takes the following input and output: UNWEİGHTEDA PSP Input: An unweighted undirected graph G Output: The costs of the shortest paths between each pair of vertices fu, v) For example, consider the following graph G. The output of...
Question III - Shortest Path [30 Points! You wish to take a flight from city A to city I. The following graph shows the different routes you could take. The vertices are the cities (airports), and the weight on the edges are the cost of travel in KD 35 50 65 95 65 80 65 20 20 a) Apply Dijkstra's algorithm to find the minimum cost to go from city A to all other cities in the graph. Show your...
In this question, we will think about how to answer shortest path problems where we have more than just a single source and destination. Answer each of the following in English (not code or pseudocode). Each subpart requires at most a few sentences to answer. Answers significantly longer than required will not receive full credit You are in charge of routing ambulances to emergency calls. You have k ambulances in your fleet that are parked at different locations, and you...
Say that we have an undirected graph G(V, E) and a pair of vertices s, t and a vertex v that we call a a desired middle vertex . We wish to find out if there exists a simple path (every vertex appears at most once) from s to t that goes via v. Create a flow network by making v a source. Add a new vertex Z as a sink. Join s, t with two directed edges of capacity...