Schedule
Note: Grades for this course have been tallied and submitted. This page no longer gets updates, so links may break (be warned, people of the future).
Thanks to my students for an awesome semester. I do wish you happy mathing in the future, and hope you now agree there is some fun in that.
Last updated
.Purpose of this Page
Here is a complete list of topics for Logic: The Mathematics of Puzzles and Games (math100-e23) organized by lecture. As the semester progresses I add additional content, study suggestions, and descriptions. If you are in the course, you should bookmark this page and check back often.
For more information about the course, see our class homepage.
For a detailed schedule from the college, see the academic calendar.
Lecture 01
Syllabus
We discussed some aspects of the syllabus and answered some questions regarding the course.
- Course Content
- Course Objectives
- Assignments and Standards
Mathematical Puzzles
- A logic riddle
- Sudoku rules and hints at basic techniques
Homework
HW 00
Respond to my welcome email.
Lecture 02
This lecture previewed the types of game we plan to consider in this course, and how we might approach analyzing them.
Nim
Explained the game \( \operatorname{Nim}(n; \{1,2,3\}) \).
- Setup
- Two players make a pile of \( n \) stones and decide who will go first.
- Gameplay
- Players alternate picking up \( 1 \), \( 2 \), or \( 3 \) stones from the pile.
- Win Condition
- The player to pick up the last stone loses.
Lecture 03
This lecture was an introduction to some concepts from elementary logic.
Logical Arguments
Discussed what makes a "logical argument".
- Statement
- A sentence which is either true or false, and not both.
- Argument
- Sequence of premises followed by a conclusion.
- Premise
- Statement that is assumed for the sake of the argument.
- Conclusion
- Statement claimed to follow from the premises.
- Valid
- An argument form is valid when it's conclusion always follows from the premises, regardless of the information content of the statements.
- Sound
- An argument is sound when it's premises are true.
We noticed that the definition of statement precludes things that are "up for debate" as statements. This is because we want the simplest model for good reasoning possible. It will also allow us to analyze statements in a purely symbolic way, i.e., without worrying about the meaning!
Anatomy of Statements
Discussed what makes a statement, and how to build up new statements from old ones. We agreed to use statement variables, i.e., letters to stand in for statements.
- Negation
- "not A", "it is not the case that A", "\( \lnot A \)"
- Conjunction
- "both A and B", "A but B", "\( A \wedge B \)"
- Disjunction
- "either A or B", "\( A \vee B \)"
- Implication
- "if A, then B", "A implies B", "\( A \rightarrow B \)"
- Justification
- "A therefore B", "A so B", "B because A"
We agreed that "Justification" is a bit different from the others somehow, so we can't analyze justification in the same way as the others. In fact, how to understand this one is a question outside of logic, so we won't discuss it further.
Lecture 04
Translation
- Ambiguity in natural language.
- Using a dictionary to translate from English to symbolic logic.
- Using a dictionary to (reverse) translate from symbolic logic to English.
Homework
Reflection 1 Due
Write a one-to-two page reflection on the following question.
What did you think mathematics was before this class started? Do you like mathematics? Why or why not?
NB: Honest answers are appreciated! If you don't like maths, that's OK: I aim to change your mind :)
Translation between English and Symbolic Logic
Use the given dictionary to translate the given statements (deadline).
Dictionary
- A
- \( X \) is associative.
- C
- \( X \) is commutative.
- F
- \( X \) is a field.
- G
- \( X \) is a group.
English to Symbolic Logic
Translate the following English statements into symbolic logic using the dictionary above.
- If \( X \) is a group, then \( X \) is associative.
- \( X \) is a group, but it is not commutative.
- \( X \) is associative or commutative, but not both.
- \( X \) is associative and commutative provided \( X \) is a field.
- \( X \) is a group does not imply that \( X \) is a field.
Symbolic Logic to English
Translate the following symbolic logic statements into English sentences using the dictionary above.
- \( F \vee G \)
- \( C \wedge (\lnot A) \)
- \( \lnot (A \rightarrow G) \)
- \( (\lnot C) \rightarrow (\lnot F) \)
- \( F \rightarrow ((C \wedge A) \wedge G) \)
- \( (F \vee G) \rightarrow A \)
Well-formedness
Is the formula \( A \vee B \rightarrow C \) well-formed? I.e., are there multiple interpretations for this formula? Explain why or why not.
Lecture 05
Truth Tables
Constructed (with reasons!) the truth tables for the usual logical connectives. These are summarized in the single table below.
\begin{array}{c|c|c|c|c|c} P & Q & \lnot P & P \wedge Q & P \vee Q & P \rightarrow Q \\ \hline T & T & F & T & T & T \\ T & F & F & F & T & F \\ F & T & T & F & T & T \\ F & F & T & F & F & T \end{array}In addition, we did several examples constructing truth tables for symbolic statements.
Lecture 06
I had to cancel this lecture. Students were instructed to use this time to study and catch up on homework
Lecture 07
I had to cancel this lecture. Students were instructed to use this time to study and catch up on homework
Lecture 08
Truth Tables
More on truth tables, including analysis of statements with three or more atomic statements.
Logical Equivalence
Statements are logically equivalent when they have the same main column in their truth table. We think of this as saying that the two statements have the same "truth content", or that they "mean roughly the same thing".
The next lectures will be spent hunting for common and useful logical equivalences.
Homework
Translation Homework Due
The homework on translations is due!
Truth Tables
Complete the following exercises (deadline).
Basic Truth Tables
Construct truth tables for each of the following statements.
- \( (\lnot P) \rightarrow Q \)
- \( (P \wedge (P \rightarrow Q)) \rightarrow Q \)
- \( (P \vee Q) \wedge (\lnot (P \wedge Q)) \)
- \( (P \rightarrow Q) \vee (Q \rightarrow P) \)
- \( (\lnot (P \vee (\lnot Q))) \rightarrow P \)
Logical Equivalence
Use a truth table to decide whether or not the pairs of statements are logically equivalent.
- \( \lnot (P \wedge Q) \) and \( (\lnot P) \vee (\lnot Q) \)
- \( (P \rightarrow Q) \rightarrow R \) and \( P \rightarrow (Q \rightarrow R) \)
- \( P \rightarrow Q \) and \( (\lnot Q) \rightarrow (\lnot P) \)
Lecture 09
Table of Logical Equivalences
Below, \( A \), \( B \), and \( C \) denote arbitrary statements, and \( T \) and \( F \) denote the truth values.
Name | Formula |
---|---|
Associativity | \( A \wedge (B \wedge C) \equiv (A \wedge B) \wedge C \) |
\( A \vee (B \vee C) \equiv (A \vee B) \vee C \) | |
Commutativity | \( A \wedge B \equiv B \wedge A\) |
\( A \vee B \equiv B \vee A \) | |
Idempotence | \( A \vee A \equiv A \) |
\( A \wedge A \equiv A \) | |
Absorption | \( A \vee T \equiv T \) |
\( A \vee F \equiv A \) | |
\( A \wedge T \equiv A \) | |
\( A \wedge F \equiv F \) | |
Negated Value | \( \lnot T \equiv F \) |
\( \lnot F \equiv T \) | |
Distributivity | \( A \wedge (B \vee C) \equiv (A \wedge B) \vee (A \wedge C) \) |
\( A \vee (B \wedge C) \equiv (A \vee B) \wedge (A \vee C) \) | |
Double Negation | \( \lnot (\lnot A) \equiv A \) |
DeMorgan's Laws | \( \lnot (A \wedge B) \equiv (\lnot A) \vee (\lnot B) \) |
\( \lnot (A \vee B) \equiv (\lnot A) \wedge (\lnot B) \) | |
Material Implication | \( A \rightarrow B \equiv (\lnot A) \vee B \) |
Contraposition | \( A \rightarrow B \equiv (\lnot B) \rightarrow (\lnot A) \) |
Exclusive Middle | \( A \vee (\lnot A) \equiv T \) |
- Note
- We did not have a chance during this lecture to cover all of these. We'll finish the table in the next lecture.
Lecture 10
Algebra of Logical Equivalence
Using the table of basic equivalences to find new equivalences.
Homework
Reflection 2 Due
Write a one-to-two page reflection on the following prompt.
- We've been studying symbolic logic the last few weeks. I've claimed many times in lecture that the symbolism is built to match the way we naturally reason. How well does this theory match your notions of logic from everyday life? Do you see any drawbacks/shortcomings of this model of logic? Explain!
Study Guide (Part 1)
Create a table of common logical equivalences from your notes. This should include all the equivalences and their names. It will help you study for the upcoming exam and will make following lectures much easier.
Lecture 11
Algebra of Logical Equivalence
More practice using the table to compute logical equivalences.
Homework
Study Guide (Part 2)
Make a study guide for the first half of the semester. Include all the topics we've covered so far, together with example problems. Also include all definitions and important terms.
Lecture 12
Algebra of Logical Equivalence
More practice using the table to compute logical equivalences.
Homework
Study Guide (Part 3)
Continue making your study guide. Refine it to include solutions to your example problems.
Algebra of Equivalence
Use the algebra of statements to show that \( (P \rightarrow R) \wedge (Q \rightarrow R) \equiv (P \vee Q) \rightarrow R \).
Lecture 13
This lecture we went over the algebra of statements again. We solved the previous homework assignment in lecture interactively.
Homework
Practice with Statements
Verify the following logical equivalences. Do this using a truth table first, and then using the algebra of statements.
- \( (P \wedge Q) \rightarrow R \equiv (P \rightarrow R) \vee (Q \rightarrow R) \)
- \( \lnot (P \wedge (\lnot Q)) \equiv P \rightarrow Q \)
- \( P \rightarrow (Q \vee R) \equiv (P \rightarrow Q) \vee (P \rightarrow R) \)
- \( P \rightarrow (Q \rightarrow R) \equiv (P \wedge Q) \rightarrow R \)
- \( ((P \vee Q) \wedge (\lnot P)) \rightarrow Q \equiv \mathbf{T} \)
Lecture 14
Note: the midterm exam was originally scheduled for today, but I have moved it to the next lecture.
Midterm Review
This entire lecture is a review session for the coming midterm exam. Students should bring questions!
Lecture 15
Midterm Exam
Lecture 16
Probability
Discussed some notions from elementary (combinatorial) probability.
- Events or outcomes
- Computing basic probabilities via counting outcomes
- Ambiguity and the importance of clear statement
- How students in the class understand probability
- Probability in our day-to-day life
- The distinction between statistics and probabilities
Lecture 17
Product Principle
Suppose every (desired) outcome can be constructed by a sequence of \( k \) choices with…
- \( n_1 \) options for the \( 1^{\textrm{st}} \) choice,
- \( n_2 \) options for the \( 2^{\textrm{nd}} \) choice,
- \( \vdots \)
- \( n_k \) options for the \( k^{\textrm{th}} \) choice.
Then the total number of outcomes is \( n_1 \cdot n_2 \cdot \dots \cdot n_k \), PROVIDED
- Independent
- Numbers of options do not depend on actual choices made.
- Unique
- Each sequence of choices results in a different outcome.
We did many examples in class.
Lecture 18
Addition Principle
Suppose every (desired) outcome can be classified into \( k \) cases with…
- \( n_1 \) outcomes in the \( 1^{\textrm{st}} \) case,
- \( n_2 \) outcomes in the \( 2^{\textrm{nd}} \) case,
- \( \vdots \)
- \( n_k \) outcomes in the \( k^{\textrm{th}} \) case.
Then the total number of outcomes is \( n_1 + n_2 + \dots + n_k \), PROVIDED
- Disjoint
- No outcome belongs to two cases at the same time.
We did many examples in class.
Tree Method
We did several counting examples building a diagram of possible choices and then labelling the diagram with the number of options in each case. This effectively combines the product principle and the addition principle. For the sake of giving it a name, we'll call this the "tree method".
Our diagram has a "root" (i.e., the default state where no choices are made), and "branches" (i.e., the possible choices at each stage of the decision-making process). Then, we label the branches with the numbers of options on that branch. Finally, we use the product principle to obtain the full count on each "leaf" (i.e., each final state) of the tree by multiplying along branches followed from the root.
Lecture 19
Ordered vs. Unordered
Discussed the distinction between ordered and unordered counting.
- \( C(k, n) \) is the number of ways to select \( k \) distinct objects from \( n \) distinct objects.
- Solved marble-selection problems (both ordered and unordered).
- Solved some counting problems dealing (tee-hee) with poker.
- Counted anagrams of words.
- A word is any sequence of characters. An anagram of a word is any rearrangement of the same characters.
Homework
Reading (Poker Hands)
Read my notes about poker decks and hands. I will assume you understand this during the next lecture.
Writing (Reflection 3)
Write a short (one-to-two pages) reflection on the following topic.
- How is your life affected by probability? Have there been times where you misunderstood probability in a way that caused a problem? If yes, tell me about it. If no, what is your secret?
Arithmetic (Counting)
Give complete counts for each of the following. You must explain your count with a procedure like I do in class.
- Anagrams of the word "PROBABLYBUTMAYBENOT"
- Ways to arrange \( 7 \) marbles of different colours in a row.
- Ways to arrange \( 4 \) marbles of different colours in a row from a bag of \( 7 \).
- Ways to draw four marbles (with replacement) from a bag of \( 3 \) teal marbles, \( 3 \) aqua marbles, \( 2 \) rose marbles, and \( 1 \) maroon marble if we insist that the first and the last marble drawn have different colours.
- A palindrome is a word that reads the same forewards and backwards. How many palindromes of length \( 7 \) are there using the letters of the English alphabet?
Lecture 20
Counting Poker Hands
Count poker hands and compute their probabilities if cards are dealt at random.
Lecture 21
Counting Poker Hands
More counting poker hands and compute their probabilities if cards are dealt at random.
Homework
Due
Turn in the homework assigned in Lecture 19. This includes Reflection 3 and the solutions to the assigned counting problems.
Reflection 4
Write a short (one-to-two pages) reflection on the following.
- What is your favourite game? Tell me the rules and why you like it. Is there any logical or mathematical reasoning in the game? Is there a reliable way to win the game? Tell me about that too!
Lecture 22
This is our first lecture on sudoku. I plan to cover some basic solving techniques over the next few lectures, and hopefully we can soon discuss some exciting variant sudokus.
Sudoku
We covered the following.
- Anatomy of the sudoku grid (rows, columns, boxes).
- Rules of the puzzle.
- Some basic solving techniques.
- Hidden and naked singles.
- Hidden and naked pairs/triples/quads/etc.
Solved an example puzzle to illustrate the techniques. In fact, we discovered the techniques together as we needed them!
. . . | . . . | . . . . 5 . | 7 8 . | 9 . . 6 . 4 | 1 . . | . . . -------+-------+------- 4 . . | . 6 . | . . . . . 8 | 5 . 7 | . . 1 1 . . | 4 . . | . . 3 -------+-------+------- . . . | 6 . . | . . . 5 4 7 | . . . | . . . . 1 . | 9 3 . | 4 . 8
I gave students another puzzle for practice.
Lecture 23
Sudoku
We went over another simple puzzle. We also discussed the X-wing technique.
Lecture 24
Sudoku
Worked through a harder puzzle, including a few applications of the X-wing. Discussed the Swordfish technique.
Lecture 25
Sudoku
We worked through a colouring of the recent puzzle Chromatic Windmill by Eric Rathbun. The remainder of the puzzle (not done in class) is a relatively straightforward exercise in analysing possible cases. You can see another person's approach to solving the puzzle in this YouTube video.
Lecture 26
Tic-Tac-Toe
- No winning strategy! The optimal strategy can only guarantee a tie for first player!
- Counted (naively) approximations for the total number of Tic-Tac-Toe games.
- See this relevent xkcd comic for a complete map of the optimal moves and responses laid out in a tree-ish way.
Fractal Tic-Tac-Toe
You can get a grid for Fractal Tic-Tac-Toe from this website. The rules are described below (or you can get a printable copy, including examples).
- Setup
- Draw a large \( 3 \times 3 \) grid, and draw a smaller \( 3 \times 3 \) grid in each of it's squares.
- Goal
- Make a line of three of your symbol in the big grid.
- Play
- Two players (X and O) alternate placing their symbol in a cell of a small grid.
Capture a big cell by winning the smaller game in that cell.
When a player places their symbol in a cell, the next player must place their symbol in the corresponding grid in their next turn UNLESS…
- they are the first player (they choose where to play first), or
- their move would be on a grid already won or tied (they choose where to play next).
Lecture 27
Go and Game-Playing Computers
- Discussed the rules of the game Go.
- Basic rules of the game.
- More advanced rule discussion.
- Brief recap of the rules with an interesting claim at the end (the video is a bit old).
- Watched parts of this documentary on AlphaGo, the Go-playing algorithm. The full documentary is quite interesting, and worth a look.
- Briefly discussed some of the dangers of blindly over-trusting AI. See this segment from Last Week Tonight for more information. Note: This is a partially humorous take, but the dangers discussed there are real, and the segment is well-done overall.
Lecture 28
Review for final exam
Students should bring questions. The final is cumulative, with an emphasis on things after the midterm.
During this lecture period, I laid out what kind of questions I will ask about each topic. None of what happens on the final should be a surprise if you attended today.
Final Exam
is a reading day.
All final exams will be in the usual classroom. Times and days for finals are listed below, by section.
- Note
- If what is written below conflicts with the official schedule of Canonical Class Meeting Hours, the official university Final Exam schedule for the College of Arts and Sciences takes precedence.
Section A
Our Final Exam is scheduled for
in Woods Lab 121, because this section meets during Canonical Hour J.Section B
Our Final Exam is scheduled for
in Woods Lab 121, because this section meets during Canonical Hour L.