(CS21003: Algorithms-I) Online-Quiz/Test: Question-3: All-Pairs Shortest Path (Marks: 7)
(CS21003: Algorithms-I) Online-Quiz/Test: Question-3: All-Pairs Shortest Path (Marks: 7)
Given a weighted directed graph G =<V, E, W>, where the vertices are V = {A,B,C,D,E,F} (|V| = 6), the directed
edges are E = {(A,B), (A,C), (B,C), (B,D), (C,D), (C,E), (D,E), (D,F), (E,B), (E,F), (F,A)} (|E| = 11), the weights form
the set W (specified partially -- only negative edge-weights are given, that is, W(A,C)=-3, W(C,D)=-4 and
W(E,F)=-6 and rest will be filled by you). PLEASE REFER TO THE IMAGE (Figure-3) GIVEN BELOW.
[i] Define only the positive weights (as a positive number) for all remaining edges to make the example
(wighted directed graph) complete.
Remember, each edge-weights should all be distinct positive numbers only (negative edge-weights are
already given).
[ii] Show the step-wise running (as asked below) of Floyd-Warshall's algorithm over the example graph that
you constructed. [Marks = 7]
More precisely, you shall be providing (in row-wise manner for all-6 rows) the 2-D cost calculation matrix
(memoized) values F[ ][ ] at every step (you may refer to the lecture-slides!) and also indicate the number
of negative entries in F[ ][ ].
https://docs.google.com/forms/d/e/1FAIpQLScPtzymuewN0M8BQtUtXI0uVlmBVEF7RUm6hdBz1AkYlqfQuA/formResponse 1/12
4/8/2020 [ CS21003 : Algorithms-I ] Online-Quiz/Test
YES
NO
Your answer
Your answer
Your answer
Your answer
Your answer
https://docs.google.com/forms/d/e/1FAIpQLScPtzymuewN0M8BQtUtXI0uVlmBVEF7RUm6hdBz1AkYlqfQuA/formResponse 2/12
4/8/2020 [ CS21003 : Algorithms-I ] Online-Quiz/Test
Your answer
Your answer
Your answer
Step-0: Initial 6-values of Row-1 (in comma-separated format) for Vertex-A in the
2-D cost-matrix, i.e. F[1][ ]
For "infinity", write INFY for that entry
Your answer
Your answer
https://docs.google.com/forms/d/e/1FAIpQLScPtzymuewN0M8BQtUtXI0uVlmBVEF7RUm6hdBz1AkYlqfQuA/formResponse 3/12
4/8/2020 [ CS21003 : Algorithms-I ] Online-Quiz/Test
Your answer
Your answer
Your answer
Your answer
Your answer
https://docs.google.com/forms/d/e/1FAIpQLScPtzymuewN0M8BQtUtXI0uVlmBVEF7RUm6hdBz1AkYlqfQuA/formResponse 4/12
4/8/2020 [ CS21003 : Algorithms-I ] Online-Quiz/Test
Your answer
Your answer
Your answer
Your answer
Your answer
https://docs.google.com/forms/d/e/1FAIpQLScPtzymuewN0M8BQtUtXI0uVlmBVEF7RUm6hdBz1AkYlqfQuA/formResponse 5/12
4/8/2020 [ CS21003 : Algorithms-I ] Online-Quiz/Test
Your answer
Your answer
Your answer
Your answer
Your answer
https://docs.google.com/forms/d/e/1FAIpQLScPtzymuewN0M8BQtUtXI0uVlmBVEF7RUm6hdBz1AkYlqfQuA/formResponse 6/12
4/8/2020 [ CS21003 : Algorithms-I ] Online-Quiz/Test
Your answer
Your answer
Your answer
Your answer
Your answer
https://docs.google.com/forms/d/e/1FAIpQLScPtzymuewN0M8BQtUtXI0uVlmBVEF7RUm6hdBz1AkYlqfQuA/formResponse 7/12
4/8/2020 [ CS21003 : Algorithms-I ] Online-Quiz/Test
Your answer
Your answer
Your answer
Your answer
Your answer
https://docs.google.com/forms/d/e/1FAIpQLScPtzymuewN0M8BQtUtXI0uVlmBVEF7RUm6hdBz1AkYlqfQuA/formResponse 8/12
4/8/2020 [ CS21003 : Algorithms-I ] Online-Quiz/Test
Your answer
Your answer
Your answer
Your answer
Your answer
https://docs.google.com/forms/d/e/1FAIpQLScPtzymuewN0M8BQtUtXI0uVlmBVEF7RUm6hdBz1AkYlqfQuA/formResponse 9/12
4/8/2020 [ CS21003 : Algorithms-I ] Online-Quiz/Test
Your answer
Your answer
Your answer
Your answer
Step-6: Final 6-values of Row-1 (in comma-separated format) for Vertex-A in the
2-D cost-matrix, i.e. F[1][ ]
For "infinity", write INFY for that entry
Your answer
https://docs.google.com/forms/d/e/1FAIpQLScPtzymuewN0M8BQtUtXI0uVlmBVEF7RUm6hdBz1AkYlqfQuA/formResponse 10/12
4/8/2020 [ CS21003 : Algorithms-I ] Online-Quiz/Test
Step-6: Final 6-values of Row-2 (in comma-separated format) for Vertex-B in the
2-D cost-matrix, i.e. F[2][ ]
For "infinity", write INFY for that entry
Your answer
Step-6: Final 6-values of Row-3 (in comma-separated format) for Vertex-C in the
2-D cost-matrix, i.e. F[3][ ]
For "infinity", write INFY for that entry
Your answer
Step-6: Final 6-values of Row-4 (in comma-separated format) for Vertex-D in the
2-D cost-matrix, i.e. F[4][ ]
For "infinity", write INFY for that entry
Your answer
Step-6: Final 6-values of Row-5 (in comma-separated format) for Vertex-E in the
2-D cost-matrix, i.e. F[5][ ]
For "infinity", write INFY for that entry
Your answer
Step-6: Final 6-values of Row-6 (in comma-separated format) for Vertex-F in the
2-D cost-matrix, i.e. F[5][ ]
For "infinity", write INFY for that entry
Your answer
https://docs.google.com/forms/d/e/1FAIpQLScPtzymuewN0M8BQtUtXI0uVlmBVEF7RUm6hdBz1AkYlqfQuA/formResponse 11/12
4/8/2020 [ CS21003 : Algorithms-I ] Online-Quiz/Test
Finally, how many entries have negative values in your (memoized) cost-
calculation matrix, F[ ][ ] (having 6x6 dimension)?
Choose
reCAPTCHA
Privacy Terms
This content is neither created nor endorsed by Google. Report Abuse - Terms of Service - Privacy Policy
Forms
https://docs.google.com/forms/d/e/1FAIpQLScPtzymuewN0M8BQtUtXI0uVlmBVEF7RUm6hdBz1AkYlqfQuA/formResponse 12/12