1 / 43

Discrete Mathematics Tutorial 11

Discrete Mathematics Tutorial 11. Chin chlee@cse.cuhk.edu.hk. Induction. Suppose P(1) is true, and If P(n) is true, P(n+1) is also true Then P(n) is true for every n ≥ 1. 6. 5. 4. 3. 2. 1. Induction. Suppose I proved that P(1) and P(2) are true.

jamuna
Download Presentation

Discrete Mathematics Tutorial 11

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

Presentation Transcript


  1. Discrete MathematicsTutorial 11 Chin chlee@cse.cuhk.edu.hk

  2. Induction • Suppose • P(1) is true, and • If P(n) is true, P(n+1) is also true • Then P(n) is true for every n ≥ 1 6 5 4 3 2 1

  3. Induction • Suppose I proved that • P(1) and P(2) are true. • If P(n) is true, then P(n+2) is true. • Can I conclude that • P(n) is true for every n?

  4. Induction • Suppose I proved that • P(1) and P(2) are true. • If P(n) is true, then P(n+2) is true. • Two stack of dominoes • P(1)→P(3)→P(5)→… • P(2)→P(4)→P(6) →… .. .. . . 7 8 5 6 3 4 1 2

  5. Induction • Suppose I proved that • P(1, 1) is true. • If P(n, m) is true, then P(n+1, m+1) is true. • Can I conclude that • P(n, m) is true for every n, m?

  6. Induction • Suppose I proved that • P(1, 1) is true. • If P(n, m) is true, then P(n+1, m+1) is true. • What about P(2,1)?

  7. Induction • Suppose I proved that • P(1, 1) is true. • If P(n, m) is true, then P(n+1, m) is true. • If P(n, m) is true, then P(n-1, m+1) is true. • Can I conclude that • P(n, m) is true for every n, m?

  8. Induction • Suppose I proved that • P(1, 1) is true. • If P(n, m) is true, then P(n+1, m) is true. • If P(n, m) is true, then P(n-1, m+1) is true. 2,3 1,3 3,2 4,1 2,2 1,2 3,1 2,1 1,1

  9. Induction • Show that ∑ i2 = n(2n+1)(n+1)/6 n i=1

  10. Induction • Show that ∑ i2 = n(2n+1)(n+1)/6 i.e. 12 + 22 + 32 + … + n2 = n(2n+1)(n+1)/6 • Base case: • when n = 1 • L.H.S. = 1 • R.H.S. = 1 x 3 x 2 / 6 = 1 n i=1

  11. Induction • Assume P(n) is true: ∑ i2 = n(2n+1)(n+1)/6 i.e. 12 + 22 + 32 + … + n2 = n(2n+1)(n+1)/6 • Then we need to show P(n+1) is also true: ∑ i2 = (n+1)(2(n+1)+1)((n+1)+1)/6 i.e. 12 + 22 + … + n2 + (n+1)2= (n+1)(2n+3)(n+2)/6 • How to use the induction assumption? n i=1 n+1 i=1

  12. Induction • Then we need to show P(n+1) is also true: ∑ i2=(n+1)(2n+3)(n+2)/6 i.e. 12 + 22 + … + n2 + (n+1)2 = (n+1)(2n+3)(n+2)/6 • How to use the induction assumption? ∑ i2 = ∑ i2 + (n+1)2 ∑ i2 = n(2n+1)(n+1)/6 + (n+1)2 n+1 i=1 n n+1 i=1 i=1 n+1 i=1

  13. Induction • Now we have ∑ i2 = n(2n+1)(n+1)/6 + (n+1)2 • Our goal is to make R.H.S. equal (n+1)(2n+3)(n+2)/6 • Just expand everything out and factorize n+1 i=1

  14. Induction n+1 ∑ i2 = n(2n + 1)(n + 1)/6 + (n + 1)2 = (2n3 + 3n2 + n)/6 + (n2 + 2n + 1) =((2n3 + 3n2 + n) + (6n2 + 12n + 6))/6 = (2n3 + 9n2 + 13n + 6)/6 How to factor? i=1

  15. Induction n+1 ∑ i2 = (2n3 + 9n2 + 13n + 6)/6 = (n + 1)(2n2 + 7n + 6)/6 = (n + 1)(2n + 3)(n + 2)/6 i=1 • How to factor? • Remember, our goal is to make R.H.S. equal (n+1)(2n+3)(n+2)/6 • So P(n+1) is also true. Done.

  16. Strong induction • Suppose • P(1) is true, and • If P(s) is true for every s < n, P(n+1) is also true • Then P(n) is true for every n ≥ 1 6 4 5 3 2 1

  17. Strong induction • Prove that To divide up a chocolate bar with m x n squares, we need at least mn - 1 splits 5 = 2x3 - 1 splits

  18. Strong induction • Prove that To divide up a chocolate bar with m x n squares, we need at least mn - 1 splits • We prove a stronger statement P(s) := To divide up a chocolate bar with s squares, we need at least s - 1 splits

  19. Strong Induction • Prove that P(s) := To divide up a chocolate bar with s squares, we need at least s-1 splits • Base caseP(1): • No need to split.

  20. Strong Induction • Prove that P(s) := To divide up a chocolate bar with s squares, we need at least s-1 splits • Induction step: • (If P(k) is true for every k < s) • Assume for any chocolate bar with 1 ≤ k < s squares,we need at least k – 1 splits.

  21. Strong induction • Induction step (If P(k) is true for every k < s) : • Assume for any chocolate bar with 1 ≤ k < s squares, we need at least k – 1 splits. • Given a chocolate bar with s squares Split it into two smaller bars with i and j squares,i + j = s i squares s squares j squares

  22. Strong induction • By induction assumption (P(k) is true for any k < s) • Small chocolate bar with i < s squares • needs at least i-1 splits for one of the two bars • Small chocolate bar with j < s squares • needs at least j-1 splits for one of the two bars • Therefore we need (i-1) + (j-1) + 1 = s-1 splits • because i + j = s • P(s) is true. Done. i-1 splits 1 split j-1 splits

  23. Well-ordering principle • Every nonempty set of nonnegative integers has a least element • This is equivalent to Mathematical Induction: • If MI is true, then we can prove WOP is also true. • If WOP is true, then we can prove MI is also true.

  24. Well-ordering principle • Prove by well-ordering principle that ∑ i = n(n+1)/2 n i=1

  25. Well-ordering principle • Prove by well-ordering principle that ∑ i = n(n+1)/2 • Prove by contradiction • Suppose there exist some m, ∑ i ≠ m(m+1)/2 • Let S be the set containing all such m • S is nonempty (exists at least one) • S is a set of nonnegative integers n i=1 m i=1

  26. Well-ordering principle • Let S be the set containing all the m ∑ i ≠ m(m+1)/2 • S is nonempty (exists at least one) • S is a set of nonnegative integers • By well-ordering principle, • there exists a least element m’ in S • i.e. m’ is the smallest number such that ∑ i ≠ m’(m’+1)/2 m i=1 m’ i=1

  27. Well-ordering principle • m’ is the smallest number such that ∑ i ≠ m’(m’+1)/2 • This means for any 0 ≤ n < m’ ∑ i = n(n+1)/2 m’ i=1 n i=1

  28. Well-ordering principle • This means for any 0 ≤ n < m’ ∑ i = n(n+1)/2 • This is true when n = 0, so • m’ > 0 • m’-1 is non-negative and m’-1 < m’, so ∑ i = (m’-1)((m’-1)+1)/2 n i=1 m’-1 i=1

  29. Well-ordering principle m’-1 ∑ i = (m’-1)((m’-1)+1)/2 ∑ i = ∑ i + m’ = (m’-1)m’/2 + m’ = m’(m’+1)/2 • But ∑ i ≠ m’(m’+1)/2 • Contradiction i=1 m’ m’-1 i=1 i=1 m’ i=1

  30. Well-ordering principle • Show that a2 + b2 = 3(s2 + t2) has no non-zero integer solutions.

  31. Well-ordering principle • Suppose it has non-zero integer solutions. • Let S be the collection of (a, b, s, t) such that • (a, b, s, t) ≠ (0, 0, 0, 0), and • a2 + b2 = 3(s2 + t2) • S is nonempty, by well-ordering principle • there is a least element (a1, b1, s1, t1) such that a12 + b12 = 3(s12 + t12)

  32. Well-ordering principle • S is nonempty, by well-ordering principle • there is a least element (a1, b1, s1, t1) such that a12 + b12 = 3(s12 + t12) • Right idea, but… • S is a set containing 4-tuples (a, b, s, t) • not a set of non-negative integers • Cannot apply the well-ordering principle

  33. Well-ordering principle • Suppose there exists (a, b, s, t) ≠ (0, 0, 0, 0), a2+ b2 = 3(s2 + t2) • Let S be the collection of |a| such that there exist b, s and t a2 + b2 = 3(s2 + t2) • S is a nonempty set of non-negative integers • By the well-ordering principle • There exists an a1 in S such that |a1| is smallest

  34. Well-ordering principle • Let S be the collection of |a| such that there exist b, s and t a2 + b2 = 3(s2 + t2) • By the well-ordering principle • There exists an a1 in S such that |a1| is smallest • And for this smallest |a1|, there exist b1, s1 and t1, a12+ b12= 3(s12+ t12)

  35. Well-ordering principle • And for this smallest |a1|, there exist b1, s1 and t1, a12+ b12= 3(s12+ t12) • This means • a12 + b12is a multiple of 3 • a1 and b1are both multiples of 3 • proof by contrapositive • a1= 3a2 and b1 = 3b2 for some a2 and b2

  36. Well-ordering principle • And for this smallest |a1|, there exist b1, s1 and t1, a12+ b12= 3(s12+ t12) • a1 = 3a2 and b1 = 3b2 for some a2 and b2 • (3a2)2 + (3b2)2 = 3(s12 + t12) • 9a22 + 9b22 = 3(s12 + t12) • 3(a22 + b22) = s12 + t12 • s12 + t12 = 3(a22 + b22) • therefore (s1, t1, a2, b2) is also a solution

  37. Well-ordering principle • There is a least element (a1, b1, s1, t1) a12 + b12 = 3(s12 + t12) • We have just showed • (s1, t1, a2= a1/3, b2 = b1/3) is also a solution • Repeat the argument • (a2=a1/3, b2=b1/3, s2=s1/3, t2=t1/3) is also solution • But |a2| < |a1|, contradiction.

  38. Invariant Method • The numbers 1, 2, 3, 4 and 5 are written on a board • Repeat the following until there is only one number left: • pick any two of the numbers • erase them • write the absolute value of their difference on board • Can the remaining number be 2?

  39. Invariant Method • Example • 1 2 3 4 5 → 2 3 4 4 • 2 3 4 4 → 2 4 1 • 2 41→ 2 3 • 2 3 → 1

  40. Invariant Method • Observe • 1 2 3 4 5 (1 + 2 + 3 + 4 + 5 = 15) • 2 3 4 4 (2 + 3 + 4 + 4 = 13) • 2 41(2 + 4 + 1 = 7) • 2 3 (2 + 3 = 5) • 1 (1) • What is the pattern?

  41. Invariant Method • Observation • can only get an odd number in the final answer • total sum of the numbers on the board is always odd • Suppose I pick m and n on the board • Change in total sum = m + n - (m - n) = 2n • the change in total sum must be even • Therefore the total sum is always odd

  42. Invariant Method • At the beginning the total sum is 15 • which is odd • Therefore the total sum is always odd • Impossible to get 2 as final answer • In fact, impossible to get any even number as final answer

  43. End • Questions?

More Related