Strong Induction (Second Principle) Example: There are two piles of cards, players take turn: each turn: one player removes any number of cards from

Similar documents
CSI Mathematical Induction. Many statements assert that a property of the form P(n) is true for all integers n.

Basic Proof Examples

With Question/Answer Animations

Complete Induction and the Well- Ordering Principle

We want to show P (n) is true for all integers

Induction and recursion. Chapter 5

COM S 330 Homework 08 Solutions. Type your answers to the following questions and submit a PDF file to Blackboard. One page per problem.

Chapter Summary. Mathematical Induction Strong Induction Well-Ordering Recursive Definitions Structural Induction Recursive Algorithms

Discrete Mathematics. Spring 2017

Notes on induction proofs and recursive definitions

n n P} is a bounded subset Proof. Let A be a nonempty subset of Z, bounded above. Define the set

CVO103: Programming Languages. Lecture 2 Inductive Definitions (2)

MATH 324 Summer 2011 Elementary Number Theory. Notes on Mathematical Induction. Recall the following axiom for the set of integers.

Math 324 Summer 2012 Elementary Number Theory Notes on Mathematical Induction

E.g. The set RE of regular expressions is given by the following rules:

MATH 215 Final. M4. For all a, b in Z, a b = b a.

1. Consider the conditional E = p q r. Use de Morgan s laws to write simplified versions of the following : The negation of E : 5 points

a + b = b + a and a b = b a. (a + b) + c = a + (b + c) and (a b) c = a (b c). a (b + c) = a b + a c and (a + b) c = a c + b c.

Properties of the Integers

Recitation 7: Existence Proofs and Mathematical Induction

CSC236H Lecture 2. Ilir Dema. September 19, 2018

Well-Ordering Principle. Axiom: Every nonempty subset of Z + has a least element. That is, if S Z + and S, then S has a smallest element.

Homework #2 Solutions Due: September 5, for all n N n 3 = n2 (n + 1) 2 4

Section Summary. Proof by Cases Existence Proofs

Finite and Infinite Sets

Discrete Math, Spring Solutions to Problems V

CSE 20. Final Review. CSE 20: Final Review

Final Exam Review. 2. Let A = {, { }}. What is the cardinality of A? Is

Discrete Mathematics for CS Fall 2003 Wagner Lecture 3. Strong induction

Climbing an Infinite Ladder

21 Induction. Tom Lewis. Fall Term Tom Lewis () 21 Induction Fall Term / 14

Fall 2017 Test II review problems

Climbing an Infinite Ladder

Reading and Writing. Mathematical Proofs. Slides by Arthur van Goetham

Induction and Recursion

MADHAVA MATHEMATICS COMPETITION, December 2015 Solutions and Scheme of Marking

SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION

Divisibility = 16, = 9, = 2, = 5. (Negative!)

Homework 3 Solutions, Math 55

Theory of Computation

TEMPERATURE THEORY AND THE THERMOSTATIC STRATEGY

1 Functions, relations, and infinite cardinality

Sums and Products. a i = a 1. i=1. a i = a i a n. n 1

Preparing for the CS 173 (A) Fall 2018 Midterm 1

Discrete Math in Computer Science Solutions to Practice Problems for Midterm 2

Numbers. 2.1 Integers. P(n) = n(n 4 5n 2 + 4) = n(n 2 1)(n 2 4) = (n 2)(n 1)n(n + 1)(n + 2); 120 =

In N we can do addition, but in order to do subtraction we need to extend N to the integers

Midterm 2 Sample Introduction to Higher Math Fall 2018 Instructor: Linh Truong

In N we can do addition, but in order to do subtraction we need to extend N to the integers

Logic as a Tool Chapter 1: Understanding Propositional Logic 1.1 Propositions and logical connectives. Truth tables and tautologies

Models of Computation. by Costas Busch, LSU

CHAPTER 8: EXPLORING R

Consider an infinite row of dominoes, labeled by 1, 2, 3,, where each domino is standing up. What should one do to knock over all dominoes?

Exam Practice Problems

Homework 4, 5, 6 Solutions. > 0, and so a n 0 = n + 1 n = ( n+1 n)( n+1+ n) 1 if n is odd 1/n if n is even diverges.

Chapter 2 Section 2.1: Proofs Proof Techniques. CS 130 Discrete Structures

Heaps Induction. Heaps. Heaps. Tirgul 6

The following techniques for methods of proofs are discussed in our text: - Vacuous proof - Trivial proof

Math 230 Final Exam, Spring 2008

Problem Set 5 Solutions

(1) Which of the following are propositions? If it is a proposition, determine its truth value: A propositional function, but not a proposition.

0.Axioms for the Integers 1

Day 12. Thursday June 7, 2012

One Pile Nim with Arbitrary Move Function

On Aperiodic Subtraction Games with Bounded Nim Sequence

Definition: Let S and T be sets. A binary relation on SxT is any subset of SxT. A binary relation on S is any subset of SxS.

Announcements. Read Section 2.1 (Sets), 2.2 (Set Operations) and 5.1 (Mathematical Induction) Existence Proofs. Non-constructive

Homework 7 Solutions, Math 55

Mathematical Fundamentals

Recursive Definitions

means is a subset of. So we say A B for sets A and B if x A we have x B holds. BY CONTRAST, a S means that a is a member of S.

Proofs, Strings, and Finite Automata. CS154 Chris Pollett Feb 5, 2007.

HW 4 SOLUTIONS. , x + x x 1 ) 2

Discrete Structures Homework 1

CS1800 Discrete Structures Spring 2018 February CS1800 Discrete Structures Midterm Version A

Discrete Mathematics and Probability Theory Fall 2013 Vazirani Note 1

Year 1: Fall. Year 1: Spring. HSB Topics - 2 Year Cycle

STUDY PROBLEMS FOR EXAM I CMSC 203 DISCRETE STRUCTURES. n (n +1)(2n +1), 6. j 2 = 1(1+1)(2 1+1) 6. k (k +1)(2k +1) 6

(4) Using results you have studied, show that if x, y are real numbers,

CSCE 222 Discrete Structures for Computing. Review for Exam 2. Dr. Hyunyoung Lee !!!

Department of Computer Science University at Albany, State University of New York Solutions to Sample Discrete Mathematics Examination I (Spring 2008)

Problem One: Order Relations i. What three properties does a binary relation have to have to be a partial order?

Mathematical Induction. Section 5.1

M17 MAT25-21 HOMEWORK 6

ICS141: Discrete Mathematics for Computer Science I

Foundations of Discrete Mathematics

Axioms for Set Theory

Discrete Mathematics & Mathematical Reasoning Induction

Discrete Mathematics. Spring 2017

Copyright 2010 Pearson Education, Inc. Publishing as Prentice Hall.

Contradiction MATH Contradiction. Benjamin V.C. Collins, James A. Swenson MATH 2730

CS1800: Mathematical Induction. Professor Kevin Gold

Economics 204 Summer/Fall 2017 Lecture 1 Monday July 17, 2017

Class 8: Numbers Exercise 3B

Exercises 1 - Solutions

MATH10040: Numbers and Functions Homework 1: Solutions

#G03 INTEGERS 10 (2010), MIN, A COMBINATORIAL GAME HAVING A CONNECTION WITH PRIME NUMBERS

Discrete Mathematics & Mathematical Reasoning Induction

Structure of R. Chapter Algebraic and Order Properties of R

Algebra. Formal fallacies (recap). Example of base rate fallacy: Monty Hall Problem.

Transcription:

Strong Induction (Second Principle) Example: There are two piles of cards, players take turn: each turn: one player removes any number of cards from 1 pile (any of the two). The player who removes the last card wins. Show that if, in the beginning, the two piles contain the same number of cards, then the second player can always win. Answer: Let n be the number of cards in each pile. 1. Base case: When n=1, the first player can only remove 1 card from 1 pile. There is no other choice for him. So the second player can remove the 1 remaining card in another pile and win. 1

2. Inductive Hypothesis: For n = 1 to k, the second player always wins. 3. Proof: We must show that second player can win when n = k + 1. When n = k + 1, let us say the first player removes j cards from one pile, leaving k + 1 j cards in the pile. So the second player can remove j cards from the other pile, leaving the same amount on both pile. And it can be seen that 1 k+1 j k, hence the second player can win by the inductive hypothesis. 2

Example: Prove that the number 12 or more can be formed by adding multiples of 4 and/or 5. Answer: Let n be the number we are interested in. We first use Normal Induction: 1. Base case: n = 12, this can be formed from 4 + 4 + 4. Thus base case proven. 2. Inductive Hypothesis: For n = k, n is multiples of 4 and/or 5. 3. Proof: We must show that k + 1 is multiples of 4 and/or 5. for k + 1 If at least one 4 is used for the case where n = k, then replace this 4 by 5, and we therefore get n = k + 1 from the additions of 4 and/or 5. If there is no 4, it means only 5 are used. Since k 12, at least three 5 are used. Replace this 5 + 5 + 5 3

by 4 + 4 + 4 + 4 and we will get k + 1, which is still the additions of 4 and/or 5. Now we will proof this using strong induction. 1. Base case: is divided into the following cases: when we have 12: This is 4 + 4 + 4. when we have 13: This is 4 + 4 + 5. when we have 14: This is 5 + 5 + 4. when we have 15: This is 5 + 5 + 5. These are the proven base cases. 2. Inductive Hypothesis: Let k 15. Assume that all numbers from 12 to k is the result of adding 4 and/or 5. 3. Proof: We must show that k + 1 is multiples of 4 and/or 5. for k + 1 We use the result of k 3, which 4

satisfies the hypothesis, and add it by 4. This completes the proof. Note that we have many subcases for base case because the induction by using k 3 does not work with 13, 14, and 15. 5

Well-Ordering Property Every nonempty set of nonnegative integers has a least element. We can use this directly in proof. Example: Prove that, if a is an integer and d is a positive integer, then there are unique integers q and r with 0 r < d and a = dq + r. Answer: First, do the existence proof; OK. Let S = {(a dq) Int (a dq) 0}. By the well-ordering property, S has a least element, r = a dq 0. This is assuming there exists a = dq +r. Then we see if, at the same time, r < d is true. If true, then this is the existence example we want. 0 r because r must be a member of S, as defined by us. We show that r < d by assuming the negation is true: 6

r d r d 0 (a dq 0 ) d 0 a d(q 0 + 1) 0 This means a d(q 0 + 1) must also be a member of S, and this is less than r. Contradiction, because r is already the smallest number in this set. Therefore r < d. Now we have the existence proof. The second step is to prove the uniqueness. Do the contradiction proof: 1. If q is not unique that means there exists q2 q, a= dq+r = dq 2 + r We can derive further that: dq + r = dq 2 + r 7

dq = dq 2 q = q 2 Contradiction, q must not be equal to q 2. So we conclude that q is unique. 2. If r is not unique... this is exactly the same method of proof. We will get the uniqueness result. Example: In one tournament football match of m teams (m 3). Each team plays every other team once. Prove that if there is a cycle, for example A beats B beats C..., then there is a cycle of exactly three teams. (There is no draw game) Answer: Prove by contradiction. Assume there is no cycle of length 3. Let S be a set of all cycle length (S is not empty since we know there is a cycle for sure). By well-ordering property, let k be the least element of S. From our assumption, k > 3. 8

Let s look at one cycle A beats B beats C beats... of length k. What would the result of A and C be?: If C beats A, then there is a cycle of length 3. Contradiction. If A beats C, then we can form a new cycle by omitting B from the cycle we are looking at. Thus obtaining a cycle of length k 1. But this is contradiction, since k is already the smallest cycle size. Infinite Descent Proof is to show that for a proposition P (n), P (k) is false for all positive integer k. 1. Assume that P (k) is true for at least 1 k. 2. By the well-ordering property, there is the least positive integer j such that P (j) holds. 9

3. Find j such that j < j and P (j ) is true. Thus contradiction. This is what Fermat used to prove there is no solution to x 4 + y 4 = z 4 Example: Prove that 2 is irrational. Answer: 1. Assume 2 is rational then 2 = m n. 2. By the well-ordering property, there is a least positive integer N, such that 2 = M N. And we know M 2 = 2N 2 3. Now we do this: M N = (M N)M (M N)N = M 2 MN (M N)N = 2N 2 MN (M N)N 10

(2N M)N = (M N)N = 2N M M N We now have M N as a denominator. 4. Because 1 < 2 < 2: 1 < 2 < 2 1 < M N < 2 N < M < 2N 0 < M N < N Therefore M N < N, contradicting our original assumption. 11

Structural Induction Example: Given the following string length definition, where w is a string and x is a character: Prove that: l(emptystring) = 0, l(wx) = l(w) + 1 l(xy) = l(x) + l(y) where x and y are in σ, the set of strings over alphabet σ. Answer: 1. Base case: We must show that l(x emptystring) = l(x)+l(emptystring) for all x σ. l(x emptystring) = l(x) = l(x)+l(emptystring) It is obvious that the base case is true. 2. Recursive step: 12

Assume l(xy) = l(x) + l(y). We must show that l(xya) = l(x) + l(ya) for every a σ. From the original definition: and l(xya) = l(xy) + 1 l(ya) = l(y) + 1 Therefore, with the assumption, we get: l(xya) = l(xy)+1 = (l(x)+l(y))+1 = l(x) + (l(y) + 1) = l(x) + l(ya) 13

Example: Given the definitions of full binary tree as follows: height, for a full binary tree, T : h(t ) = 0, if T consists of only a root. h(t ) = 1+max(h(T 1), h(t 2)), where T 1 and T 2 are full binary trees. number of nodes for a full binary tree, T : n(t ) = 1, if T consists of only a root. n(t ) = 1 + n(t 1) + n(t 2), where T 1 and T 2 are full binary trees. Prove that for a full binary tree, T, n(t ) 2 h(t )+1 1. Answer: 1. Base case: n(onlyroot) = 1 2 0+1 1 Thus the base case holds. 2. Inductive step: Assume that: n(t 1) 2 h(t 1)+1 1 14

n(t 2) 2 h(t 2)+1 1 3. Prove: n(t ) = 1 + n(t 1) + n(t 2) 1 + (2 h(t 1)+1 1) + (2 h(t 2)+1 1) 2 max(2 h(t 1)+1, 2 h(t 2)+1 ) 1 2 2 max(h(t 1),h(T 2))+1 1 2 2 h(t ) 1 2 h(t )+1 1 Thus the proof completes. 15