Encounters with the aliens

IIT's parabolic antennas atop the Stuart Building have recently picked some strange messages from the outer space. It is as of yet unclear whether these messages have any meaning or are just random sequences of 0s and 1s coming from some unidentified source. Making any sense of these messages is of course a big job and the school is feverishly working on it. You are asked to join in the collective effort. A brief description of the problem is given in the enclosed memorandum and in the email your instructor has received from the Chairman of the Computer Science and Applied Mathematics (CSAM) at IIT.

What you'll turn in

  1. A well commented listing of your program (C or C++ is recommended but not required). Note that grading, as described below, considers both the functionality and the readability of your code.
  2. A state diagram for the Finite State Machine you've used to solve the problem.
  3. A memo with your findings. You will indicate what you have looked for (both in decimal and binary format) and what you have found. Direct the memo to your class instructor. In the memo also indicate what is the time complexity of your program; do the same for the space complexity.


  1. Make sure you use the appropriate size for variables in your program. For instance, most compilers running on IBM-PC compatibles will reserve only two bytes for an int. This may be too little to hold some of the variables you use to implement your SSN.
  2. The file you have to analyze contains not only 0s and 1s. It also has line terminators (CR or CRLF) you probably want to skip when providing input to your FSM.
  3. In the cs330 class we don't discuss too much about FSMs. In particular we don't discuss about equivalent states and about how to minimize a FSM. Therefore you don't have to address these problems in your assignment; a straight implementation of a FSM that solves your problem is enough.


  1. A mark between 0 and 10 for functionality. The mark basically indicates in what measure your program works properly.
  2. A mark between 0 and 10 for readability. This mark indicates how well documented your program is.
  3. Multiply the above two marks to get the mark for this programming assignment.

Illinois Institute of Technology

Office of the President

DATE: November 1, 1995

TO: Robert Carlson, Chairman of the CSAM Department

FROM: Lew Collens, President of IIT

SUBJECT: Alien encounters

As you know some of our best scientists are trying to decipher a series of messages we have recently received through antennas on the Stuart Building. It seems that messages have an alien origin though we have not completely ruled out other possibilities.

I ask you to assist us in solving the puzzle. Your Department recommends itself for this job through the high quality faculty and some of the finest students at this University.

Some of the files with messages will be made available to the whole IIT community for research.

Your cooperation is highly appreciated.

From carlson  Wed Nov  1 12:14:34 1995
Received: by charlie.acc.iit.edu (950215.SGI.8.6.10/940406.SGI)
       for virgil id MAA28491; Wed, 1 Nov 1995 12:14:33 -0600
Date: Wed, 1 Nov 1995 12:14:33 -0600
From: carlson (Robert Carlson)
Message-Id: <199511011814.MAA28491@charlie.acc.iit.edu>
To: virgil
Subject: Help
Status: R

Dear Virgil,

As you probably know our Department is currently busy working
to solve the mistery surrounding the messages IIT has picked 
through its antennas.

One thing we are looking for in these messages is signs that the
supposedly alien creatures know about ways we identify in the
society. More specifically, we suspect our Social Security
Numbers may be hidden in the strings of 0s and 1s we received.

We suggest that a 32 bit representation could be used for this

Finding a specific string in a larger string can be easily done
using a Finite State Machine. Given that you have just taught
FSMs in your class, we ask you to use your students' expertise
in this matter. To be more precise, we'd like to have each
student search for her/his SSN in the file containing one of the
messages (~1 MByte) we have got. Assuming they find their SSN 
hidden in the file, it would be useful to know how many times 
it appears.

For your convenience a compressed file (zip) is also available: you 
can uncompress it using gunzip or something similar. Or you may
download the file using anonymous ftp from delta.csam.iit.edu
the directory /pub/cs330/fall_1995. The file is called alien.zip

We really appreciate your cooperation in this matter.



Posted November 1, 1995.

Last modified: November 10, 1995.

For comments send email to virgil@charlie.iit.edu