Project 1: Real Life Algorithms

 

DUE: Friday, September 10th in class

 

Overview

 

Algorithms are precise step-by-step instructions on how to accomplish a desired task.  A formal algorithm for use with computers or in mathematics must be very detailed and resolve the ambiguities that we take for granted in everyday life.  Your first out of class assignment is to pick a common or interesting task and approach it algorithmically, breaking it down to the level that a computer might understand.

 

Assignment

 

For this project you need to pick an everyday or interesting task and create an algorithm that explains how to do it.

 

 

What to turn in

 

Type your algorithm up using the following example as a template.  Name the task your algorithm describes, the input and output, and then list the steps involved, numbering each, followed by what your algorithm assumes.

 

Example

 

 

Algorithm: Calling a friend on the telephone

 

 

Input: The telephone number of your friend.

Output: None

 

Steps:

  1. Pick up the phone and listen for a dial tone
  2. Press each digit of the phone number on the phone
  3. If busy, hang up phone, wait 5 minutes, jump to step 2
  4. If no one answers, leave a message then hang up
  5. If no answering machine, hang up and wait 2 hours, then jump to step 2
  6. Talk to friend
  7. Hang up phone

 

Assumptions:

 

 

 

Advice

 

Please don’t go overboard with this assignment, keep the algorithm under 30 steps.  However, do try to make this interesting, avoid recipes for food or the like since the book deals with these extensively.  Also note that you are allowed to be somewhat vague without being imprecise.  Note I say here to leave a message, but not what that message is.  That would be dependent on the individual call, and not affect the actual process of making a call.  Reasonable assumptions are along the lines of assuming the presence of necessary materials.  Unreasonable assumptions introduce ambiguity, like assuming the “universal” knowledge of how much a “pinch of salt” is.

 

Grading

 

You will be graded on your originality and the precision of the algorithm.  The task should be clear to me, and reproducible from the steps you list.  To get a second opinion on this, you will spend a few minutes in the class on the due-date trading them with your classmates.  This allows you to act both as the designer of the algorithm and as the “computer” it runs on.