A checklist of review questions to help you prepare for the mid-term.
Review data representations for trees, graphs, etc.
What is a partial function? A function? A one-to-one function?
What are some useful higher-order functions and how are they used? Work through examples.
What is programming by induction or recursion? Work through examples.
What is mean by "state"?
What is a binary relation? How are binary relations used in modeling transitions between states?
What is a grammar? What is a language?
How are issues of precedence and grouping dealt with in grammars?
How are grammars used in constructing a parser?
What are some ways to construct compound data objects (e.g. arrays, lists, etc.)?
What is the "linear addressing principle"?
How is an array like a function?
How are arbitrary-size arrays of objects allocated dynamically in Java?
What purposes do "types" serve? Can you give type expressions for simple data structures (using the x, *, -> notation).
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
How would you create a list containing elements that are the elements of a given N-element array?
How would create an array containing elements that are the elements of a given list?
What are the comparative advantages for using destructive vs. non-destructive list operations?
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)
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)
What is an S-expression?
Describe some ways in which S-expressions can be viewed as trees.
Describe how an entire programming language can be represented as a set of S-expressions.
Why are S-expressions useful as external representations of structured data?
What is polymorphism? How do static and dynamic polymorphism differ?
What are some ways of encoding finite sets.
What is proposition logic?
What is the minterm expansion?
What is the Boole/Shannon expansion?
What is a tautology? How can you determine whether an expression is or is not.
What is a Karnaugh map and how does it relate to hypercubes.