Exam Details
- In class on Monday, May 5th
- Covers material through Wednesday, April 30th (through BoP Chapter
12; up to and including functions).
- You can bring one double-sided 8.5x11” sheet of hand-written
notes.
- Resources:
- (you are here) I have made a study
guide of sorts, which lists of the Goals for each lecture; my goal
is for the exam to be a fair assessment of the extent to which you’ve
achieved these outcomes.
- I have provided some Racket practice
problems. You can expect the Racket questions on the exam to
resemble these.
- These are also linked from the course webpage Schedule table, on the
day of the Midterm Exam.
For practice problems, see the Racket
practice problems, and the in-class exercises (linked as
ws
from each day’s lecture on the Schedule table). See also
the exercises for BoP Chapters 1-2 and 4-10; odd numbered exercise
solutions are in the back of the book.
Course Outcomes:
The course outcomes relevant to this exam are the following, with
some parts crossed out that we haven’t covered yet:
- Thorough understanding of the mathematical definitions of concepts
important to computer science, including sets, tuples, lists,
strings, formal languages, functions and relations.
- The ability to prove basic theorems involving these mathematical
concepts including proofs by contradiction and inductive proof
- The ability to employ effectively the functional programming style
in a functional programming language
Per-Lecture Goals
Racket 1
Know how to interpret and write expressions in prefix operator
notation
Know how to interact with the Racket interpeter in
DrRacket
Know how to represent and work with basic data types (booleans,
numbers, strings) in racket.
Know how to define and use functions in Racket using
lambda
Know how lexical scope works in Racket, and how to introduce
local variables using let
and let*
.
Racket 2
- Know how to express conditionals using
if
and
cond
- Know how to create and work with dotted pairs using
cons
, car
, cdr
, and
cadr
and friends
- Know how create and interact with lists, including the
list
function
- Be able to implement simple recursive list processing functions in
Racket
- Know how to create recursive helper methods to carry information
through the recursion
Sets 1
Describe what a set is and how a set’s contents and members are
denoted (\(\{\ldots\}\),\(\in\) )
Know the notation for natural numbers (\(\mathbb{N}\)), integers (\(\mathbb{Z}\)), rational numbers (\(\mathbb{Q}\)), real numbers, and the empty
set (\({\varnothing}\) or \(\emptyset\), or occasionally \(\{\}\)).
Define sets using set-builder notation.
Calculate the cardinality of a set.
Sets 2
- Know the definition of subset, power set.
- Compute a Cartesian Product of two or more sets.
- Understand the notation and meaning for: union, intersection,
difference, and complement
- Be able to draw and interpret Venn diagrams
Logic 1
- determine whether an English sentence or a mathematical expression
is a logical statement.
- articulate the meanings of and know the truth table for logical AND,
OR, NOT, operators
- articulate the meaning of and know the truth table for the
conditional operator
Logic 2
- settle the debate over “only if” once and for all!
- articulate the meaning of and know the truth table for the
biconditional operator
- use truth tables to calculate truth values of logical
statements
- be able to interpret and use universal \((\forall)\) and existential \((\exists)\) quantifiers
- Be able to translate English sentences involving quantifiers,
logical operators, and statements into logical symbols and back.
Logic 3
- know (or know of the existence of so you can later look up) some
useful equivalences, including the contrapositive, de Morgan’s laws, and
negation of quantifiers and conditionals
- Be able to negate statements expressed symbolically.
Proofs - Direct Proof
- Know how to read a mathematical definition, and know a few common
and useful ones:
- even, odd,
divides, parity
- Be able to use direct proof to prove statements involving
definitions including even, odd,
divides, parity.
Contrapositive Proof
- Know how to use contrapositive proof to show \(P \Rightarrow Q\) by showing that \(\neg Q \Rightarrow \neg P\).
- Practice writing proofs.
Modular Equivalence
- Know and be able to apply the definition of congruence
modulo \(\mathbf{n}\)
Proof By Contradiction
- Know how to prove statements, including conditional statements, by
contradiction.
Proving Non-Conditional
Statements
- Know how to prove if-and-only-if statements and equivalence
statements
- Know how to prove existentially quantified statements
- Know how to disprove statements in general
- Know how to disprove universally quantified statements and
conditional statements by counterexample
Proofs involving Sets
- Know how to prove \(a \in \{x:
P(x)\}\) and \(a \in \{x \in S:
P(x)\}\)
- Know how to prove \(A \subseteq
B\).
- Know how to prove \(A = B\) for two
sets \(A, B\).
Proof by Induction 1
- Know the intuition and logical reasining underlying proof by
induction.
- Know the meaning of base case, inductive
hypothesis, and inductive step (or
inductive case) in the context of proof by
induction.
- Be able to apply proof by induction
Proof By Induction 2
- Know the definition of the Fibonacci sequence
- Be able to apply proof by strong induction
- Get more practice doing inductive proofs
Relations
- Know the definition of a relation on a set.
- Be able to apply the definitions of the following properties of
relations:
- Reflexive
- Symmetric
- Transitive