CS 312 – Algorithm Analysis

Syllabus Fall 2015


Sec. 1 TuTh 9:30-10:45am, 130 MARB

Sec. 2 TuTh 1:35-2:50pm, B101 JFSB

Professor: Tony Martinez, 3336 TMCB, 422-6464, http://axon.cs.byu.edu/~martinez

martinez at cs.byu.edu, Office Hours: by appointment

Course website: http://axon.cs.byu.edu/~martinez/classes/312/


TAs: Michael Walker, Steven Barnett, Erik Swenson, E-mail: byucs312ta@gmail.com

 Office hours: 1156 TMCB

Michael: M 8:00am-11:00am, TuTh 12:00-1:30pm, 4:30pm-6:00pm, WF 2:30pm-5:30pm

Steven: MWF 11:00am-2:00pm

Erik: WF 9:00am-11:00am, TuTh 6:00pm-8:00pm


Goals:  Analysis of algorithms from both a practical (programming) and theoretical (mathematical) point of view.  Understanding of algorithm efficiency in terms of both time and space.  Gain understanding and proficiency with fundamental algorithmic paradigms that are critical in efficient programming.  These include Divide and Conquer, Greedy, Graph Algorithms, Dynamic Programming, Linear Programming, Intelligent Search, Local Search, and Probabilistic Programming.  A side goal is to have an experience with Visual Studio and the C# programming language.


Prerequisites:  CS 240, CS 252


Text: The textbook for the class is Algorithms by Dasgupta, Papadimitriou, and Vazirani. There will also be a few supplemental handouts available from the schedule page.  You are expected to read the assigned literature before and optionally after the scheduled lecture. To help encourage quality reading, I will pass around a sheet each day for you to mark whether you have done a complete and careful reading, a partial reading, or no reading.  A complete and careful reading counts for 2 points, partial gets 1 point, and none receives 0 points.  Each day you will mark if you have done the reading for the lecture to be given that day.  The grading will be non-linear such that missing one or two readings does not hurt much, but it picks up fast after that.


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.  Submission: All project reports should be submitted in PDF format via e-mail to the TAs on or before the published due date, except the group project which is due as a hardcopy at the beginning of class on the day you present your group project.


All projects will be done in C# using visual studio.  This software is installed in all open lab machines and you can also download the full visual studio for free since you are a BYU student. Also, anyone can download visual C# express which takes much less space and has everything you will need for the projects.  Follow this link for more information on installing and using C# and visual studio.


WB Problem-solving (WB): 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 step up to a WB after reading the project instructions but before writing any code. In medical school, they use the learning pattern “learn one, do one, teach one.” Class lectures and reading help with the learning; the homework provides opportunities to actually solve similar problems; and the WB experience is your opportunity to teach/explain the idea.


Use the WB to walk through the solution with a one-person technical audience. The best person for your audience would be a CS 312 classmate. Other possibilities could be 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 / question asker. There are whiteboards all over campus. In particular, many of the study rooms in the Lee Library have WBs, and there are WB markers that can be checked out at the reference desks in each section of the library.


For each WB experience, prepare a simple one-page PDF format report including your name and the project number. Also include a photo of your “WB experience” with you standing next to your WB designs. The photo is a required element of your WB experience report. Include a caption with the photo listing the elements to be found in the picture on the board. Submit via e-mail to the TAs.  Late WB experiences are not accepted, but if you are late you should go through the process anyhow before writing code. Each project's WB 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 WB experience as early as possible.


To recap: the purpose is to get the concept of a working solution out in front of yourself and one other thoughtful person. If you don’t have a solution that appears to work and hold up to scrutiny, then your WB experience is not complete. Don’t code without clear thinking upfront.


Homework: Regular homework assignments are posted on the schedule.  Changes to the existing homework schedule are inevitable and will be announced in class and posted to the schedule.  Homework will help solidify concepts learned during the lecture and from the required reading.  Often the homework will help you prepare to succeed on your projects as well.  A reasonable attempt, even though incorrect, at a homework will earn at least half credit.  “Reasonable” means that you show your work and justify your answers.  For both homework and exams, you should show your work and approach as to how you got the answer, since making sure you understand the techniques being taught to solve the problems, is as important as just getting the right answer.  Unless you are having fun, do not spend more than two hours on a non-project homework assignment.  Homework assignments are due on paper at the beginning of class on the due date specified on the schedule.  Keys for the homework will be published on BYU’s learning suite the afternoon of their due date.


Exams:  There will be one mid-term and a final exam.  The mid-term will be in the testing center and the final will be in class at the university appointed time.  Both tests will be closed book.  For each exam, you may bring one page of notes (single sided and with a font no smaller than Times 12).  You will hand in your note sheet with the tests.


Working together:  You are encouraged to work together on studying for exams and discussing lectures and homework assignments.  You may also discuss together ways to do your programming projects and compare results, etc.  However, you must do your own work when it comes to final solving and writing homework answers and coding for your projects.  If you work closely with one or more students on a project or homework, list the names of those students on the project or homework.  We will set up a discussion group on BYU Digital Dialogue or Google groups for this class that you can join if you would like.  You can use this group to post questions and have discussion with your classmates.  The TAs will also monitor this group and answer questions that come up.  This is a good place to post and ask about performance results so you can see if your solution is in the “ballpark.”  This is also a good place to discuss high level algorithmic issues and also issues such as how to link into certain libraries, etc.  Remember, that actual algorithmic code or pseudo code should not be published on this group.


Grading (~):  The first project is simpler and will be given less weight than the others. You can see most of your grades on BYU learning suite to make sure your assignment was graded, but ignore any grade scales given there as they are not correct.  The grade scales are below but I reserve the right to adjust slightly based on circumstances.  The grade scale is based on the sum of all your grades.






























Late assignments:  Homework assignments are not accepted late, as they are meant to keep you up to speed on lectures, and also because we will immediately post answer keys after the homework is due.  For the five individual projects, you will be allotted a total of 4 late days throughout the semester (hopefully, you will not need any of them).  As an incentive, 1 extra point (out of 100, and up to a maximum of 4 points) will be allotted for each day (excluding Sunday) you turn in a project earlier than the due date (this does not include the WB experience).  If/after you use up your 4 day allotment, late projects will be marked off at 5%/day late (excluding Sundays) up to a maximum of 50% off.  Each late day ends at midnight.  Finally, if you have any extremely unusual circumstances (sickness or issue very unique from what all the other students have, etc.), which you inform us of, then we will not take off any late points for homework or projects (This should be rare).  Nothing can be accepted after the last day of class instruction.


Topics, Readings, Projects, and Homework Schedule:

University and Other Items: