Paul Bodily About Courses Research Outreach Tips for Communicating Teaching Philosophy Vitae

Programming Projects

There will be 5 individual programming projects throughout the semester and one final group project. For each project, you will solve a concrete problem by implementing an algorithm in such a way as to meet a conservative performance requirement. A reasonable implementation will sail through the performance requirement. You will prepare a typed report electronically according to the guidelines for each project. You will answer questions posed in the project guidelines and usually report the results of an empirical analysis of your algorithm. All project reports should include a copy of your documented source code and a screenshot demonstrating the working algorithm. And, all reports should be prepared neatly and professionally using good grammar and writing, be easy to read and clearly contain all required information for the project---make it easy for the reader to see that you know what you are talking about.

All projects will be done in Python using the development environment of your choice. Because we will be providing you with code harnesses for the projects, you must work in Python (if this is a new language for you---great!---the more languages you are exposed to, the better). Follow this link for more information on installing Python 3 and PyQt5 (necessary for GUIs, etc.)

Design Experience: You are developing as a problem solver. In this class, you are also learning the importance of solving a problem and analyzing the solution before you start writing code. For each project, you are required to have a "design experience" after reading the project instructions but before writing any code.

This experience might best be done using a whiteboard to walk through the solution with a one- (or more-) person technical audience, with that person being a CS 4412 classmate, another CS major or another technical person with an eye for detail. Make sure you sketch out and understand how to represent a problem instance (both inputs and outputs) and how to map from inputs to outputs (your algorithm). Simulate simple examples and a non-trivial example or two with your marker. Think out loud. Listen to your audience as he or she poses questions or identifies potential complications. In short, make sure you understand what you are going to do before you write a stitch of code. If two students reciprocate for one another, then each person should take a turn as presenter and as audience member. The purpose of your design experience is to get the concept of a working solution out in front of yourself (and other thoughtful people). If you don’t have a solution that appears to work and hold up to scrutiny, then your design experience is not complete. Don’t code without clear thinking up front.

I'd suggest working in small groups, probably no more than 2-3, that way everyone gets a chance to "drive". The design experience is not so much a layout of the code as it is an opportunity for each of you to walk through by hand a few problems to really make sure you understand the process. You should not be writing or sharing code in the design experience. It's really about making sure you thoroughly understand how to solve the problem on your own. As an example of what I would hope to have you do in the design experience for Project 1, I would hope that you'd choose some inputs (e.g., N = 17, k = 3) and you should walk through the algorithms by hand to determine whether N is prime, and with what confidence you can say that N is prime, based on the algorithms discussed. Then try some different inputs. Each person should try a few different problems. Try some simple problems, but also try a few harder problems that really require you to explore the "edge" cases. This will serve to make sure you understand thoroughly the problem you're dealing with.

For each design experience, you will complete a simple quiz in Moodle by briefly describing and evaluating the quality of your experience. Due dates for these quizzes are shown on the schedule; quizzes will open one week before the due date and close at 10:59 pm on the date they are due. Late design experiences are not accepted, but if you are late you should go through the process anyhow before writing code. Each project's design experience has a submission deadline on the course schedule about a week and a half before the project report submission due date (except for the first project), but I encourage you to finish the design experience as early as possible. The design experience will be worth 10% of your project grade.

Projects

Note that although code quality and report quality are not explicitly included in the grading rubrics for these projects, the TA is authorized to deduct up to 10% of the total points for each. To ensure that you are not penalized, be sure that your code uses all of the principles of good programming, including good variable naming, abstraction, encapsulation, no magic numbers, and good commenting. Also be sure to use good spelling, grammar, and orthography in your written reports.
  1. Fermat: The purpose of this project is to get you up and running with Python. You will also gain experience with algorithms for modular arithmetic. In this project, you will implement a prime number test based on Fermat's little theorem and the Miller-Rabin conditions.
  2. Convex Hull: In this project, you will implement a divide and conquer algorithm for finding the convex hull of a set of points and you will analyze the algorithm both theoretically and empirically.
  3. Network Routing: In this project you will implement Dyskstra’s algorithm to find paths through a graph representing a network routing problem. You will use two different data structures to implement a priority queue in order to see that both algorithm design *and* data structure implementation significantly affect performance.
  4. Gene Sequencing: In this project, you will implement two versions of a dynamic programming algorithm for computing the minimal cost of aligning gene sequences and extracting (an) optimal alignment. In the process, you will learn a little bit about computational genomics and how domain knowledge can affect algorithm design.
  5. Traveling Salesperson: In this project, you will implement a branch and bound algorithm to find solutions to the traveling salesperson problem (TSP) and get your first taste of dealing with NP-completeness.
  6. TSP Group Project: In this project, you will work in a small group to compare accuracy and the theoretical and empirical complexity of different algorithmic "solutions" to the traveling salesmen problem (TSP), including greedy, branch and bound, and an algorithm of your choice. In this context, a "solution" is an approximation that is found in reasonable time.

Submission: All assignments should be submitted as a ZIP file via Moodle that includes your project report in PDF format and your project code. In the interest of deterring academic dishonesty please keep any code you develop for these projects out of the public domain (e.g., make any github repos private).

Acknowledgments

Thanks to Dr. Dan Ventura for help in designing the projects and requirements for this course.