Computer Science 206 is a general introduction to theoretical computer science, focussing mainly on the abstract properties of various data types, their representation and implementation on contemporary computers, and the algorithms most frequently used to operate on them. Computer Science 151 is the normal prerequisite.
Office: Science 2418
Telephone: extension 3181
Office hours: Tuesdays, 2:15 to 4:15 p.m.; Wednesdays, 1:15 to 3:15 p.m.;
Thursdays, 9 to 11 a.m.; Fridays, 9 to 11 a.m.; or by appointment.
Cooper, Doug. Standard Pascal: User reference manual. New York: W. W. Norton & Company, 1983.
Walker, Henry M. Computer science 2: principles of software engineering, data types, and algorithms. Glenview, Illinois: Scott, Foresman and Company, 1989.
Here is what each student in the course is expected to do:
Solutions to exercises may be submitted either in hard copy or by electronic mail (to stone@math.grin.edu). Class-preparation questions should be submitted by electronic mail no less than two hours before the beginning of the class session (that is, by 9 a.m. on the day the class meets).
Each exercise carries a deadline, which I expect most students to meet without difficulty. I am usually willing to accept late submissions until I begin returning corrected papers to other students; however, my policy is to judge late papers more strictly than those that come in before the deadline, on the theory that the extra time should be put to good use. I do not award credit for papers submitted after I have begun to return other students' papers.
Since you will receive credit on the basis of your individual performance in this course, it would be unethical to submit any work that is not your own or to collaborate on solutions to exercises. It is improper to borrow the results of other people's intellectual effort. If I encounter any indications of plagiarism, the Committee on Academic Standing will deal with them.
Note that the final examination will be given on the Friday, December 20, the last day of examination week. Please arrange your travel schedule accordingly.
The class is scheduled to meet at 11 a.m. on Mondays, Wednesdays, and Fridays, from August 30 through October 18, from October 28 through November 27, and from December 2 through 13.
Reading: Cooper, chapters 1 through 5 (pages 1-57) and 10 (pages 95-100).
August 30. Review of standard Pascal: program structure, statement types,
simple data types.
Exercise #1 assigned.
Reading: Cooper, chapters 11 and 12 (pages 101-142).
September 2. Review of standard Pascal: data structures, pointers, pointer
structures.
Reading: Cooper, chapters 6 through 9 (pages 58-94).
September 4. Review of standard Pascal: procedural abstraction,
modularity and parameterization, recursion.
Reading: Handout on machine-level data
types.
September 6. Data representation; bits, bytes, words, registers, and
addresses.
Exercise #1 due.
Exercise #2 assigned.
Reading: Handout on Booleans.
September 9. Booleans.
Reading: Handout on characters.
September 11. Characters; ASCII and Unicode.
Reading: Handout on numeration.
September 13. Bases of numeration; expressing natural numbers as numerals;
evaluating numerals; assertions in HP Pascal.
Solution to exercise #1 released.
Exercise #2 due.
Reading: Walker, appendix B.2, pages 599-613; handout on integers.
September 16. Integers; signed-magnitude and twos-complement
representations.
Reading: Handout on reals.
September 18. Reals; IEEE single- and double-precision
representations.
Exercise #3 assigned.
Reading: Handout on IEEE representations of
reals.
September 20. Vagaries of floating-point representations: rounding errors,
loss of significance, ill-conditioning.
Reading: Walker, appendix B.3, pages 613-620.
September 23. Arrays.
Reading: Walker, section 10.1, pages 387-398.
September 25. Linear and binary search algorithms.
Exercise #3 due.
Reading: Walker, section 10.4, pages 417-424.
September 27. Quicksort.
Reading: Walker, appendix B.5, pages 622-623; ``Allocation and alignment,''
in HP Pascal/HP-UX programmer's guide, pages 5-1 through 5-17 and
5-22 through 5-27.
September 30. Records; alignment; packing.
Solution to exercise #2 released.
Reading: Walker, section 2.4, pages 68-75.
October 2. Unions.
Exercise #4 assigned.
Reading: Walker, section 2.5, pages 74-88, and sections 11.1 through 11.3,
pages 435-451; ``Input/Output,'' chapter 3 of HP Pascal/HP-UX
programmer's guide, pages 3-1 through 3-30.
October 4. Files; buffers; HP Pascal extensions to the standard Pascal
repertoire.
Reading: ``Compilation unit structure,'' in HP Pascal/HP-UX programmer's
guide, pages 2-4 through 2-9.
October 7. Data abstraction; separate compilation in HP Pascal; returning
structures from functions.
Reading: Handout on complex numbers.
October 9. Complex numbers.
Exercise #4 due.
Solution to exercise #3 released.
Reading: Walker, chapter 6, pages 257-281.
October 11. Stacks.
October 14. (pause for breath)
October 16. Mid-semester examination.
Reading: Handout on sequences; handout on lists; Walker, sections 5.1 and 5.2, pages
204-224.
October 18. Sequences and lists.
Reading: Walker, section 10.4, pages 412-416.
October 28. Mergesort.
Exercise #5 assigned.
Solution to exercise #4 released.
Reading: Walker, chapter 7, pages 282-300.
October 30. Queues.
Reading: Handout on radix sorting.
November 1. Radix sorting.
Reading: Handout on lists with
cursors.
November 4. Lists with cursors.
Exercise #5 due.
Reading: Handout on strings.
November 6. Strings.
Reading: Walker, section 5.6, pages 241-248; handout on bidirectional lists.
November 8. Bidirectional lists.
Exercise #6 assigned.
Reading: Handout on bignums.
November 11. Natural numbers; bignums.
November 13. Arithmetic operations on bignums.
Reading: Handout on ratios.
November 15. Ratios.
Exercise #6 due.
Reading: Walker, sections 8.3 and 8.4, pages 313-333.
November 18. Binary trees.
Reading: Handout on searching and
sorting with binary trees.
November 20. Searching and sorting with binary trees.
Reading: Walker, section 8.6, pages 342-346.
November 22. Trees; traversal algorithms.
Reading: Handout on priority queues.
November 25. Priority queues.
Reading: Walker, section 10.4, pages 408-412.
November 27. Heapsort.
Solution to exercise #5 released.
Reading: Walker, section 5.4, pages 228-235; handout on
sets.
December 2. Sets.
Exercise #7 assigned.
Reading: Walker, chapter 9, pages 355-383.
December 4. Graphs.
Reading: Handout on graphs.
December 6. Implementing graphs; traversal algorithms.
Reading: Walker, section 10.2, pages 398-401; handout on hash tables.
December 9. Hash tables and searching.
Exercise #7 due.
December 11. Hashing methods.
Solution to exercise #6 released.
December 13. Review.
Solution to exercise #7 released.
December 20, 9 a.m. Final examination.
CS 206,
``Data structures'' (Bryn Mawr College)
COM 212, ``Data
structures and software design'' (Connecticut College)
CSC 136, ``Advanced
programming techniques'' (Union College)
COP 3530, ``Data
structures and algorithms'' (University of Florida)
CS 231,
``Data structures and algorithms'' (Colby College)
CS 41, ``Introduction to
computer science II'' (Pomona College)
CS 204, ``Introduction to computer science II'' (Bucknell University)
CS
127, ``Data structures'' (Carleton College)
CPSC 215, ``Data
structures and algorithms (C++)'' (Trinity College)
COMP125,
``Fundamentals of computer science'' (Macquarie University)
Adams, Glenn. ``Unicode
home page'' (1994, 1995).
http://www.stonehand.com/unicode.html.
``Extended
Pascal ISO 10206:1990'' (1991).
ftp://ftp.digital.com/pub/DEC/Pascal/iso10206.ps.gz.
Knuth, Donald E. ``Don
Knuth's home page'' (September 17, 1996).
http://www-cs-staff.Stanford.EDU/~knuth/.
Unicode, Inc. ``Unicode
2 composite name list'' (May 21, 1996).
ftp://unicode.org/pub/UNIX/UNIDATA/UNIDATA2.TXT.

This document is available on the World Wide Web as
http://www.math.grin.edu/~stone/courses/fundamentals/