Instructor Notes

Laboratory Exercises

Supplemental Material for Baldwin and Scragg, Algorithms and Data Structures: The Science of Computing; Charles River Media, 2004 (Now published by Cengage Learning)

Site Index


Algorithms and Data Structures: The Science of Computing is a book for a laboratory course. Methods of inquiry, which is what the book is really about, cannot be learned from a distance; they must be practiced. Laboratory exercises are an important source of practice (other sources include the exercises in the text, which are generally shorter than a laboratory exercise, and longer projects). This Web site offers a number of laboratory exercises that we developed alongside the book.

Format of Laboratory Materials

Each laboratory exercise is described by two main documents: directions for students, and notes for instructors. The directions for students are intended to be given directly to students, as the main source of direction in how to carry out an exercise. Instructors may give these documents to students exactly as received from the Web, or may modify them to fit local conditions (which we encourage, to at least a modest extent; more on this subject below). The notes for instructors contain comments by a lab’s author that may help instructors understand why the lab is the way it is, may help avoid pitfalls in running the lab, etc. While these notes may suggest hints that instructors can offer to struggling students, we try to avoid revealing entire solutions in them.

The directions for students follow the same format in every lab: a brief statement of the exercise’s goals, a statement of prerequisite knowledge, a section of background material, the exercise proper, and a section for “final details”.

The prerequisites section generally lists the chapters of Algorithms and Data Structures: The Science of Computing that students should understand before doing a lab.

The background section generally contains explanatory material that will help students do the exercise. Often this material relates information from Algorithms and Data Structures: The Science of Computing to the specific exercise; sometimes background material includes short explanations of Java features that are not covered in the book.

The “final details” section contains information that is likely to vary from course to course. For example, instructions on how (if at all) to turn in completed work, names of servers students will be using, etc. We provide text for this section of each lab, but by the nature of the section we can’t provide exactly the right text for any specific course. Thus, we concentrate on text that shows instructors what information they should provide, while being minimally workable for students should an instructor choose not to provide their own information. For example, we refer students to Charles River Media’s Web server for all handouts, code samples, etc., even though many instructors will have mirrors for some of this material or local alternatives to it. We strongly encourage instructors to replace the information in “final details” sections with their own, locally appropriate, version — this can be done verbally at the beginning of a lab session, or by making and suitably modifying copies of our labs.

Laboratory Sessions

We developed these exercises for a closed lab format (i.e., students meet at a time and place dedicated to the course, with an instructor present), with lab sessions lasting about two hours. Our own students often need more than two hours to complete these exercises, finishing them after the closed lab period ends. The exercises should thus be usable as-is in lab sessions of more than two hours. To do these exercises in periods of less than two hours, parts of each exercise should be eliminated or explicitly designated to be done outside of the lab session. The exercises should also be usable as open lab exercises or for self-study.

Many instructors explicitly divide the work students do for a lab exercise into “pre-lab”, “in-lab”, and “post-lab” components. While we have not explicitly divided our lab exercises in this manner, it is certainly true that each lab will work best if students do some preparation before coming to the lab session, do the bulk of the exercise during the session, and then complete some follow-up work after the session. Preparation typically means mastering the material described in the lab’s “background” section, and designing relevant algorithms in pseudocode, defining hypotheses and procedures for experiments, etc. Follow-up can consist of preparing some sort of report on the exercise, particularly when the exercise involves an experiment. We encourage instructors to separate these aspects of our labs into formal pre-lab, in-lab, and post-lab assignments if they wish.

Treat laboratory sessions as opportunities to interact with students — walk around the room, encourage students to ask questions, look out for students who are having difficulty and offer advice before difficulty blossoms into frustration, and just say a few words of congratulations or encouragement to students who are doing well on the exercise. One of us tries to say something to every student during each lab session (a goal that may or may not be met, depending on how many students have questions — students who are actively asking questions during a lab need to have priority for the instructor’s attention over students without questions).

Student lab assistants can help teach labs in many ways. In many institutions, lab assistants (particularly graduate students) run entire lab sections, reducing the workloads on regular faculty and contributing to the assistants’ own education. In institutions with large numbers of lab classes, using laboratory assistants may be the only feasible way to staff labs. On the other hand, laboratories are excellent places for students and professors to establish personal rapport, and laboratories provide opportunities for professors to monitor how well students understand material. For these reasons, we strongly encourage faculty to supervise their own labs if at all possible. A good middle ground, which we have used often, is to have a student laboratory assistant in the lab with the professor. The assistant can help answer questions during peak times, can assist with demonstrations, etc., while the professor retains contact with students.

Modifying the Exercises

We encourage instructors to modify our lab exercises to suit their own tastes and course goals. As mentioned above, it is highly desirable for instructors to replace our “final details” with something tailored to the instructor’s local environment. We also encourage more extensive modifications — for example, building new exercises around our class libraries, using our documents as sources of ideas for new exercises, etc. We only require that such modifications be for non-profit educational purposes, and the original source be acknowledged.

Instructors who wish to make and modify copies of our lab materials should note the following:


Copyright © 2004 Charles River Media. All rights reserved.

Revised Aug. 9, 2005 by Doug Baldwin

Site Index