2/28/16 1
Mathematical Induction
Rosen Chapter 5
Why induction?
n Prove algorithm correctness n The inductive proof will sometimes point out
an algorithmic solution to a problem
n Strongly connected to recursion
Motivation
n A group of people live on an island. They are all perfect logicians.
No one knows the color of their eyes. Every night at midnight, a ferry stops at the island. Any islanders who have figured out the color of their own eyes then leave the island, and the rest stay. Everyone can see everyone else at all times and keeps a count of the number
- f people they see with each eye color (excluding themselves), but
they cannot otherwise communicate.
n On this island there are 100 blue-eyed people, 100 brown-eyed
people, and the Oracle (with green eyes).
n One day the oracle says:
"I can see someone who has blue eyes."
n Who leaves the island, and on what night? https://xkcd.com/blue_eyes.html
Motivation
n We can also answer the more general case where there are N blue-
eyed people, and N brown-eyed people,