This preview shows page 1. Sign up to view the full content.
Section
11.3
307
30. The answer is no, unless there are negative weight cycles. Suppose there is a walk
u·
..
~
...
w
c
with a repeated vertex
v.
We may assume that the part of the walk from
v
back to
v
(which we have
denoted C) is a cycle.
If
this walk has length less than
u
...
v
...
u
(removing
C),
then C must have had
negative weight.
31. At Step 2, on each of
n
2
occasions, the algorithm finds the minimum of
n
 1 numbers. This requires
n

2 comparisons. In addition, one more comparison is required to determine the value of
diU).
Finally, Step 3 requires a further
n
comparisons.
In
all, our algorithm requires
n
2
[(n

2)
+
1]
+
n =
O(n
3
)
comparisons.
32. The proposed procedure fails since paths which use more edges will be
rejected in favor of higher weight paths using fewer edges. In the
digraph shown at the left, the proposal is first to add 1 to the weight of
each arc. This gives the digraph on the right. Also shown on the right
are the final labels obtained by the original version of Dijkstra's
This is the end of the preview. Sign up
to
access the rest of the document.
This note was uploaded on 11/08/2010 for the course MATH discrete m taught by Professor Any during the Summer '10 term at FSU.
 Summer '10
 any
 Graph Theory

Click to edit the document details