Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
courses:cs211:winter2012:journals:jeanpaul:chapterthreesectionvi [2012/02/21 01:34] mugabejcourses:cs211:winter2012:journals:jeanpaul:chapterthreesectionvi [2012/02/21 01:34] (current) – [Designing And Analyzing the Algorithm] mugabej
Line 36: Line 36:
 -->After deleting //v// from S, we go through all of the nodes //w// to which //v// had an edge, and subtract one from the number of active incoming edges that we are maintaining for //w//.\\ -->After deleting //v// from S, we go through all of the nodes //w// to which //v// had an edge, and subtract one from the number of active incoming edges that we are maintaining for //w//.\\
 \\ \\
---> If this causes the number of active edges to //w// to drop to zero, then we add //w// to the set //w//.+--> If this causes the number of active edges to //w// to drop to zero, then we add //w// to the set //w//.\\
 --> Proceeding in this way, we keep track of nodes eligible for deletion at all times, while spending constant work per edge during the execution of the algorithm.\\ --> Proceeding in this way, we keep track of nodes eligible for deletion at all times, while spending constant work per edge during the execution of the algorithm.\\
 Thus we get a O(m+n) time. \\ Thus we get a O(m+n) time. \\
courses/cs211/winter2012/journals/jeanpaul/chapterthreesectionvi.1329788047.txt.gz · Last modified: 2012/02/21 01:34 by mugabej
CC Attribution-Noncommercial-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0