CSI 4v96: Competitive Learning, Spring 2015


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.

Practical information

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.

You will submit your solutions to Baylor's Kattis Judge. You may need to create an account, and will then register for the course.


Here is a schedule of the material we will cover. As the semester progresses, the relevant problems will be listed under each topic.


  1. Introduction to Problem Solving.
  2. Elementary Data Structures — The C++ Standard Template Library or Java Collections, including sequence containers, iterators and basic template algorithms.
  3. Sorted associative set and map data structures and their implementations in C++ STL or Java Collections.
  4. Strings and string algorithms, searching, sorting.
  5. First Local Contest.
  6. Sorting and applications to uniqueness testing, deleting duplicates, selection, efficient searching, and set intersection/union.
  7. Arithmetic and algebra, big number implementation, prime factorization.
  8. Arithmetic and algebra, number theory, counting problems, modular arithmetic.
  9. Elementary Search Topics, recursive depth-first search, combination and permutation generation, state space traversal.
  10. Second Local Contest. Also, problem writeups are due.
  11. Intermediate Search Topics, search pruning and ordering.
  12. Simulation problems.
  13. Disjoint set data structure, path compression algorithm, and applications. No meeting due to Diadeloso.
  14. Representing, counting, and computing on grid-oriented data; rectangular, hexagonal, and triangular grids.
  15. Final Local Contest.

Textbooks & resources

There is no required text for this course. However, the following books may be useful:

Other online programming contest software:

Other online resources:

Course handouts


Grades will be assigned based on the following breakdown:

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

Solving problems

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 (hidden) tests on the judge.

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.

Writing problems

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:

The reason we use Kattis problem package format is due to the set of tools that are available for verifying problem integrity. You should get and install them from github on the Kattis problemtools project page. (They are easiest to install on Ubuntu.) As the problemtools package uses a Git submodule, to get the full source you need to use the following command to get all the sources you'll need:

git clone --recursive git@github.com:Kattis/problemtools.git
After installing it, use this software to verify your problem package before submitting it to me. This means running "verifyproblem.py" to verify the entire problem package. You can also use "problem2pdf.py" to see how your problem writeup looks when rendered in PDF.

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 of the entire problem on the 10th meeting. A completed writeup is a complete package (solution(s), test data, input validator, problem writeup, problem.yaml metadata file, etc.). The package should validate using "verifyproblem" (see Kattis problemtools above).

Here are some additional thoughts and guidelines on how to write programming contest problems.


Academic honesty

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:

Copyright © 2015 Greg Hamerly, with some content taken from a syllabus by Jeff Donahoo.
Computer Science Department
Baylor University

valid html and css