csc1350 1

csc1350 1 - Notation of an Algorithm Algorithm- a finite...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Notation of an Algorithm Algorithm- a finite set of rules or instructions designed to solve a particular class of problems. Every algorithm must have the following features or characteristics: 1. Zero or more inputs 2. One or more outputs 3. Finiteness i. All algorithms must halt in finite time (ie. Not be infinite) 1. Definiteness i. Each step of the algorithm must be clear and unambiguous 1. effectiveness i. Each step in the algorithm must be sufficiently basic so that it, as a principle, can be correctly executed by the entity performing the algorithm Can think of an algorithm as "a cookbook recipe Writing an algorithm -you have a key ring with a bunch of keys -there's a fortress with a locked door and you want to get in -zero or more keys will work The quest: find the key, if there is one, that will open the locks Write it out: 1. Choose a key at random from the key ring (this is then the "current key") 2. Try the current key in the lock 3. IF the lock opens, halt. (This is a condition)
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/07/2008 for the course CSC 1350 taught by Professor Blanks during the Spring '08 term at LSU.

Page1 / 2

csc1350 1 - Notation of an Algorithm Algorithm- a finite...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online