CSI 4v96: Competitive Learning, Spring 2014
This course is a topics course in problem solving and algorithms. It is modeled on the collaborative and competitive environments at the ACM International Collegiate Programming Contest. Each week we will discuss a topic, and the assignments will be programming-based problems related to that topic.
Lectures are from 2:30 to 3:20 PM in Rogers 113 on Tuesdays.
My office is in the Rogers Engineering and Computer Science building, and office hours are listed on my home page. I am glad to talk to students during and outside of office hours. If you can't come to my office hour, please make an appointment for another time, or just stop by.
Here is a schedule of the material we will cover. As the semester progresses, the relevant problems will be listed under each topic.
- Week 1 (Tuesday, Jan 14): Introduction to Problem Solving
- Week 2 (Tuesday, Jan 21): Elementary Data Structures — The C++ Standard Template Library or Java Collections, including sequence containers, iterators and basic template algorithms. Problems marked with * are on more advanced topics.
- Week 3 (Tuesday, Jan 28): Sorted associative set and map data structures and their implementations in C++ STL or Java Collections. Problems marked with * are on more advanced topics.
- Week 4 (Tuesday, Feb 4): Strings and string algorithms, searching, sorting
- Week 5 (Tuesday, Feb 11): First Local Contest. Block out 3 hours to solve these problems as if it were a contest.
- Week 6 (Tuesday, Feb 18): Sorting and applications to uniqueness testing, deleting duplicates, selection, efficient searching, and set intersection/union. Start working in groups this week.
- Week 7 (Tuesday, Feb 25): Arithmetic and algebra, big number implementation, prime factorization
- Week 8 (Tuesday, Mar 4): Arithmetic and algebra, number theory, counting problems, modular arithmetic
- Week 9 (Tuesday, Mar 18): Elementary Search Topics, recursive depth-first search, combination and permutation generation, state space traversal
- Week 10 (Tuesday, Mar 25): Second Local Contest. Also, problem writeups are due. Block out 3 hours with your group to solve these problems as if it were a contest.
- Week 11 (Tuesday, Apr 1): Intermediate Search Topics, search pruning and ordering
- Week 12 (Tuesday, Apr 8): Simulation problems
- Week 13 (Tuesday, Apr 15): Disjoint set data structure, path compression algorithm, and applications
- Week 14 (Tuesday, Apr 22): Representing, counting, and computing on grid-oriented data; rectangular, hexagonal, and triangular grids
- Week 15 (Tuesday, Apr 29): Final Local Contest. Block out 3 hours with your group to solve these problems as if it were a contest.
Textbooks & resources
There is no required text for this course. However, the following books may be useful:
- Competitive Programming by Steven Halim and Felix Halim
- Programming Challenges by Steven Skiena
- The Algorithm Design Manual by Steven Skiena
- Introduction to Algorithms by Cormen et al.
- Programming Pearls by Jon Bentley
- Any other data structures, algorithms, and language reference books.
Other online programming contest software:
- Open Kattis -- this is the software used to judge the ACM ICPC contest world finals
Other online resources:
- Bruce Eckel, Thinking in C++ (2nd edition)
- the Standard Template Library (STL) reference
- Project submission guidelines and coding style guidelines for this course.
To submit your projects, use the upload site. Log in with your normal BearID and password. There you should find two options: submission for a Java project, or submission for a C++ project. For Java, do not package your code, your main class should be public, and the main class should be called Driver.
We will use the same upload assignment to submit and test all the projects. So that the upload site can tell which project you're submitting, you should include in your source a comment with the following text:
where N is the three-digit assignment number (e.g. 070 or 289). If you don't set this correctly, your code will not be evaluated correctly. When you click test, the upload site will compile and evaluate your code, and email you the response.
Grades will be assigned based on the following breakdown:
- First semester students:
- # of problems completed: 100%
- Second and third semester students:
- # of problems completed: 80%
- problem(s) developed: 20%
Final letter grades will be assigned at the discretion of the instructor, but
here is a minimum guideline for letter grades:
A: 90-100, B+: 88-89, B: 80-87, C+: 78-79, C: 70-77, D: 60-69, F: 0-59
Each problem completed within 1 week of it being assigned earns 2 points. Each problem not completed within a week but completed by the end of the semester earns 1 point. Completing a program means passing the tests on the upload site.
For weeks designated as "contests", the problems will not be publicly posted to the web. You should choose a 3 hour window during which you plan to work on the problems. Send your professor an email about 24 hours in advance of this time, and he will send you the problems via email. Then work on the problems during your chosen time frame.
Students taking the course for the second (third) semester must develop one (two) problems of their own. Use the Kattis problem package and fill in the relevant parts. In particular, your writeup should have:
- A Latex writeup.
- At least one correct, efficient, well-structured, well-commented, one-file solution in C++ or Java.
- Possibly other submissions that highlight incorrect solutions (wrong answer, too much time, etc.)
- Files containing sample and secret inputs (each having suffix ".in"). The size of all inputs combined should be less than 500 Kb.
- Files containing sample and secret outputs (each having suffix ".ans"). The size of all inputs combined should be less than 500 Kb.
- An input format validator. It should use exit code 42 when the input file is correctly formatted, another exit code when there is a problem.
- A test case generator which generates input file (may be written in C++, Java, Perl, or Python). This should probably have some hand-made test cases hard coded in, as well as some randomly created test cases.
- An appropriately filled-in problem.yaml file.
These problems are due at the last class meeting of the semester. You must also submit via email to the professor your ideas for your problem(s) the 3rd class meeting, and a draft of the completed writeup on the 10th meeting.
- This website contains the official course information. Please check it regularly for updates.
- All work in this course is strictly individual, unless the instructor explicitly states otherwise. While discussion of course material is encouraged, collaboration on assignments is not allowed. Collaboration includes (but is not limited to) discussing with anyone (other than the professor) anything that is specific to completing an assignment. You are encouraged to discuss the course material with the professor, preferably in office hours, and also by email.
- Bring any grading correction requests to your professor's attention within 2 weeks of receiving the grade or before the end of the semester, whichever comes first.
I take academic honesty very seriously. Many studies, including one by Sheilah Maramark and Mindi Barth Maline have suggested that "some students cheat because of ignorance, uncertainty, or confusion regarding what behaviors constitute dishonesty" (Maramark and Maline, Issues in Education: Academic Dishonesty Among College Students, U.S. Department of Education, Office of Research, August 1993, page 5). In an effort to reduce misunderstandings, here is a minimal list of activities that will be considered cheating in this class:
- Using a source other than the optional course textbooks, the course website, or your professor to obtain credit for any assignment.
- Copying another student's work. Simply looking over someone else's source code is copying.
- Providing your work for another student to copy.
- Collaboration on any assignment, unless the work is explicitly given as collaborative work. Any discussion of an assignment or project is considered collaboration.
- Studying tests or using assignments from previous semesters.
- Providing someone with tests or assignments from previous semesters.
- Turning in someone else's work as your own work.
- Giving test questions to students in another class.
- Reviewing previous copies of the instructor's tests without permission from the instructor.