The following would work on Linux and Mac.
I don't know about Windows; give it a shot!
For instructions about the project, see Lab1.pdf.
In addition to the original .c
files, this repository contains a Makefile
, and a couple of python scripts. See below.
To get started, clone this repo:
git clone https://github.com/arjunkrishnababu96/graph-coloring.git
A Makefile
is included to compile the .c
files. To compile greedy.c
for instance, run:
make greedy
This would create an executable with the name greedy
. To run this executable, type:
./greedy
(greedy
expects command-line arguments, which have been omitted above).
To compile and create executables for all .c
source files, run:
make
To remove all object files and executables, run:
make clean
Requires Python 3.6
creategraph.py
generates graphs.
Saves the graphs tooutputs/
with.graph
extension.run_greedy.py
to run thegreedy
algorithm on all graphs inoutputs/
.
Saves the result tooutputs/
with.greedy
extension.
To know about about the usage of the scripts, run:
python3 creategraph.py --help
python3 run_greedy.py --help
You may have to modify creategraph.py
to generate the exact type of graphs you want.