Computer Science 105 Assignment 2 - Algorithm Design and Analysis
Due: 5:00pm September 17, 2003
Objectives and Overview: In this lab, you will begin
to think about problem solving in an algorithmic way. The readings
and many of the problems for this assignment are in Chapter 2 of your
text.
Part 1 - Accessing Course Software (a brief review)
Recall from Assignment 1 that the following steps will connect
you to the CS105 lab materials:
1. Select the menu item Go -> Connect
to Server and type afp://collaboration.bowdoin.edu
2. Enter your personal Bowdoin login (e-mail) Name
and Password.
3. A new icon called Computer Science will appear
on the desktop.
4. Double-click the folder Computer Science -> csci105
Drag a copy of the folder csci105 ->
Invitation to your desktop, and then close the folder csci105.
Part 2 - Algorithm Animation
Now open the folder Invitation tha you copied to the
desktop. Double-click on the multi-colored icon Invitation (OSX)
that appears inside the folder Invitation. The following
box should appear:
The button Search Animator is used for this assignment.
When you select it, a window will appear that allows you to simulate
the step-by-step behavior of the sequential search algorithms in Figure
2.9 (page 46) and Figure 2.10 (page 53) of your text.
In this window, select Algorithm -> Search for Value, and
then select the Run button. Watch each step execute and the
Target value change. You may Reset and Rerun this exercise
several times to get a feeling for the relationship between it and the date
values.
Now select Algorithm -> Search for Largest, and then select
Run again. Note the behavior of this new algorithm for each of
several different sets of data values (using Reset and Run several
times).
This search animator will be a useful assistant while you are answering
the questions below.
Part 3 - Algorithmic Problem Solving
Complete exercises 3, 4, 5, 7, 12, 13, 15, 16, and 19
on pages 61-62 of your text. You may do this work either by hand
or with a word processor (e.g., MS Word). Also, you may choose to
do this part of the assignment either by yourself or in teams of two.
If you work with someone else, the team may hand in one copy of
the completed exercises with both names at the top.
Part 4 - Submitting Your Work
To submit this assignment electronically, you should first rename
it so that you are identified as the author (e.g., give it a name like
asst2atucker ). Then drag the file to the csci105
-> Drop Box folder.
Once you are finished in the lab, be sure to drag the csci105
icon to the Trash - this step disconnects you from the server
and prevents someone else (who may use this iMac later in the day) from
accidentally accessing files in your personal folder.
To submit a handwritten assignment, leave it in my
mailbox outside Searles 222.
Note: Even though the lab programs for this course can
be saved and submitted electronically, you should always keep a backup
copy of your own work, so that if a file is lost you won't have to retype
it from scratch.