The goal of this class project is to investigate and evaluate heuristic algorithms for the minimum dominating set problem. The aim of the first submission is to ensure that the code is correct and meets the specifications. Your new heuristics will be evaluated more thoroughly for the quality of their solutions at the end of term.
Your program has two command line parameters:
Usage: dom.exe <maximum number of seconds per graph> <verbose>
The first parameter gives a time limit in seconds for the maximum time that the heuristic should run on each graph. Verbose is either 0 or 1 and specifies the type of output desired (described below).
The input is in the same format as for assignment #2. The input should come from standard input.
If verbose is true, for each graph a certificate is printed
which is in the same format as the output for assignment #2.
If verbose is false, then for each graph print
graphNumber n k
The output should go to standard output.
Use a constant NMAX set to 2187 for the maximum number of vertices:
#define NMAX 2187
If NMAX is not big enough, print an error message that explains that the user should increase NMAX and recompile.
Do not use dynamic memory allocation (for example malloc/free). Using repeated malloc/free calls
will end up slowing the program down and could create bugs that cause memory leaks.
Memory leaks are a disaster when you are working with large computations.
It is very important that your program works when I try to run it on more than one graph at a time. As part of our research efforts we want to be able to find a minimum dominating set on potentially thousands of graphs and so it is essential to have programs that work on more than one input.
The files in dom_set_heuristics.zip that you can download from the connex resources will help you a lot with this project. It contains:
For algorithms 1 and 2, do repeated random trials until you run out of time.
Do whatever you like to try and beat the performance of algorithms 1 and 2. If you discover a smaller dominating set than the minimum known for one of the open problems, be sure to let me know. The known results are summarized in the file known_results.txt that is included with the files I am giving you for the assignment.
Your programs should be called respectively LastName_k.c or LastName_k.cpp where k is the algorithm number. For example, my three programs would be Myrvold_1.c, Myrvold_2.c and Myrvold_3.c. For last name Yang, please also use your first initial: YangA_1.c or YangN_1.c for example.
CSC 520 students will eventually implement some published heuristic. If you submit an approach, then I will check it along with the other heuristics. You will not lose any marks if you wait and submit it later.
I had to use
limit stacksize unlimited
on my Linux machine to have enough space for the big problems.
You only need to type this once per session.
On other machines, you might type something like:
ulimit -s unlimited
Try asking me or the consultants or use google to find out
how to do this on your machine.
To get putty:
putty: http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
All code submitted must be your original work except for the code I have given you permission to use. You may use the sampel code I have provided on connex and if you do, I think it will help you a lot in developing your programs. If you use my sample code, include an acknowledgement in your program. If you use code taken from the internet, an API, other students, previous model solutions or other sources and submit it as your own work you will not get credit for that code. Further if your source is not acknowledged, you are subject to disciplinary action according to the department policies for plagiarism.