Computer Science 105 Assignment 3 - Algorithm Efficiency
Due: 5:00pm September 24, 2003

Objectives and Overview: Given an algorithm that solves a problem, how do we measure its efficiency?  How do we know that one algorithm is more efficient than another?  This lab helps us to understand the measurement of algorithm efficiency and its importance.  The readings and problems for this assignment are in Chapter 3 of your text.

Part 1 - Access the Course Software

Following the same steps that you used for Assignment 2, double-click the icon Invitation (OSX) that appears in the folder Invitation on your desktop to activate this familiar application:

The buttons Data Cleanup Animator and Sort Animator will be useful for this assignment.  When you select either of these, you will be able to animate the behavior of several different algorithms in Chapter 3.

For example, select Algorithm -> Shuffle Left in the Data Cleanup Animator and then select the Run button.  You may Reset and Rerun this exercise several times to get a feeling for how the shuffle left algorithm works.  Its behavior should be familiar from our discussions in class.

Now select Algorithm -> Converging Pointers, 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).

These animators will be useful for answering some of the questions below.

Part 3 - Algorithmic Problem Solving

Complete exercises 1, 3, 4, 6, 8, 9, 10, and 11 on pages 109-110 of your text.  You may do this work either by hand or with a word processor. 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 a file electronically, remember to rename it so that you are identified as the author (e.g., give it a name like asst3atucker ).  Then drag the file  to the csci105 -> Drop Box folder.

Once you are finished in the lab, be sure to drag the Computer Science 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 the CS 105 mailbox near my office (Searles 220).

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 in your Users folder, so that if a file is lost you won't have to retype it from scratch.