A checklist of review questions to help you prepare for the mid-term.

  1. Review data representations for trees, graphs, etc.
  2. What is a partial function? A function? A one-to-one function?
  3. What are some useful higher-order functions and how are they used? Work through examples.
  4. What is programming by induction or recursion? Work through examples.
  5. What is mean by "state"?
  6. What is a binary relation? How are binary relations used in modeling transitions between states?
  7. What is a grammar? What is a language?
  8. How are issues of precedence and grouping dealt with in grammars?
  9. How are grammars used in constructing a parser?
  10. What are some ways to construct compound data objects (e.g. arrays, lists, etc.)?
  11. What is the "linear addressing principle"?
  12. How is an array like a function?
  13. How are arbitrary-size arrays of objects allocated dynamically in Java?
  14. What purposes do "types" serve? Can you give type expressions for simple data structures (using the x, *, -> notation).
  15. By an "open-list" abstraction, we mean the collection of functions cons, first, rest, isEmpty, and the empty list nil. In this abstraction, how would you do the following: 
    • create a list of 3 elements: a, b, c
    • create a list of 1 element: a
    • determine whether the list contains at least 3 elements
    • extract the third element from a list
    • square each element in a list
    • find out the index of an element in a list
    • create a new list from a list, dropping each element
    • satisfying a certain predicate
    • append one list to another
    • reverse a list
  16. How would you create a list containing elements that are the elements of a given N-element array?
  17. How would create an array containing elements that are the elements of a given list?
  18. What are the comparative advantages for using destructive vs. non-destructive list operations?
  19. How would you code a function that produced a list containing the N-ary representation of a number from the number itself? (assuming the usual arithmetic operations on numbers)
  20. How would code a function that inverted the above, going from a list containing an N-ary representation to the number? (assuming the usual arithmetic operations on numbers)
  21. What is an S-expression?
  22. Describe some ways in which S-expressions can be viewed as trees.
  23. Describe how an entire programming language can be represented as a set of S-expressions.
  24. Why are S-expressions useful as external representations of structured data?
  25. What is polymorphism? How do static and dynamic polymorphism differ?
  26. What are some ways of encoding finite sets.
  27. What is proposition logic?
  28. What is the minterm expansion?
  29. What is the Boole/Shannon expansion?
  30. What is a tautology? How can you determine whether an expression is or is not.
  31. What is a Karnaugh map and how does it relate to hypercubes.