_DarkNess's blog

By _DarkNess, history, 6 weeks ago, In English,

Sorry about the last blog, i didn't prepared well for the question . I was wondering how to count the numbers of vertices in components, and now i knew 2 algo to do that is, Kosaraju algorithm and Tarjan algorithm, i want to ask what is the difference between this 2, when Korasaju is better and when Tarjan is better. Thanks a lot !!

  • Vote: I like it
  • -31
  • Vote: I do not like it

6 weeks ago, # |
  Vote: I like it +35 Vote: I do not like it

Your question is so unclear. A directed graph can have multiple cycles. Is it guaranteed that there is only one cycle? Do you want to count total number of vertices belonging to any cycle, or the sum of sizes of simple cycles? Consider yourself reading this blog, wanting to help. Would you understand this question? Add more details, if you want to get an answer.

6 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by _DarkNess (previous revision, new revision, compare).