on-internet
← Community

About tarjan algorithm, why can't we take low[v] instead of disc[v] when considering the backward edge?

Stack Overflow ·

I read an article about Tarjan's algorithm, blog. In this article, the author asks a question: In case two, can we take low[v] instead of disc[v] ?? . Answer is NO. If you can think why answer is NO, you probably understood the Low and Disc concept. I don't know why. When I am reading the similar article in wiki, I found that the code can be like that: else if (w.onStack) then // Successor w is in stack S and hence in the current SCC v.lowlink := min(v.lowlink, w.lowlink) I wanna know why the author say the answer is NO. Thanks for answering my question. Have a good day.

Comments

Sign in or sign up to comment and upvote.

No comments yet.