6.046J / 18.410J / SMA5503
Introduction to Algorithms
Fall 2001

Algorithmic Programming Contest

Prize Announcement

First prize for the contest is $100, plus a one-of-a-kind, custom-made puzzle. William Waite, a talented puzzle designer and craftsman living in Denmark, will translate a puzzle generated by the winning program into elegant physical form. You can see more of his puzzles here.

The challenge for this year's programming contest is to find interesting sliding-piece puzzles, based on specifications of the piece shapes you may use.

This handout (also available on the handouts page) contains the complete problem specifications.

Handout 35: Algorithmic Programming Contest   PostScript   Adobe PDF

We provide complete, working sample code, in Java, C++, and C. The only problem is it's not very efficient. All you need to do is pick your favorite language, download the source, and improve it. You can also write a solution from scratch in whatever language you want. Here is the sample code:

  • Java

    Expand the following tar file, and use "javac *.java" to compile all the source. Run it with "java Slide < testfile".

    Java_sample.tar

    Here are the javadoc documentation pages for this code.

  • C++

    Expand the following tar file, and use the makefile to build the program slide. Run it with "./slide < testfile".

    C++_sample.tar

  • C

    Expand the following tar file, and use the makefile to build the program slide. Run it with "./slide < testfile".

    C_sample.tar

And here are some additional resources:

Good luck, and have fun!