15.08.2013 Views

General Computer Science 320201 GenCS I & II Lecture ... - Kwarc

General Computer Science 320201 GenCS I & II Lecture ... - Kwarc

General Computer Science 320201 GenCS I & II Lecture ... - Kwarc

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

26 CHAPTER 3. ELEMENTARY DISCRETE MATH<br />

1. the distance between Si and S s(i) is smaller than the height of Si,<br />

2. Si is much higher than wide, so it is unstable, and<br />

3. Si and S s(i) have the same weight.<br />

If S0 is pushed towards S1 so that it falls, then all dominos will fall.<br />

The Domino Induction<br />

• • • • • •<br />

©: Michael Kohlhase 37<br />

Proof: We prove the assertion by induction over i with the property P that “Si falls in the<br />

direction of S s(i)”.<br />

P.1 We have to consider two cases<br />

P.1.1 base case: i is zero:<br />

P.1.1.1 We have assumed that “S0 is pushed towards S1, so that it falls”<br />

P.1.2 step case: i = s(j) for some unary natural number j:<br />

P.1.2.1 We assume that P holds for Sj, i.e. Sj falls in the direction of S s(j) = Si.<br />

P.1.2.2 But we know that Sj has the same weight as Si, which is unstable,<br />

P.1.2.3 so Si falls into the direction opposite to Sj, i.e. towards S s(i) (we have a linear<br />

sequence of dominos)<br />

P.2 We have considered all the cases, so we have proven that P holds for all unary natural<br />

numbers i. (by induction)<br />

P.3 Now, the assertion follows trivially, since if “Si falls in the direction of S s(i)”, then in<br />

particular “Si falls”.<br />

©: Michael Kohlhase 38<br />

If we look closely at the proof above, we see another recurring pattern. To get the proof to go<br />

through, we had to use a property P that is a little stronger than what we need for the assertion<br />

alone. In effect, the additional clause “... in the direction ...” in property P is used to make the<br />

step condition go through: we we can use the stronger inductive hypothesis in the proof of step<br />

case, which is simpler.<br />

Often the key idea in an induction proof is to find a suitable strengthening of the assertion to<br />

get the step case to go through.<br />

3.3 Defining Operations on Natural Numbers<br />

The next thing we want to do is to define operations on unary natural numbers, i.e. ways to<br />

do something with numbers. Without really committing what “operations” are, we build on the<br />

intuition that they take (unary natural) numbers as input and return numbers. The important<br />

thing in this is not what operations are but how we define them.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!