For algorithms for unweighted graphs, the input graph file is required to be of the format:
n m
u1 v1
u2 v2
.
.
.
um vm
For algorithms for weighted graphs, the input graph file is required to be of the format:
n m
u1 v1 w1
u2 v2 w2
.
.
.
um vm wm
To compile all four versions of the code, i.e.,
- exact max-flow based algorithm for unweighted graphs
- exact max-flow based algorithm for weighted graphs
- approximate iterative peeling for unweighted graphs
- approximate iterative peeling for weighted graphs
simply run
sudo chmod +x compile_all.sh
./compile_all.sh
To run the code, the syntax goes as follows:
- exact max-flow based algorithm for unweighted graphs
./exact multiplier < input_file
- exact max-flow based algorithm for weighted graphs
./exactweighted multiplier < input_file
- approximate iterative peeling for unweighted graphs
./ip no_of_iterations < input_file
- approximate iterative peeling for weighted graphs
./ipnw no_of_iterations < input_file