Content deleted Content added
Snudehygel (talk | contribs) |
m Maintain {{WPBS}} and vital articles: 2 WikiProject templates. Create {{WPBS}}. Keep majority rating "Start" in {{WPBS}}. Remove 2 same ratings as {{WPBS}} in {{Maths rating}}, {{WikiProject Computing}}. Remove 1 deprecated parameter: field. Tag: |
||
(9 intermediate revisions by 7 users not shown) | |||
Line 1:
{{WikiProject
{{WikiProject Mathematics|priority=Low}}
{{WikiProject Computing|importance=Low|auto=no}}
}}
{{Broken anchors|links=
* <nowiki>[[Tree_traversal#Post-order|post-order]]</nowiki> The anchor (#Post-order) is no longer available because it was [[Special:Diff/1083604422|deleted by a user]] before. <!-- {"title":"Post-order","appear":{"revid":532658304,"parentid":532657304,"timestamp":"2013-01-12T06:05:42Z","removed_section_titles":["Preorder","Inorder","Postorder","Threading and Morris inorder traversal"],"added_section_titles":["Pre-order","In-order","Post-order","Threading and Morris in-order traversal"]},"disappear":{"revid":1083604422,"parentid":1083603432,"timestamp":"2022-04-19T18:07:39Z","removed_section_titles":["Depth-first search","Post-order","In-order"],"added_section_titles":["Preorder traversal","Pre-order traversal","Postorder traversal","Post-order traversal","Reverse preorder traversal","Reverse pre-order traversal","Reverse postorder traversal","Reverse post-order traversal","Reverse inorder traversal","Reverse in-order traversal","Depth-first search implementation","Pre-order traversal code","Post-order implementation","Post-order traversal code","In-order implementation","Inorder traversal code","In-order traversal code"]}} -->
}}
==Confusion==
Line 5 ⟶ 11:
As far as I know, Kosaraju's algorithm first appeared in print in M. Sharir, "A strong-connectivity algorithm and its application in data flow analysis", Computer and Mathematics with Applications, vol 7 nr 1, pp. 67--72, 1981. [[User:Snudehygel|Snudehygel]] ([[User talk:Snudehygel|talk]]) 22:23, 8 May 2009 (UTC)
:The source of confusion appears to be the following statement in Cormen et al. algoritms book (I have the 1990 edition of CLRS at hand). The chapter notes on "Elementary Graph Algorithms" says:
::"The algorithm [...] is adapted from Aho, Hopcroft and Ullman [5], who credit it to S.R. Kosaraju and M. Sharir."
:In the references section of CLRS, we find the following entry:
::[4] Alfred V. Aho, John E. Hopcroft, and Jeffrey D. Ullman. The Design and Analysis of Computer Algorithms. Addison-Wesley 1974.
::[5] Alfred V. Aho, John E. Hopcroft, and Jeffrey D. Ullman. Data Structures and Algorithms. Addison-Wesley, 1983.
:I would suggest that someone goes to a library and checks what is actually stated in reference [5]. (Sigh. I suppose that errors which cannot be verified with the aid of an internet search engine will actually never be fixed on wikipedia.) [[Special:Contributions/134.176.28.77|134.176.28.77]] ([[User talk:134.176.28.77|talk]]) 13:08, 10 August 2009 (UTC)
::I checked reference 5, it says that Kosaraju discovered it in 1978 (unpublished) and that Sharir published it in the mentioned article from 1981. [[User:Nczempin|Nczempin]] ([[User talk:Nczempin|talk]]) 23:46, 28 January 2023 (UTC)
== Text excised from [[2-satisfiability]] ==
This description of the algorithm was included on the page on [[2SAT]], but was irrelevant there.
I'll paste it here so bits of it could be integrated into this article if required. —[[User:Oliphaunt|Oliphaunt]] ([[User talk:Oliphaunt|talk]]) 13:21, 21 August 2013 (UTC)
:Kosaraju's algorithm performs two depth first searches, but is very simple: the first search is used only to order the vertices, in the reverse of a [[postorder]] depth-first traversal. Then, the second pass of the algorithm loops through the vertices in this order, and for each vertex that has not already been assigned to a component, it performs a depth-first search of the [[transpose graph]] starting from that vertex, backtracking when the search reaches a previously assigned vertices; the unsassigned vertices reached by this search form a new component.
That actually gives a ''better'' description of the algorithm than the text currently in the article.[[Special:Contributions/130.243.83.63|130.243.83.63]] ([[User talk:130.243.83.63|talk]]) 15:58, 26 November 2015 (UTC)
== Incorrect claim in algo description ==
The article states: "so if there is a forward path from ''u'' to ''v'' then ''u'' will appear before ''v'' on the final list ''L'' (unless ''u'' and ''v'' both belong to the same strong component, in which case their relative order in ''L'' is arbitrary)."
This is not true. There is a weaker claim which is both true and sufficient to justify the algorithm correctness: If there is a path from ''u'' to ''v'' and ''u'' and ''v'' belong to different strongly connected components then there is some vertex from ''u''{{'}}s strongly connected component that appears on the final list L before all vertices in ''v''{{'}}s strongly connected component. Importantly, not all vertices from ''u''{{'}}s SCC need to appear on L before all vertices from ''v''{{'}}s SCC, which is implied by the original claim.
[[User:Pilloff|Pilloff]] ([[User talk:Pilloff|talk]]) 19:13, 21 April 2022 (UTC)
|