2 You are running a delivery service and you want to optimize the cost of traveling...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
2 You are running a delivery service and you want to optimize the cost of traveling for your couriers. So, when trying to find shortest routes between delivery points your goal is to minimize not only the overall distance travelled but also the number of intermediate stops made by the couriers before reaching their final destination For example, in the graph shown, the shortest distance between nodes 1 and 3 is 5, so the courier should preferably go directly there from node 1 instead of going through node 2. Notice that both paths have the same length. Consider now the following definition 5 minStops [u] = minimum number of intermediate stops in a shortest path from s to u. Explain how to compute minstops [u], for every node u of a given graph. Show the modification of Dijkstra's algorithm, if necessary. 1 2 3 3 6 b) (10 points) Consider the following statements. Either prove them correct or give counterexamples (if they are not correct). 1. (3 pts) Dijkstra's algorithm does not work when the graph has edges with negative weights in general. But what if the only negative edges are the ones leaving the source s? Will the algorithm work? 2. 3. (3 pts) Suppose now you want to find the shortest path to some noder and you are told that the only negative edges are the ones entering t. Can the shortest path to be computed correctly by Dijkstra's algorithm? (2 pts) Suppose you have computed the shortest paths tree 7 from a sources to all other nodes and the weights of all edges increase by the same amount. Will 7 still be the shortest path in the new graph? (2 pts) Same as above but this time only the edges entering some node / are increased by the same amount. Will I still be the shortest path in the new graph? 4. 2 You are running a delivery service and you want to optimize the cost of traveling for your couriers. So, when trying to find shortest routes between delivery points your goal is to minimize not only the overall distance travelled but also the number of intermediate stops made by the couriers before reaching their final destination For example, in the graph shown, the shortest distance between nodes 1 and 3 is 5, so the courier should preferably go directly there from node 1 instead of going through node 2. Notice that both paths have the same length. Consider now the following definition 5 minStops [u] = minimum number of intermediate stops in a shortest path from s to u. Explain how to compute minstops [u], for every node u of a given graph. Show the modification of Dijkstra's algorithm, if necessary. 1 2 3 3 6 b) (10 points) Consider the following statements. Either prove them correct or give counterexamples (if they are not correct). 1. (3 pts) Dijkstra's algorithm does not work when the graph has edges with negative weights in general. But what if the only negative edges are the ones leaving the source s? Will the algorithm work? 2. 3. (3 pts) Suppose now you want to find the shortest path to some noder and you are told that the only negative edges are the ones entering t. Can the shortest path to be computed correctly by Dijkstra's algorithm? (2 pts) Suppose you have computed the shortest paths tree 7 from a sources to all other nodes and the weights of all edges increase by the same amount. Will 7 still be the shortest path in the new graph? (2 pts) Same as above but this time only the edges entering some node / are increased by the same amount. Will I still be the shortest path in the new graph? 4.
Expert Answer:
Answer rating: 100% (QA)
Part a Modifying Dijkstras Algorithm for minStopsu 1 Initialization Create arrays distu to store sho... View the full answer
Related Book For
Financial Accounting and Reporting a Global Perspective
ISBN: 978-1408076866
4th edition
Authors: Michel Lebas, Herve Stolowy, Yuan Ding
Posted Date:
Students also viewed these programming questions
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
Managing Scope Changes Case Study Scope changes on a project can occur regardless of how well the project is planned or executed. Scope changes can be the result of something that was omitted during...
-
Following are financial statements (historical and forecasted) for the Global Products Corporation. A. Assume that the cash account includes only required cash. Determine the dollar amount of equity...
-
How many members thought that recycling should not be a priority? The 100 members of the Earth Club were asked what they felt the club's priorities should be in the coming year: clean water, clean...
-
In Exercises, find the open intervals where the functions are concave upward or concave downward. Find any inflection points. (x) = -x 3 - 12x 2 - 45x + 2
-
Is the field line pattern created by a magnetic dipole the same as the field line pattern created by an electric dipole? Draw both field line patterns.
-
EZ-Credit, Inc., has $80 million in consumer loans with an average interest rate of 13.5 percent. The bank also has $64 million in home equity loans with an average interest rate of 9 percent....
-
6. If the tangent to the curve y = x at the point P(t, t) meets the curve again at Q, then the ordinate of the point which divides PQ internally in the ratio 1:2 is: (a) 0 7. (b)-t The system of...
-
The CitruSun Corporation ships frozen orange juice concentrate from processing plants in Eustis and Clermont to distributors in Miami, Orlando, and Tallahassee. Each plant can produce 20 tons of...
-
What is the purpose to inform the criminal justice system that human trafficking is a problem 2. Problem: Discuss the lack of training and education given to students and police officers in human...
-
Galina owns a home with a replacement value of $200,000. She insures it for $100,000, and has a policy that requires a minimum of 80% coverage. If her home were destroyed completely by a fire, how...
-
Suppose the annual rate of inflation in Brazil (BRL) is 11%, and the annual rate of inflation in Morocco (MAD) is 15%. If the MAD depreciates relative to the BRL by 4% in real terms, then what has...
-
Summit Inc., an Australian company, has concluded a large sale of computer systems for inventory management to a customer in Germany for 5,000,000 with payment due to be received in ninety days....
-
1. [15 points] Your boss hands you the following cash flow estimates of two mutually exclusive projects that both last for 2 years. Project A B Cost of Capital, k Investment (t=0) CF1 (t=1) CF2 (t=2)...
-
Michael is 20 years old and currently studying at university. He works part time as a waiter and saves $210 per month from his wages. Michael has so far saved $5,000 with the aim of reaching $10,000...
-
The decomposition of N,O, can be described by the equation 2 N,0,(soln) 4 NO, (soln) + 0,(g) Consider the data in the table for the reaction at 45 "C in carbon tetrachloride solution. t(s) IN,O,1 (M)...
-
1. Use these cost, revenue, and probability estimates along with the decision tree to identify the best decision strategy for Trendy's Pies. 2. Suppose that Trendy is concerned about her probability...
-
The Smetana Company has a commercial activity in the beauty products and cosmetics sector. Required Analyze the statement of cash flows prepared in Assignment 14.2 Smetana Company (1), in Chapter 14.
-
The following information concerns seven US companies operating solely or mainly restaurants. McDonalds Corporation McDonalds Corporation franchises and operates McDonalds restaurants in the food...
-
The following are excerpts of the equity and liabilities section of the balance sheet of four companies (with Notes when applicable). China International Marine Containers (China IFRS Source:...
-
What does a manager need to know to be sure that training provided satisfied the training objectives? How can these things be determined?
-
List and explain the three components of a lecture.
-
As an instructor, what can you do to help participants retain what they are learning?
Study smarter with the SolutionInn App