Tuesday, September 14

Induction and Iteration

Presentations

We had a presentation on the proof of the "extended pumping lemma" assigned the week before.

Induction and Iteration

We gave an example of an induction proof by showing how loops in a programming language are essentially induction proofs.

Induction proofs are constructed in a manner very similar to loops in programming languages.  In fact, they are identical.  Recursion is also another programming tool that is identical to induction.

Induction is an appropriate proof technique to apply when the following is recognized about a theorem to be proved.

1.  One needs to prove a countably infinite set of propositions, P(0), P(1), P(2), ...

2.  One can see a way to prove any proposition P(I+1) in this set if it is already known that P(0), P(1), P(2), ..., P(I) are true.

In this case, the way to go about the proof is to prove P(0) is true from first principles.  Then prove P(1) is true based on already knowing that P(0) is true.  Then prove P(2) is true based on already knowing that P(0) and P(1) are true, and so on.  Of course, this can't be done directly, because the proof would be infinite.  Instead, one must build a generic proof that P(I+1) is true given that P(0), ..., P(I) are known to be true.  The general approach is thus much like a loop.

A Loop Structure for an Induction Proof

Here we want to prove that P(N) is true for arbitrary N >= 0

Read N
Set I to 0
Prove that P(I) is true                         -- base step
assert P(0) through P(I) are now proved true    -- trivial, since I = 0
loop while I < N
  assert P(0) through P(I) are now proved true  -- induction hypothesis (loop invariant assertion)
  prove that P(I+1) is true based on knowing that P(0) through P(I) are true --induction step
  assert P(0) through P(I+1) are now proved true
  I <-- I + 1
  assert P(0) through P(I) are now proved true
end loop
assert P(0) through P(I) are now proved true, and I = N
assert P(0) through P(N) are now proved true, so P(N) is true

Context Sensitive Grammars and Linear Bounded Automata

We examined the notion of a linear bounded automaton (some was done in the previous lecture).  We discussed how an LBA could recognized the language {anbncn | n >= 0}.  We also discussed how one could always determine whether an LBA M accepts an input string or not (which is in general not possible with Turing machines).