Computer Science 539
Data Structures and Algorithms
Fall, 2001

Weizhen Mao
Department of Computer Science
College of William and Mary


General Information | Schedules | Announcements | Lectures | Assignments | Project | Exams

Project: Points, points, and more points

I have written a makefile for the entire project (Makefile). To use this makefile for part 1 of the project, you should name your test program ProjTest.cpp and take out any references of classes other than Point and PointPair from the makefile. By typing "make", your programs will be compiled and linked. By typing "./ProjTest", your programs will be run. By typing "make clean", all the .o files will be removed and you are ready to use "make" to compile again.

For part four of the project, I have written a test program called "ProjTest.cpp". This test program only tests the two member functions related to the closet pair problem, the brute-force algorithm and the divide-and-conquer algorithm. The test program ProjTest.cpp gets the input set either from a file or from the random number generator, and runs the brute-force algorithm and the divide-and-conquer algorithm to find the closest pair. You can use the test program to (1) check the correctness of your implementation by computing and comparing (manually) the distances of the closest pairs found by the two algorithms and (2) measure and compare the running times needed by the two algorithms to produce the closest pairs. After using "make" to compile and link the programs, type "ProjTest -f filename" if you want to use a file as the source of input, or "ProjTest -n number -m max" if you want the test program to create a random point set of "number" points with "max" as the maximum value for the x and y coordinates. If no options are used, the test program will use the default values number=10000 and max=10000.


Rules to follow:

The project is a semester-long project consisting of four parts. Each part has a completion deadline and will be graded as the semester proceeds. Since plenty of time will be given to you to finish each part, no late submissions will be accepted. The project is worth 30% of your final grade. So it is important that you start early and make plans.

The project should be written in C++ and will be tested on the Linux platforms in McGl 121. Your TA will use the gnu C++ compiler (g++) when grading your project. I will hand out makefiles for you to compile and test your programs. These are also the makefiles that your TA will use to grade your project.

Please refer to the departmental page on computing http://www.cs.wm.edu/cspages/computing/ for computer usage rules, basic UNIX commands, help with Emacs, and remote access to the Linux boxes in McGl 121.


Preparation:

I suggest you start the project with the following warm-up steps:

How to submit your programs electronically:

Each part of the project (together with previous parts) must be submitted to the instructor's course directory by midnight on the due date. Since plenty of time is given for completing each part of the project, no late submissions will be accepted. To submit files (usually .cpp programs), follow the next three steps:

You will be prompted with messages indicating whether your programs have been submitted successfully. The system will reject your submissions if the deadline is passed or your programs do not compile. If you submit twice, the latter submission will always replace the former submission as long as it occurs before th deadline.


How your programs will be graded:

The completion of the project includes four submissions, with the first submission consisting of part one, the second submission consisting of parts one and two, the third submission consisting of parts one, two and three, and the final submission consisting of all four parts. The maximum score for the entire project is 150 points, with the 1:2:4:8 weight distribution applied for the four submissions respectively. That is, the maximum score is 10 points for the first submission, 20 points for the second submission, 40 points for the third submission, and 80 points for the final submission. For submission i, 25% of the allocated points will be given to parts that have been submitted and graded before and 75% will be given to part i (the new stuff). This scheme of multiple submissions and grading awards those who correct their mistakes in previous submissions and penalizes those who make the same mistake more than once. The following summarizes this grading policy:

The grading of the project will be based on the correctness and efficiency of the algorithms, programming styles, quality of design, and documentation.


Summarizing your experience:

In addition to the programming component of the project, you are required to write a short paper (with no more than two pages) to summarize the experience in working on the project. You may talk about, for examples, things you have learned from working on the project, the problems encountered and how they were later solved. I also like to hear about, for examples, what you like about the project and how it should be revised and improved in the future. This is a good opportunity to practice your technical writing skill. So take this job seriously.

Although the paper does not count any points in the project, a poorly written paper or failure to turn in the paper may result in a slight deduction of the credits you have earned in your project. The deadline to turn in your paper is December 6, 2001, in class.

You are welcome to use any word processor of your choice to write the paper. You are especially encouraged to learn to use LaTex. If you don't know any word processor, you can simply type up the paper. No hand-written paper will be accepted.


Last modified: November 20, 2001