
@comment(Hey, EMACS, this is -*- SCRIBE -*- input)
@device(dover)
@make(6001)

@modify(excounter, numbered [Exercise @1], referenced [@1])

@PageHeading(left "6.001 -- Spring Semester 1986-87",
             center "@Value(Page)",
             right "Problem set 3")

@begin(center)
MASSACHUSETTS INSTITUTE OF TECHNOLOGY
Department of Electrical Engineering and Computer Science
6.001 Structure and Interpretation of Computer Programs
Spring Semester, 1986-87

Problem Set 3
@end(center)
@blankspace(0.25 in)

@begin(flushleft)
Issued: Thursday, 19 February 1987

Due:
@begin(itemize)
Wednesday, 25 February 1987
for recitations meeting at 9:00, 10:00, and 11:00

Friday, 27 February 1987
for recitations meeting at 12:00, 1:00, and 2:00
@end(itemize)

Reading: From text, Chapter 2, section 2.1.
@end(flushleft)

@section(Homework exercises)

Write up and turn in the following exercise, as well as
the two below (taken from the text):
@begin(itemize)

Exercise:  Geometry. 
For certain applications it is efficient to represent a line segment
as a starting point and a  vector from the starting-point to the
ending-point than to represent it  as a pair of points. Define the
constructor @a[make-seg] and selectors @a[start-point] and 
@a[vect] that define such a  representation of segments. In
addition specify the constructor @a[make-point] and selectors 
@a[x-coord] and @a[y-coord]  that define the representation of the
starting point in terms of x-y coordinate pairs and the
constructor @a[make-vect] and selectors @a[mag] and @a[ang] 
that define vectors in terms of their length and orientation 
relative to the positive x-axis). Using your selectors and
constructors, define the following procedures:
@begin(programexample)

  (print-seg s)           ; print representation of segment s, legibly
  (equal-segs? s1 s2)     ; true iff s1 and s2 correspond to the
                          ;  same segment (ignoring order of end points)
  (bisector s)            ; returns the point which bisects s
  (on-seg? p s)           ; true iff p is on s (extended in length)
  (shift s p)             ; returns the segment whose starting-point
                          ;  is p and whose ending-point is the
                          ;  ending-point of s
  (rotate s)              ; returns the segment s rotated by 90 degrees 
                          ;  counterclockwise about its midpoint
 
@end(programexample)

Exercise 2.3:  Whiz-bang!

Exercise 2.4:  Godel numbers

@end(itemize)

