Content deleted Content added
Crisbodnar (talk | contribs) mNo edit summary |
Correct notation for space complexity to use "|V|" in place of "v". |
||
Line 92:
This may be done, for example, by storing a flag on each node that indicates whether it is on the stack, and performing this test by examining the flag.
''Space Complexity'': The Tarjan procedure requires two words of supplementary data per vertex for the <tt>index</tt> and <tt>lowlink</tt> fields, along with one bit for <tt>onStack</tt> and another for determining when <tt>index</tt> is undefined. In addition, one word is required on each stack frame to hold <tt>v</tt> and another for the current position in the edge list. Finally, the worst-case size of the stack <tt>S</tt> must be <math>|V|</math> (i.e. when the graph is one giant component). This gives a final analysis of <math>O(
==Additional remarks==
|