Talk:Tarjan: Difference between revisions

Content added Content deleted
(I disagree (and forgot how to indent my reply))
Line 12: Line 12:
0</pre>
0</pre>


Any thoughts? --[[User:Ledrug|Ledrug]] ([[User talk:Ledrug|talk]]) 08:37, 9 March 2020 (UTC)
Any thoughts?


Perhaps the task description needs better detail. The code examples work if all points are those of a digraph so 0 => 1 means that 0 is
Perhaps the task description needs better detail. The code examples work if all points are those of a digraph so 0 => 1 means that 0 is
Line 18: Line 18:
see 4 => 2 listed in the data -- it's a digraph.
see 4 => 2 listed in the data -- it's a digraph.
--[[User:Wherrera|Wherrera]] ([[User talk:Wherrera|talk]]) 08:19, 9 March 2020 (UTC)
--[[User:Wherrera|Wherrera]] ([[User talk:Wherrera|talk]]) 08:19, 9 March 2020 (UTC)

That can't be right. "Strongly connected" means between two nodes A and B, there is a path from A to B *and* there is a path from B to A, which only makes sense if edges are directed. If all connections are bidirectional, there is no difference between "connected" and "strongly connected", and the algorithm only needs a depth-first traversal without much of the bookkeeping at all. --[[User:Ledrug|Ledrug]] ([[User talk:Ledrug|talk]]) 08:37, 9 March 2020 (UTC)