A weighted directed graph is shown in Figure 1. Answer the following questions. (a) Consider breadth-first...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
A weighted directed graph is shown in Figure 1. Answer the following questions. (a) Consider breadth-first traversal from the node A over the directed graph (Figure 1), where the weights on the graph are ignored. Show the node and the content of the queue, when the a breadth-first traversal visits a node for every node in iteration. Give the final breadth-first traversal result. [10 marks] (b) Consider computing the single source shortest paths over the weighted directed graph (Fig- ure 1) based on the Dijkstra's algorithm. Recall that S is the set of nodes whose shortest distance is known, d(v) is the current distance from the source node to v, and p(v) is the predecessor node along the path from the source to v. Let the node A be the source node. (i) Show the initial S, and initial d(v) and p(v) for every node in the graph excluding the source node. [2 marks] (ii) Show how Dijkstra's algorithm works step by step from the single source node to all other nodes by showing how d(v) and p(v) are changed for every node v in the graph, while S is becoming larger in every iteration. [20 marks] (iii) Show the shortest paths from the source node to all other nodes based on your answer of (ii). [4 marks] (iv) Explain the condition for the Dijkstra's algorithm to work, and show how the Dijkstra's algorithm does not work if the condition is violated using an example. [4 marks] A 3 5. B 3 F 22 12 E H 2 7 V 2 2 19 2 31. D Figure 1: A weighted directed graph A weighted directed graph is shown in Figure 1. Answer the following questions. (a) Consider breadth-first traversal from the node A over the directed graph (Figure 1), where the weights on the graph are ignored. Show the node and the content of the queue, when the a breadth-first traversal visits a node for every node in iteration. Give the final breadth-first traversal result. [10 marks] (b) Consider computing the single source shortest paths over the weighted directed graph (Fig- ure 1) based on the Dijkstra's algorithm. Recall that S is the set of nodes whose shortest distance is known, d(v) is the current distance from the source node to v, and p(v) is the predecessor node along the path from the source to v. Let the node A be the source node. (i) Show the initial S, and initial d(v) and p(v) for every node in the graph excluding the source node. [2 marks] (ii) Show how Dijkstra's algorithm works step by step from the single source node to all other nodes by showing how d(v) and p(v) are changed for every node v in the graph, while S is becoming larger in every iteration. [20 marks] (iii) Show the shortest paths from the source node to all other nodes based on your answer of (ii). [4 marks] (iv) Explain the condition for the Dijkstra's algorithm to work, and show how the Dijkstra's algorithm does not work if the condition is violated using an example. [4 marks] A 3 5. B 3 F 22 12 E H 2 7 V 2 2 19 2 31. D Figure 1: A weighted directed graph
Expert Answer:
Related Book For
Posted Date:
Students also viewed these computer network questions
-
"internet radios" for streaming audio, and personal video recorders and players. Describe design and evaluation processes that could be used by a start-up company to improve the usability of such...
-
Let A, B be sets. Define: (a) the Cartesian product (A B) (b) the set of relations R between A and B (c) the identity relation A on the set A [3 marks] Suppose S, T are relations between A and B, and...
-
1. how transfer pricing can be used to minimize taxes in a multinational corporation. Include a short numerical illustration. 2. wHAT are the arguments for and against the international convergence...
-
Make a list of service production systems, giving an example of each and then explaining the fundamental difference between a SPS and an MPS. Table 1-3 will help you get started.
-
Describe the year-end adjustment to record the allowance for uncollectible accounts.
-
The normalized Brownian excursion \(|B|^{\left[g_{1}, d_{1} ight]}\) is a \(\mathrm{BES}^{3}\) bridge from \(x=0\) to \(y=0\) with \(t=1\). \[\begin{equation*} X_{t}^{[a, b]}=\frac{1}{\sqrt{b-a}}...
-
Draw an entity relationship diagram (ERD) for the following situations: 1. Whenever new patients are seen for the first time, they complete a patient information form that asks their name, address,...
-
Simplify 343 to the form ab.
-
On 1 January 20X5 Edward Ltd gained control of Watts Ltd by acquiring 70% of its shares. Below is an extract of financial information of both entities as at 31 December 20X9, the end of the current...
-
Thomas Robert Malthus believed that population growth would a. put stress on the economys ability to produce food, dooming humans to remain in poverty. b. spread the capital stock too thinly across...
-
The ability of insurance to spread risk is limited by a. risk aversion and moral hazard. b. risk aversion and adverse selection. c. moral hazard and adverse selection. d. risk aversion only.
-
For each of the following pairs, which bond would you expect to pay a higher interest rate? Explain. a. a bond of the U.S. government or a bond of an Eastern European government b. a bond that repays...
-
If the CPI is 200 for the year 2010 and 300 today, then $600 in 2010 has the same purchasing power as ________ has today. a. $400 b. $500 c. $700 d. $900
-
Fiat money is a. a type of money with intrinsic value. b. a type of money set by government decree. c. any asset used as the medium of exchange. d. any asset used as the unit of account.
-
1. Propose a new project for the organization you work for. (a) Explain the stages in the project management life-cycle. (b) Analyze the importance of effective planning and control measures in each...
-
In Problems 1522, find the principal needed now to get each amount; that is, find the present value. To get $750 after 2 years at 2.5% compounded quarterly.
-
The percentage of heights less than 147 centimeters
-
The percentage of heights between 148 centimeters and 170 centimeters
-
The percentage of heights between 146 centimeters and 156 centimeters
Study smarter with the SolutionInn App