NUIMCrest SE307 - Computation and Complexity Theory
Department of Computer Science
National University of Ireland, Maynooth

T Naughton, NUIM
Back to SE307 home


Lab 8 - The waiting game

In this lab we will run a little experiment which combines computability, human computer interaction, and artificial intelligence. You are required to write one simple program, whether halting or non-halting.

Each of you is assigned a unique number. Check the list to find it. (If you are not on the list ask Damien or Jacqueline to assign you a unique number.) Stick on your keyboard a piece of paper with N written on it where N is your unique number. That's the first easy part.

For the first 40 minutes or so of the lab, write your program. It can be written in any language. It can output anything you want (including nothing) to the screen. The only restriction is that YOU must know whether your program is a halting program or not. You should write your program so that for an hour after setting it running, your fellow students should not be able to tell if it will ever eventually halt or not. That's the second easy part.

As soon as you are instructed by the demonstrators (after 40 minutes or so) you must set your programs running. From then on, you will not be allowed to touch any PC, whether it be your own or a fellow student's. Approach Damien or Jacqueline in turn and tell them whether you have written a halting or non-halting program.

Spend the next hour of the lab moving from machine to machine, inspecting your fellow students' programs running. Try to guess which are the halting programs. Use all the clues you can (What kind of output do you see on the screen? Has it halted already? Is the student an expert programmer? Is the student a joker? Do you know them to be lazy -- might they not have put much thought into their program?). Use the following form to record your guesses.

Approximately 20 minutes before the end of the lab, hand up your fully-completed forms. Damien and Jacqueline will do the calculations. There will be a prize for the student who fools the largest number of classmates. There will be a booby prize for the first student (if any) whose program halts before the hour is up (will anyone risk writing a halting program?).


End of sheet