Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Finding Biconnected Components:
-------------------------------
To run the biconnected component search, use the bic executable. Three arguments are expected:
	- the input file, containing the graph
	- the output file, where the biconnected components are written
	- a flag specifying whether the input graph labels can be treated as integers or not 
		(1 if true, 0 if not)

Note that the intMode flag isn't important - it merely allows the graph file to be parsed faster when the labels are integers and intMode is 1. If integers are used but the flag is 0, it will still work, just slowly.


Input File Format:
------------------
The file consists of 2n+1 lines, where n is the number of vertices in the graph. The first line defines n. The subsequent n lines define the label of each vertex in the graph. The final n lines define the outgoing edges of each vertex, separated by hyphens. Vertices can be labelled with any arbitrary string, but are expected to all be unique.


Validating Output:
------------------
To validate the bic output against the expected output, use the graph_match function in validate.py. The first argument is the expected output file, and the second is the bic output file.

Expected output files for each graph in input/ have the same name but appended with .bic. E.g. input/1000-500's expected output is input/1000-500.bic


Generating Test Cases:
----------------------
graphgen.c can be used to generate test graphs. It takes 4 arguments:
	- the number of desired nodes
	- the number of desired biconnected components
	- the output file defining the graph (for input to bic)
	- the output file defining the biconnected components of the graph (for validating bic's output)

Vertex labels are integers. Some (small) example test cases can be found in input/

About

Implementation of the Hopcroft-Tarjan algorithm for finding Biconnected Components in a connected graph

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages