1 / 44

440 likes | 740 Vues

Strong Mathematical Induction. Lecture 23 Section 4.4 Tue, Feb 27, 2007. Announcements. Thursday at 4:00 (cookies at 3:30). The Principle of Strong Mathematical Induction. Let P ( n ) be a predicate defined for integers n . Let a be an integer. If the following two statements are true

Télécharger la présentation
## Strong Mathematical Induction

**An Image/Link below is provided (as is) to download presentation**
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.
Content is provided to you AS IS for your information and personal use only.
Download presentation by click this link.
While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.
During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

**Strong Mathematical Induction**Lecture 23 Section 4.4 Tue, Feb 27, 2007**Announcements**• Thursday at 4:00 (cookies at 3:30).**The Principle of Strong Mathematical Induction**• Let P(n) be a predicate defined for integers n. Let a be an integer. If the following two statements are true • P(a), P(a + 1), …, P(b). • For all integers kb, if P(a), P(a + 1), …, P(k), then P(k + 1). then the statement • For all integers na, P(n) is true.**The Principle of Strong Mathematical Induction**• The range a, a + 1, a + 2, …, b represents the number of previous cases that the inductive step depends on. • Usually this is 1. • We will see one example where it is 2.**Example: Factoring Integers**• Theorem: Every integer n 2 factors into primes. • Proof: • Base case: • Let n = 2. Then n is already a prime, so the statement is true.**Example: Factoring Integers**• Inductive case: • Suppose the statement is true for all integers from 2 to k, for some k 2. • Consider k + 1. • Either k + 1 is prime or it is not prime. • If it is prime, then we are done. • If it is not prime, then it factors as a b, for some integers a, b, with a, b 2.**Example: Factoring Integers**• By the induction hypothesis, a and b themselves factor into the product of primes. • Therefore, k + 1 factors into the product of primes.**Example: The Fibonacci Sequence**• The Fibonacci sequence {fn} is defined by • f0 = 0, • f1 = 1, • fn = fn – 1 + fn – 2, for all n 2. • The first few terms are 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, …**Example: The Fibonacci Sequence**• Theorem: Let Then for all n 0.**Example: The Fibonacci Sequence**• Proof: • Base cases: • Let n = 0. Then (0 – 0)/( – ) = 0. • Let n = 1. Then (1 – 1)/( – ) = 1. • Inductive case: • Suppose the equation holds for all n from 0 to k, for some k 1. • Consider fk + 1.**A Lemma**• Lemma: n + 1 = n + n – 1 and n + 1 = n + n – 1 for all n 1. • Proof (for ): • Base case: • Let n = 1. • Then a direct calculation shows that 2 = + 1 = 1 + 0.**A Lemma**• Inductive step: • Now suppose it is true for some integer k 1. • That is, k + 1 = k + k – 1 • Multiply the equation through by . • The result is k + 2 = k + 1 + k. • So the statement is true when n = k + 1. • Therefore, the statement is true for all n 1.**Example: The Fibonacci Sequence**• Back to our theorem…**Example: The Fibonacci Sequence**• Therefore, the statement is true for all n 1.**Example: Trees**• A tree is a connectedgraph that contains no cycles.**Example: Trees**• Notice that if you add an edge to a tree, you necessarily create a cycle. • Also notice that if you delete an edge from a tree, the graph becomes disconnected. • This suggests that a tree contains exactly the “right” number of edges.**Example: Trees**• Theorem: For all n 1, a tree with nnodes contains exactly n – 1 edges. • Proof: • Base case: • Let n = 1. • Clearly, there are 0 edges.**Example: Trees**• Inductive case: • Suppose that the statement is true for all n k, for some k 1. • Let T be a tree with k + 1 nodes. • Let v be an arbitrary node in T and let s be the index of v. • Let u1, u2, …, us be the adjacent nodes. • Delete the edges from v to u1, …, us.**Example: Trees**• Then each ui is a node of a separate tree Ti. • Let ni be the number of nodes in tree Ti. • Note that n1 + … + ns = k. • By induction, each tree Ti contains ni – 1 edges. • Thus, the total number of edges in tree T is (n1 – 1) + … + (ns – 1) + s, which equals k.**Example: Trees**u2 v u3 u1**Example: Trees**u2 v u3 u1**Example: Trees**u2 v u3 u1 4 nodes, 3 edges**Example: Trees**1 node, 0 edges u2 v u3 u1 4 nodes, 3 edges**Example: Trees**1 node, 0 edges u2 v u3 u1 4 nodes, 3 edges 3 nodes, 2 edges**Example: Trees**1 node, 0 edges u2 v u3 u1 4 nodes, 3 edges 3 nodes, 2 edges 3 edges**Example: Trees**u2 v u3 u1 Total = 3 + 0 + 2 + 3 = 8 edges**Example: Trees**u2 u1 v u3**Example: Trees**u2 u1 v u3**Example: Trees**u2 u1 v 6 nodes, 5 edges u3**Example: Trees**1 node, 0 edges u2 u1 v 6 nodes, 5 edges u3**Example: Trees**1 node, 0 edges u2 u1 v 6 nodes, 5 edges u3 1 nodes, 0 edges**Example: Trees**1 node, 0 edges u2 u1 v 6 nodes, 5 edges u3 1 nodes, 0 edges 3 edges**Example: Trees**u2 u1 v u3 Total = 5 + 0 + 0 + 3 = 8 edges**Example: Binary Trees**• A binary tree structure consists of a set of nodes, each with two pointers. • The left pointer points to the left child. • The right pointer points to the right child. • If there is no child, then the pointer is null.**Example: Binary Trees**• Corollary: In a binary tree structure, if there are n nodes, then there are exactly n + 1 null pointers.**Balanced Binary Strings**• Let S be the set of all finite binary strings that contain an equal number of 0’s and 1’s. • Define a set T as follows: • The empty string is in T. • If s T, then 0s1 T and 1s0 T. • If s T and t T, then st T.**Balanced Binary Strings**• Theorem: T S. • Theorem: T = S.**The Paradox of the Pop Quiz**• A professor announces that one day during the semester he will give a pop quiz. • For the quiz to be a “pop” quiz, it must be unexpected.**The Paradox of the Pop Quiz**• Theorem: For all n 0, the professor cannot give the pop quiz n days before the last day of the semester.**The Paradox of the Pop Quiz**• Proof: • Base case: n = 0. • He cannot give the pop quiz on the last day of the semester because everyone will be expecting it then.**The Paradox of the Pop Quiz**• Inductive step: • Suppose he cannot give it on any of the days 0, 1, 2, …, k days before the end of the semester, for some k 0. • Knowing this, the students would be expecting it on the day k + 1 days before the end of the semester. • So he can’t give it on that day.**The Paradox of the Pop Quiz**• By strong induction, for all n 0, he cannot give the pop quiz n days before the end of the semester.

More Related