-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
1 addition
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,6 @@ The key method I use to detect ap points is [Tarjan's algorithm](https://en.wiki | |
*** | ||
In an undirected graph, I use Tarjan's algorithm and [union-find algorithm](https://en.wikipedia.org/wiki/Disjoint-set_data_structure) to detect ap and delete them to form a remainder graph, terminate when there's no ap in the remainder graph. Finally, output the final graph into a text file called "undirected.txt". | ||
|
||
In a directed graph, I still use Tarjan's algorithm but in a slightly different format. This Tarjan's algorithm gives me the total number of *strong connected component(scc)* in a graph, so I run it in every remainder graph(just simply attempt to delete every node in the current graph) to check. Once the total amount of scc changes, then this removed point will be marked as an ap. Run this algorithm until there's no ap left and print the final graph into a text file called "rslt.txt". | ||
In a directed graph, I still use Tarjan's algorithm but in a slightly different format. This Tarjan's algorithm gives me the total number of *strong connected component(scc)* in a graph, so I run it in every remainder graph(just simply attempt to delete every node in the current graph) to check. Once the total amount of scc changes, then this removed point will be marked as an ap. Run this algorithm until there's no ap left and print the largest scc in the final graph into a text file called "rslt.txt". | ||
*** | ||
Edited by Wei Le, [email protected] |