3 6 4 20
i,
we know the length, L[i],
of the longest path that starts
at this vertex, we can compute the length of the longest path in the graph
by computing the maximum of the L[i]s.
For L[i], we obtain the following recurrenceL[i] = 0 if S(i) is empty;
otherwise L[i] is
max{length[i][j] + L[j] | j is in S(i)}.
MaxLength = 0;
for (int i = n; i > 0; i--) {
L[i] = 0;
for (each vertex j in S(i))
L[i] = max(L[i], length[i][j] + L[i]);
MaxLength = max(MaxLength, L[i]);
}
x[]
where x[i] is 1 if vertex i
is in the subset of deleted vertices and 0 if it is not in this subset.
feedback form |
permissions |
international |
locate your campus rep |
request a review copy
Copyright ©2001 The McGraw-Hill Companies.
digital solutions |
publish with us |
customer service |
mhhe home
Any use is subject to the
Terms of Use and Privacy Policy.
McGraw-Hill Higher Education is one of the many fine businesses of the
The McGraw-Hill Companies.