Tom Kelliher, CS 102
Apr. 24, 2006
Written quiz Friday. Refer to readings on class Web site. Will answer questions Wednesday.
No reading, no online quiz.
JavaScript lab.
Artificial Intelligence.
An algorithm is a set of simple steps for accomplishing something. For example, a computation.
Here is an example for determining if any number in a list is negative. Example list:
12 45 3 -9 16 5
put your left finger on the first number
put your right finger on the second number
move your right finger one place to the right
while your left finger is to the left of your right finger
if the number pointed to by your left finger is negative
say "Yes"
stop
move your left finger one place to the right
say "No"
stop
Note that this will work for a list of any size -- your algorithms should,
too.
Working in groups of two, the ``leader'' will teach the ``computer'' to solve the following problems, without saying what the problem is:
As a class, design a sorting algorithm.