\( \)

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 Tuesday, 9 May 2023 at 12:00.

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

Tuesday, 17 January 2023

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

Thursday, 19 January 2023

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.

Homework

HW 00 Due

Lecture 03

Tuesday, 24 January 2023

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

Thursday, 26 January 2023

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.

  1. 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.

  1. If \( X \) is a group, then \( X \) is associative.
  2. \( X \) is a group, but it is not commutative.
  3. \( X \) is associative or commutative, but not both.
  4. \( X \) is associative and commutative provided \( X \) is a field.
  5. \( 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.

  1. \( F \vee G \)
  2. \( C \wedge (\lnot A) \)
  3. \( \lnot (A \rightarrow G) \)
  4. \( (\lnot C) \rightarrow (\lnot F) \)
  5. \( F \rightarrow ((C \wedge A) \wedge G) \)
  6. \( (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

Tuesday, 31 January 2023

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

Thursday, 2 February 2023

I had to cancel this lecture. Students were instructed to use this time to study and catch up on homework

Lecture 07

Tuesday, 7 February 2023

I had to cancel this lecture. Students were instructed to use this time to study and catch up on homework

Lecture 08

Thursday, 9 February 2023

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.

  1. \( (\lnot P) \rightarrow Q \)
  2. \( (P \wedge (P \rightarrow Q)) \rightarrow Q \)
  3. \( (P \vee Q) \wedge (\lnot (P \wedge Q)) \)
  4. \( (P \rightarrow Q) \vee (Q \rightarrow P) \)
  5. \( (\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.

  1. \( \lnot (P \wedge Q) \) and \( (\lnot P) \vee (\lnot Q) \)
  2. \( (P \rightarrow Q) \rightarrow R \) and \( P \rightarrow (Q \rightarrow R) \)
  3. \( P \rightarrow Q \) and \( (\lnot Q) \rightarrow (\lnot P) \)

Lecture 09

Tuesday, 14 February 2023

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.

Homework

Truth Tables Due

The homework on truth tables is due!

Lecture 10

Thursday, 16 February 2023

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.

  1. 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

Tuesday, 21 February 2023

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

Thursday, 23 February 2023

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

Tuesday, 28 February 2023

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.

  1. \( (P \wedge Q) \rightarrow R \equiv (P \rightarrow R) \vee (Q \rightarrow R) \)
  2. \( \lnot (P \wedge (\lnot Q)) \equiv P \rightarrow Q \)
  3. \( P \rightarrow (Q \vee R) \equiv (P \rightarrow Q) \vee (P \rightarrow R) \)
  4. \( P \rightarrow (Q \rightarrow R) \equiv (P \wedge Q) \rightarrow R \)
  5. \( ((P \vee Q) \wedge (\lnot P)) \rightarrow Q \equiv \mathbf{T} \)

Lecture 14

Thursday, 2 March 2023

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

Tuesday, 7 March 2023

Midterm Exam

Lecture 16

Tuesday, 21 March 2023

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

Thursday, 23 March 2023

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

Tuesday, 28 March 2023

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

Thursday, 30 March 2023

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

Tuesday, 4 April 2023

Counting Poker Hands

Count poker hands and compute their probabilities if cards are dealt at random.

Lecture 21

Thursday, 6 April 2023

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

Tuesday, 11 April 2023 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.

Homework

Due

Turn in Reflection 4.

Lecture 23

Thursday, 13 April 2023

Sudoku

We went over another simple puzzle. We also discussed the X-wing technique.

Lecture 24

Tuesday, 18 April 2023

Sudoku

Worked through a harder puzzle, including a few applications of the X-wing. Discussed the Swordfish technique.

Lecture 25

Thursday, 20 April 2023

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

Tuesday, 25 April 2023

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

Thursday, 27 April 2023

Go and Game-Playing Computers

Lecture 28

Tuesday, 2 May 2023

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

Thursday, 4 May 2023 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 Monday, 8 May 2023 at 09:00 in Woods Lab 121, because this section meets during Canonical Hour J.

Section B

Our Final Exam is scheduled for Sunday, 7 May 2023 at 19:00 in Woods Lab 121, because this section meets during Canonical Hour L.