Background:
This is the first unit in junior year for a course in theoretical computer science. Prior to this, the students have already had AP CS A and a mish-mash of other topics. They have, by this point, studied:
- Python (as their introduction to programming)
- Java for AP CS A (loops, arrays, object design, recursion, polymorphism)
- 6502 Assembly (for stack operation, including recursion again)
- C (largely for pointers)
- Additional things in Java (e.g. trees, linked lists, tries, Hashmaps, generics) and some algorithms (such as BFS, DFS, Huffman Encoding, Conway's Game of Life, Prim's, etc)
This course, then, is a year of theoretical computer science. The first unit is background mathematics that they will need during the rest of the course, and it focuses on boolean algebra and sets. The requested Unit Review here is for my boolean algebra opening.
The general goals are to help the students gain serious familiarity with algebraic manipulations and with the symbols themselves. After these lessons, we will move onto Conjunctive and Disjunctive Normal Forms, fairly substantial algebraic manipulations involving 5-10 steps, and then into logic gates for a gentle introduction to computer circuitry, so it is important that they come out prepared for that.
Word of warning: The unit below has some serious weaknesses, as you will see. Please be gentle! This year will be my second time giving these lessons, and while I have made a series of improvements from what I did this last September, there is still a long way to go. There is a lot of lecture, and I would really like to make it more engaging when I do it again27.
The Curriculum
Lesson one:
We begin our foray into boolean algebra by converting our Java boolean symbols to formal math symbology: &&
to $\land$, ||
to $\lor$, and !
to $\lnot$. We then discuss how !=
is essentially $\oplus$, and begin our discussion of $\Longleftrightarrow$ as being a near approximation of ==
(with a promise that we will come back to this again, because we are not done with it yet).
We then introduce tautologies (such as $B \lor \lnot B$), and go over their truth tables. I finally provide them with an extremely short homework worksheet where they have to circle the boolean statements that are tautologies. (It also provides practice with all of the symbols we have discussed)
Lesson two:
We review lesson 1, and then introduce the concept of contradictions as the opposite of tautologies, go over their truth tables, and look at the obvious contradiction $B \land \lnot B$.
I ask them to create two tautologies with a partner, the more creative the better, walk around, and ask for a number of students to write interesting ones on the board.
We move on to $A \Rightarrow B$, discuss its meaning and truth table, and then ask what in Java is similar? I first propose:
if (A)
B = true;
We talk about this for awhile, and talk about why, though it may seem like a reasonable choice at first, it is not really the same idea. We then spend some time on the hardest idea of implies: what we mean when we say that $False \Rightarrow True$ is $True$.
At this point, I take a break to introduce the way I approach proofs in this class. Over the course of the year, certain very important proofs must be reproduced by a student chosen at random during the following period. This forces the students not to ignore these proofs, and helps them to internalize both the mathematical symbols that I need them to gain fluency with, and some very clever proof techniques.
I spend a substantial chunk of time then doing a formal proof that $False \Rightarrow True \equiv True$. I finish the class with a second, informal, and intuitive proof of the same (which they will not need to reproduce.)
Lesson 3:
We review from the prior day, and a student is called up to reproduce the proof.
We then spend about 15 minutes going over necessary and sufficient in depth, and re-examine both $\Longleftrightarrow$ and $\Rightarrow$ through this new lense. During this process, I introduce $\Longleftrightarrow$ more properly as $(A \Rightarrow B) \land (A \Leftarrow B)$ and as iff, and we talk about the similarities that $\Longleftrightarrow$ shares with $\equiv$.
I go over DeMorgan's Laws, and briefly cover 5 more symbols: ∀, ∃, |, ∈, and ∴.
At this point, I give them English statements to translate to mathematical statements, and mathematical statements to translate to English statements, one at a time. We use the following format: I provide an exercise, they work on it with a buddy or on their own while I bounce around the room offering help, and then I go over how we do it. The final exercise is to translate Goldbach's Conjecture (which I do not identify to them until after the translation work is done) from boolean symbology into English:
$\forall n|n \gt 2 \wedge (\frac{n}{2}) \in \mathbb{N}$,
$\exists (m,ℓ)\,\,|\,\, m \in P \wedge ℓ \in P \wedge m+ℓ=n$
As they leave, I give them a homework assignment with practice problems in very simple 1- or 2-step boolean algebraic reductions (including applying DeMorgan's Law), translating statements from English back and forth into symbols, creating truth tables from algebraic statements, and creating algebraic statements from truth tables.
The Request
This is my opener for the year, and it is so. very. dry. There is also very little activity! I am already aware that I've got a real snoozer here.
This material must to come first in the year for large-scale organizational reasons, but I would really like ideas to make it more engaging. I am also particularly seeking out ideas for active learning and ways to utilize pair partners to improve both engagement and mastery.