Proof Puzzle
One of the main goals of this course is to introduce you to the fundamentals of mathematical proof writing.
In many ways, writing a mathematical proof is like solving a puzzle.
Below is a relatively simple proof puzzle. We will learn to solve this puzzle again from scratch in Chapter 3. For now, see if you can put the pieces the in the correct order.
Here is a slightly different discrete mathematics puzzle:
Challenge: Write a python script that will create a list of the odd numbers between 0 and 100.
I hope it is not too hard to unscramble this puzzle with the pieces and number lines in front of you 🙂.
Here is the a story of what we are doing in this algorithm or process.
In line 1, we initialize an empty list named odd_integer_list.
Line 2 is blank to make the code easier to read.
In line 3, we use a for loop to check the numbers in the range from 0 to 100.
In line 4, for each integer in our for loop we check to see if dividing that integer by 2 has a remainder of 1 using the % modulo operator.
If the Boolean expression (integer % 2 == 1) evaluates to TRUE, then we append that integer to our odd_integer_list.
Once our for loop is done we print the odd_integer_list to the shell check to see if we solve the puzzle.
Roughly, how many integers did we check?
Roughly, how many integers are in the odd integer list?
Some discrete mathematics puzzles are better done on pen and paper.
Other discrete math puzzles are better suited for a computer and code. Many can be solved either way.
While I think proof writing should be started on pen and paper, I also encourage learning to typeset your proofs, because it makes the reordering and revising process a lot smoother.