Skip to content
/ ap Public

Amateur concept of articulation points in both undirected and directed graphs

Notifications You must be signed in to change notification settings

wadelucky/ap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Amateur concept of deleting articulation points in both undirected and directed graphs.


Definition of articulation point(s): It is often written as ap, and usually defined in undirected graph, which has an attribute that once you remove this point from the graph, this remainder graph is no longer connected.


Note: in directed graphs, we can also define the ap in a similar way.


The key method I use to detect ap points is Tarjan's algorithm.


In an undirected graph, I use Tarjan's algorithm and union-find algorithm 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 largest scc in the final graph into a text file called "rslt.txt".


Edited by Wei Le, [email protected]

About

Amateur concept of articulation points in both undirected and directed graphs

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages