COS 226 Programming Assignment Checklist: Assignment Problem

Frequently Asked Questions

I can't compile generate.c because it can't find the log10() function. The function log10() is in the math library. You need to #include <math.h> and on some system compile with the -lm option to explicitly link in the math library. If you are using gcc126, this is done automatically.

Input, Output, and Testing

Input and output. Here are a number of sample input files. You may also use the program generate.c to create your own test instances.

Reference solutions.   For reference, we provide executable code for our solution in Windows, Solaris, and OS X. The program has not been thoroughly tested, so please report any bugs for extra credit.

Submission and readme

We will compile your program with "gcc *.c" so you are free to organize your program as you see fit. As usual, we encourage and reward sound design principles.

Here is a template readme.txt file. It should contain the following information:

  • A high-level description for the design of your algorithm, and what influenced your decisions.

  • An empirical analysis of the running time as a function of N.
  • Unix users may find the shell script timeit.csh useful for computing a table of CPU times.

    Getting started

  • Download the directory assign. This directory is mirrored on arizona at /u/cs226/pub/assign. It contains reference solutions, sample input files, and a min cost flow solver.
  • Enrichment links

  • For state-of-the-art network flow solvers, go to Andrew Goldberg's network optimization library.

  • COS 226 Home Page
    wayne@cs.princeton.edu
    Last modified: April 22, 2002