Questions

Please make a directory for each entry, called q1 .. q10. Place the answers to each question in the corresponding dir

1: ccontrol GUI

Write a GUI tool to manipulate the configuration files for ccontrol.

The tool could do the following:

  1. Dock to provide an applet to relink the "default" symlink to other files in the .ccontrol directory
  2. Present the user with a tab for each section of the configuration file, allowing them to manipulate the fields, with the defaults inherited from the initial (aka. "[*]") section
  3. Allow the user to add and delete configuration sections.
  4. Indicate "include" directives and allow user to switch to that file.

The ccontrol man-page has extensive documentation about the format of the config files. Although you'll probably prefer to install ccontrol to test your GUI, the man page is available here: ccontrol.1. The full tarball is available: ccontrol-0.8.4.tar.bz2.

Maximum 100 points, judged by the author of ccontrol. Points will be awarded for functionality, completeness and usability.

2: C optimisation

Optimise the code in the file q2.c. A description of algorithm is included in the file

Your entry will be compiled with -O3, and judged on a ppc machine.

70 points for the fastest implementation, 0 if it runs at the same speed as the original, scaled between, with penalties for inaccuracies (minimum of 0)

3: Decompiling a C program

q3.s, q3-O.s and q3-O2.s are assembly programs produced by a recent version of GCC targeted to the PowerPC architecture.

Your task is to produce C code for the body of the routine `foo' that corresponds as closely to the original C code as possible. Extra points will be awarded if you can identify the purpose of the function.

The various files were produced with no optimisation, -O and -O2 optimisation levels respectively (-O3 was not included, as it produced the same results as -O2). You may choose to base your solution on any of these; some may find more optimised versions easier to work with. An unoptimised program is more verbose, but often easier to understand.

Hints:

Up to 50 points, depending on the clarity and correctness of your source code

4: Sudoku

Write a program which creates a random suduko puzzle which is solvable by logic alone (ie. no guessing required!).

Output will need to be in the following format:

Bonus points for a program that supports difficulty settings (easy/medium/hard)

More information on the game is here

80 points for a working puzzle creator, 20 points bonus for the difficulty setting

5: More optimisation

Write a program in C to reverse each line (including the last line, if there is no newline character) of input (ie, each line is reversed, but the order of the lines is kept constant). The program will take input from standard input, and print to standard output.

You may assume that the lines are under 100 characters in length, and contain only 7-bit ASCII.

You can submit three entries for three judging criteria:

  1. Smallest source code size
  2. Smallest genrated object code size (no inline asm!)1
  3. Most obfuscated code

Please name your sources 1.c, 2.c and 3.c, so we know which is which.

1: The file will be compiled with the following flags:

gcc -Wall -Werror -Os -s 2.c -o 2.o
with our compiler. Size will be judged with the command:
wc -c 2.o

For parts a and b, 40 points will be awarded for the smallest implementation, with (40 * min-size / your-size) points awarded for larger submissions.
Part c will be at the judges' discretion, with a maximum 20 points awarded. Implementations must be correct to receive points

6: Lists

Consider the following data structure, defined in q6.h:

struct list {
       int item;
       struct list *next; /* NULL when at end of list */
};

extern struct list *head;

Write a function in C that determines the number of elements in the list. There are the following restrictions:

We will be linking your code with an object file that defines the variable head - your main() function should operate on this list, and print the number on stdout.

50 points for a correct implementation

7: LCA Firefox Plugin

Write a plugin for firefox that displays what the current and immediate next presentations for LCA are. Bonus points if it dynamically parses the information from the LCA website.

There is a sample output of the program page here: linux.conf.au-program.html

70 points for a correct implementation, judged on correctness, completeness and style.

8: PHP to C

Translate the program q8.php into C. The output of diff between the two files should be as small as possible.

Note:

No special compiler flags are allowed, warnings are OK. You are not allowed to #ifdef-out large chunks of code.

50 points will be awarded to the submission with the smallest diff, and (50 * min-size / your-size) points for larger diffs

9: Corrupted Data

This file is a gzipped ASCII text file, but has been corrupted. Your job is to recover the original data.

100 points if you recover the data completely.

10: Corrupted Filesystem

A graduate student comes to you pleading for your help. It seems that he had several years worth of research on a hard drive which was (of course) never had been backed up. Unfortunately, he accidentally formatted the the hard drive, and if you can't help him recover his data, he expressed concern that several years of research on dysfunctional on-line communications practices might have to be redone from scratch.

Your mission, should you choose to accept it, is to find and recover the poor student's research data.

The image file is here: q10.img.bz2.

100 points if you recover the data completely.

FAQ

Can I use source code from the 'net?

Yes, you can use search engines, reuse code you find on the internet (within licence conditions of course). However you must make make it clear which parts are your code and which has been reused.

What languages can I write the programs in?

Unless specified (eg optimise the C algorithm), you can write it in whatever language you want. Please keep to languages that you would expect compilers/interpreters to be already installed on or easy to install on most machines (eg don't make it too hard for the markers or you'll put them in a bad mood!)

How do I submit entries?

Place an AUTHORS file in the root dir of your submission, with a contact name and email address so we know who to give the loot to!

You will have received a slip of paper with a userid and a password. To submit, just rsync your submission to our server:

    rsync -av your-directory rsync://userid@10.4.254.229/userid/