Content deleted Content added
Citation bot (talk | contribs) m Alter: template type. Add: date, year, doi. Removed URL that duplicated unique identifier. Removed accessdate with no specified URL. | You can use this bot yourself. Report bugs here.| Activated by User:Headbomb |
|||
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 <code>index</code> and <code>lowlink</code> fields, along with one bit for <code>onStack</code> and another for determining when <code>index</code> is undefined. In addition, one word is required on each stack frame to hold <code>v</code> and another for the current position in the edge list. Finally, the worst-case size of the stack <code>S</code> must be <math>|V|</math> (i.e. when the graph is one giant component). This gives a final analysis of <math>O(|V|\cdot(2+5w))</math> where <math>w</math> is the machine word size. The variation of Nuutila and Soisalon-Soininen reduced this to <math>O(|V|\cdot(1+4w))</math> and, subsequently, that of Pearce requires only <math>O(|V|\cdot(1+3w))</math>.<ref>{{cite
==Additional remarks==
Line 98:
[[Donald Knuth]] described Tarjan's algorithm as one of Knuth's favorite implementations in his book ''The Stanford GraphBase''.<ref>Knuth, ''The Stanford GraphBase'', pages 512–519.</ref>
He also wrote:<ref>{{cite
== References ==
|