Talk:Tarjan's strongly connected components algorithm: Difference between revisions

Content deleted Content added
syntaxhighlight & fix lint
 
(2 intermediate revisions by 2 users not shown)
Line 1:
{{WikiProject banner shell|class=C|
{{maths rating|class=C|priority=Low|field=discrete}}
{{WikiProject Mathematics|priority=Low}}
}}
== Pseudocode is not good ==
 
Line 162 ⟶ 164:
 
== Counterexample ==
<syntaxhighlight lang="text">
<code>
<pre>
node size : 12
map :
Line 178 ⟶ 179:
0 1 1 0 0 0 0 0 0 0 0 0
0 0 0 1 0 0 0 0 0 0 0 0
</syntaxhighlight>
</pre></code>
In this case the whole graph is strongly connected
 
Line 279 ⟶ 280:
 
For a graph with a single vertex with no edges (i.e. adjacency matrix 0 -> []), fails at w := S.pop(), because stack is empty at that moment. [[Special:Contributions/87.241.189.187|87.241.189.187]] ([[User talk:87.241.189.187|talk]]) 04:07, 6 December 2022 (UTC)
 
:It shouldn't fail, since the single vertex is pushed at line 16 of the algorithm before it is popped. [[User:PoleoMenta|PoleoMenta]] ([[User talk:PoleoMenta|talk]]) 14:25, 21 February 2024 (UTC)