Solutions of Final 1

Solutions of Final 1 - satisfy all the conditions that help...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Solutions of Final 2 Question 1 a. Dijkstra will work correctly. When we add the same constant to every edge in the graph, the difference between the paths will be maintained by the same value. And as the constant is big enough to make all the weights nonnegative, so we
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: satisfy all the conditions that help Dijkstra to work correctly. b. T(n) = 1 + T(0) + T(1) + T(2)++T(n-1) As T(0) =1, Then T(n) = 2 + T(n*(n+1)) = O(n 2 )...
View Full Document

Ask a homework question - tutors are online