What is a proof? Why do we care about proofs? Are the boring long tedious arguments usually known as `mathematical proofs' really needed outside the tiny circle of useless theoreticians that pray something called `mathematical rigor'? In this course we will try to show that proofs can be simple, elegant, convincing, useful and (don't laugh) exciting. Later we will try to show different proof techniques and tools, but first of all we should break the barrier and see that yes, one can understand a proof and one can enjoy the proof. We start with simple puzzles where one small remark can disclose "what really happens there" and then the proof becomes almost obvious.
How to Find an Example?
One example is enough to prove an existential statement, but how to find an example? In many cases the search space is enormous. A computer may help, but some reasoning that narrows the search space, is important both for computer search and for "bare hands" work — how can this be done? What do we need to prove if we claim that our solution is optimal? As usual, we'll practice solving many interactive puzzles. We'll show also some computer programs that help us to construct an example.
Recursion and Induction
We'll discover two powerful methods of defining objects, proving concepts, and implementing programs — recursion and induction. These two methods are heavily used, in particular, in algorithms — for analysing correctness and running time of algorithms as well as for implementing efficient solutions. You will see that induction is as simple as falling dominos, but allows to prove complex things by decomposing them and moving step by step. You will learn how famous Gauss unexpectedly solved his teacher's problem intended to keep him busy the whole lesson in just two minutes, and in the end you will be able to prove his formula using induction. You will be able to generalize scary arithmetic exercises and then solve them easily using induction.
We have already invoked mathematical logic when we discussed proofs by examples. This week we will turn mathematical logic full on. We will discuss its basic operations and rules. We will see how logic can play a crucial and indispensable role in proofs. We will discuss how to construct a negation to the statement and we will meet the notion of a counterexamples. We will see tricky and seemingly counterintuitive, but yet (an unintentional pun) logical aspects of mathematical logic. We will see one of the oldest approaches to proving statements: Reductio ad Absurdum.
"There are things that never change". Apart from being just a philosophical statement, this phrase turns out to be an important idea that can actually help. In this module we will see how it can help in problem solving. Things that do not change are called invariants in mathematics. They form an important tool of proving with numerous applications, including estimating running time of programs and algorithms. We will get some intuition of what they are, see how they can look like, and get some practice in using them.
Solving a 15-Puzzle
In this module, we consider a well known 15-puzzle where one needs to restore order among 15 square pieces in a square box. It turns out that the behavior of this puzzle is determined by mathematics: it is solvable if and only if the corresponding permutation is even. We will learn the basic properties of even and odd permutations. The task is to write a program that determines whether a permutation is even or odd. There is also a more difficult bonus task: to write a program that actually computes a solution (sequence of moves) for a given position assuming that this position is solvable.