More on 'roughly': - More rigorous definitions of the term lie in the mathematical quantities O, o, w, Omega, and theta that you might run across in a text on algortihm theory. However, for this course we are not so concerned with rigor in this area. Mathematical facts to have at hand, however, include: z = x^y ==> y = log_x(z) for z > 0 log_x(z) ~ # of times needed to multiply x to get a value >= z or # times to divide z by x to get a value >= 1 Lists: - A scheme list is a finite (and possibly empty) linearly ordered sequence of Scheme values, including lists. (See DEMOs for examples) Examples of lists include: (list 1 2 3) empty (list) (list (list 1 2) 3) (list (list)) - non-empty list containing an empty list - Implicit definition of lists: 1. empty is a list 2. if lst is a list and val is a value, then (cons val lst) is a list. 3. Nothing else is a list. 4. Two lists are equal if and only if they are constructed in the same way. The cons Constructor: - cons is a constructor, which is a function that builds things in memory. - (cons val lst) = list that has the members {val, {members of lst}} e.g. (cons 1 (cons 2 (cons 3 empty))) -> (list 1 2 3) (cons empty empty) -> (list empty) Binary Trees: - List can be represented as binary trees, with cons understood at the vertices e.g. (list a (list 1 2) 3 4) can be represented by /\ / \ a \ /\ / \ / \ / /\ / / \ / 3 \ /\ /\ / \ / \ 1 \ 4 \ /\ empty / \ 2 \ empty