Logic Machines

From BenningtonWiki

Jump to: navigation, search

Contents

SYLLABUS

Bennington College
CS2116.01, Fall 2006
Joe Holt, Computing

MW 10:15am - 11:51am, lab W 4pm - 5:36pm
Dickinson 209

You will learn how to Compute.

Theses

  • An algorithm is a precise stepwise description of how to do something.
  • A computer is a machine that is capable of symbolically executing an algorithm.
  • A programming language is a method of formally describing an algorithm, tailored to a specific problem domain.

Description

In this course you’ll study the fundamentals of Computing with emphasis on algorithms and algorithmic thinking. You will discover that computers are really just simple machines that execute algorithms at ridiculous speeds. You will see that programming languages are straightforward attempts to come up with formal descriptions of algorithms.

Required Materials

A deck of cards. Blank note cards. Something with which to write.

A laptop computer that you can bring to class is highly recommended. Either a Macintosh running OS X 10.3 or later, or a PC running Windows 2000 or later will do. You will need to install additional software, which I’ll make available in class. I encourage you to use your laptop during class to augment class discussion (googling and wiki'ing relevant ideas).

There’s a chance we'll use the VAPA Pod for some of our programming classes, which means we’ll have the Macintosh computers there and it won't be so necessary to bring a laptop. However you're welcome to use your own laptop for all in-class work, and you can use your own desktop or school computer for outside-class work.

Class Requirements

You will write small but increasingly complex programs.

You will write reflective essays throughout the term on a semi–regular basis. The essays are short, typically around 256 words and shouldn’t take more than 32 minutes to write. You will post the essays in the class’s online journal by noon on the due date.

Active participation throughout all aspects of this course will make your experience much more meaningful and is necessary for the successful completion of the course. You are expected to be present for all class meetings. Please email me if you must miss a class. More than two absences or chronic lateness will seriously jeopardize your standing in this course.

Your evaluation will be based on the following: Participation and attitude, completion of work, technical dexterity and progress over the term. Incomplete work will be cause for a marginal pass or failure. Late work will not be accepted.

In addition to the two class periods each week, there will be a 96 minute lab. Attendance at the lab is mandatory.

You will need to have daily access to the internet. I use email and the class’s wiki heavily for communications and assignments, and you will be responsible for checking both regularly.

Office Hours / Help

I am available for technical help or to discuss individual questions in person during office hours or any time by email and AIM. Contact me if you would like to schedule a time to meet. Please do not leave voice mail.

The lab is also an appropriate time to discuss questions relevant to the course.

Notes

This section is for all of us to add, edit and contribute to.

Files

Assignment: "How do you..." algorithm

  • Due Monday, Sept 18
  • Come up with a "How do you..." question. It can be the same one you used before or a new one.
  • Write it out as a structured algorithm using the concepts we discussed in class on Wednesday: Actions, Blocks, Data, Conditionals, Branches, Loops.
  • Make a separate list of the Actions used in the algorithm.
  • Make another list of the Data used in the algorithm.
  • Be prepared to discuss your algorithm in class.

Gabe's Algorithm for April Bernard's poetry process

1.	If you experience feelings of building ideas and ideas collect, let them.  
  a.	  If the section of brain is full, and bursting.
     i.	    Place hat on head to ensure keeping ideas from escaping.  
    ii.	    Seclude oneself in study with typewriter.  
   iii.	    Record ideas on paper.
    iv.	    Check paper.
     v.	    If: Alive you can progress.  
        1.	Assuming alive, rewrite and edit several times in a typewriter.  
        2.      Give it a rest and during that rest think about it if it enters your brain.  
        3.	Return for jiggling if needed until satisfied.  
        4.	Once satisfied, complete final draft.
    vi.	    Else: Dump.
  b.	  Else: Wait a hour, check again.  
2.	Else: Wait a day, run again.

Assignment: "Claiming an abandoned bicycle" algorithm

  • Due Wednesday, Sept 20
  • Same parameters as the last assignment, only this time I'm giving you the algorithm.
  • Write it out in a structured way using Actions, Blocks, Data, Conditionals, Branches, Loops.
  • Make a separate list of the Actions used in the algorithm.
  • Make another list of the Data used in the algorithm.
  • The algorithm is from a weekly New York Times column called "The Ethicist". In this column, Kate describes what she did when she suspected that someone had abandoned a bicycle near her house. Here's the column: Claiming an abandoned bicycle.
  • Actually, there are two algorithms here. Do the assignment for both of them.
    • 1. Describe Kate's algorithm
    • 2. Describe the NYPD's algorithm

Two Algorithms for Claiming a Bicycle

Kate’s algorithm for claiming an abandoned bicycle

Look for bicycle

1.As you go about your daily business, keep an eye out for a bicycle that is chained to something you pass
regularly.
2.Find a bicycle that is in the same position several consecutive times that you pass it.

Ascertain that bicycle is actually abandoned

3.Wait a period of two seasons.
  a.If you do not think that the bicycle has been touched during this time, proceed to step 4.
  b.If during this time the bicycle moves (i.e. is facing the opposite direction, is locked to another
  object, or is not there at all), return to step 1.
4.Balance the bike lock at a precarious angle so that its position will change if the bicycle is moved.
5.Leave and wait one week before returning.
  a.If the bike lock is not in the position that you left it in, return to step 3.
  b.If the bike lock is in the position that you left it in, precede to step 6.

Claim bicycle

6.Break bike lock off with a heavy implement.
7.Enjoy your new bicycle.

Actions: Look for bicycle, wait, balance bike lock, leave bicycle, return to bicycle, break lock, take bicycle,
enjoy bicycle.
Data: Bicycle, time, bike lock, heavy implement.

NYPD’s algorithm for disposing of an abandoned bicycle

Find bicycle

1.Look for a bicycle that is damaged or shows signs of obvious disuse.

Notify possible owner that bicycle is in danger of being disposed of

2.Write a tag in pen saying that the bike will be disposed of in two weeks if it is not moved.
3.Attach tag to bicycle.
4.Leave and wait two weeks before returning.
  a.If the bicycle has been moved, return to step 1.
  b.If the bicycle has not been moved, precede to step 5.

Dispose of bicycle

5.Cut bike lock with chain cutters.
6.Dispose of bicycle

Actions: Look for bicycle, write tag, attach tag, leave bicycle, return to bicycle, clip lock, dispose of bicycle.
Data: Bicycle, tag, pen, time, bike lock, chain cutters.

Gabe's General Algorithm for Epidemiology

1.If there are many people with a similar condition appearing ill above normal rate or if a new or unusual disease
appears or if a new specific symptom appears for an already known disease.  
  a.Begin to examine commonalities between victims.  These commonalities may include location, lifestyles, habits,
  professions, food and water purchase locations, time in-between cases and other similarities.  Focus on traits
  uncommon to the general population.  Keep in mind already known contaminants in checking for patterns.  
  b.To check for multiple or single exposures
  c.If the exposures of periodic
    i.Check the possibility of multiple exposures.  
  d.Else
    i.Check the possibility of a single exposure and a continual contagion.  
  e.If patterns emerge
    i.Investigate patterns often by field investigation of source of illness.  
    ii.Make a working hypothesis.  
    iii.Assuming hypothesis check consilliance of evidence and see if hypothesis checks out.    
    iv.If it does
      1.Act on your hypothesis and shut down believed contamination source.  
      2.Check to see if your actions affected the outbreak.
      3.If it did
        a.Examine how it affected the outbreak.
        b.If it brought cases down to a very small level.  
          i.You have solved the case. 
          ii. Using what you have learned, come up with some actions that will prevent outbreaks of a similar kind.  
          iii. Institute those actions.  
        c.Else if the amount of cases changes
          i.Repeat process assuming there was some truth to you hypothesis.  
      4.Else repeat whole process.
    v.Else take other data into consideration and repeat process from step b, substep ii.  
  f.Else continue investigation and probe, door to door if necessary, to find a pattern.  
2.Else there is no outbreak. 
Personal tools