History of ClassS04CS141/Notes 04 26

ClassS04CS141 | recent changes | Preferences


Revision 3 . . May 4, 2004 9:18 pm by Neal
Revision 2 . . May 4, 2004 9:10 pm by Neal
  

Difference (from prior major revision) (no other diffs)

Changed: 1,16c1

We did some examples of counting the number of distinct paths from a
given vertex S to a given vertex T in a DAG.

Then we discussed a general algorithm based on the following recurrence:

Define N(V) = the number of distinct paths from S to V.

Then N() satisfies the following recurrence relation:
: N(S) = 1 and
: N(V) = W : (W,U) ∈ E N(W).

We discussed a linear-time algorithm for computing the number of distinct S->T paths
in a DAG using this recurrence.

Then we tried to convince ourselves that the recurrence was true.


ClassS04CS141 | recent changes | Preferences
Search: