Docsity

CS 140 Assignment #1: PB&J Sandwich Algorithm - Prof. Andrew R. Dalton, Assignments of Computer Science

Toggle sidebar
bg1
CS 140 Fall 2008
Assignment #1:
Developing Algorithms
Dr. Andrew R. Dalton
August 18th, 2008
1 Overview
The purpose of this assignment is to give you some experience developing algorithms. According to Wikipedia,
an algorithm is “a finite list of well-defined instructions for accomplishing some task that, given an initial
state, will terminate in a defined end-state” [1].
1. Consider the following initial state:
•A bag containing sliced bread
•A jar containing peanut butter
•A jar containing jelly
•A plastic knife
Develop an algorithm for producing, as an end-state, a peanut butter and jelly sandwich. Be as
precise as possible when developing your list of instructions.
2 Hand-In Instructions
The assignment is due at the start of class on August 20th. You are required to turn in a typed document.
The document should include your name, your username, the date, the course number, and the assignment
number. For example:
Andy Dalton (adalton)
August 20th, 2008
CS 140 – Assignment #1
1. · · ·
3 Notes on Collaboration
You are required to work individually on this assignment. Please do not consult anyone other than
me on any aspect of this assignment.
References
[1] Wikipedia. Algorithm. http://en.wikipedia.org/wiki/Algorithm, 2008.
1

Partial preview of the text

Download CS 140 Assignment #1: PB&J Sandwich Algorithm - Prof. Andrew R. Dalton and more Assignments Computer Science in PDF only on Docsity!

CS 140 Fall 2008

Assignment #1:

Developing Algorithms

Dr. Andrew R. Dalton

August 18th, 2008

1 Overview

The purpose of this assignment is to give you some experience developing algorithms. According to Wikipedia, an algorithm is “a finite list of well-defined instructions for accomplishing some task that, given an initial state, will terminate in a defined end-state” [1].

  1. Consider the following initial state:
    • A bag containing sliced bread
    • A jar containing peanut butter
    • A jar containing jelly
    • A plastic knife Develop an algorithm for producing, as an end-state, a peanut butter and jelly sandwich. Be as precise as possible when developing your list of instructions.

2 Hand-In Instructions

The assignment is due at the start of class on August 20th. You are required to turn in a typed document. The document should include your name, your username, the date, the course number, and the assignment number. For example:

Andy Dalton (adalton) August 20th, 2008

CS 140 – Assignment

3 Notes on Collaboration

You are required to work individually on this assignment. Please do not consult anyone other than me on any aspect of this assignment.

References

[1] Wikipedia. Algorithm. http://en.wikipedia.org/wiki/Algorithm, 2008.