Download presentation
Presentation is loading. Please wait.
1
EE1J2 - Slide 1 EE1J2 – Discrete Maths Lecture 12 Number theory Mathematical induction Proof by induction Examples
2
EE1J2 - Slide 2 Integers and Number Theory Recall that the ℤ denotes the set of integers {…-2, -1, 0, 1, 2…} We take for granted the fact that it x and y are integers, then x + y and x y are also integers Mathematicians say that the set of integers is closed under addition and multiplication Number Theory is concerned with properties of the integers with the operations ‘+’ and ‘ ’
3
EE1J2 - Slide 3 Properties of + and ℤ together with + and has several properties which we take for granted: If x=a and y=b then x+a=y+b and x y=a b a+b= b+a and a b=b a (Commutative Laws) (a+b)+c=a+(b+c) and (a+b)+c=a+(b+c) (Associative Laws) a (b+c)=a b + a c (Distributive Law)
4
EE1J2 - Slide 4 Properties of + and (cont.) There exist unique integers 0 and 1 such that a ℤ, a+0=0+a=a and a 1=1 a=a 0 is called the additive identity 1 is called the multiplicative identity For every a there is an integer –a such that a+(-a)=(-a)+a=0 (-a is the additive inverse of a) If a b=a c and a 0, then b=c
5
EE1J2 - Slide 5 { ℤ,+, } Sometimes use the notation { ℤ,+, } as a reminder that number theory is concerned not just with the integers, but also with + and { ℤ,+, } is a common domain of discourse for Predicate Logic
6
EE1J2 - Slide 6 Example Suppose P(x) = ‘x is even’ Then, x:(P(x) P(x 2 )) x:(P(x 2 ) P(x)) are statements in Predicate Logic for which the domain of discourse is { ℤ,+, }
7
EE1J2 - Slide 7 Proofs in Number Theory Consider the statement x:(P(x) P(x 2 )) A formal proof of the validity of this statement requires many steps (see, for example, Anderson, p 106) In practice many of these steps are missed out and a typical ‘acceptable’ proof might look as follows:
8
EE1J2 - Slide 8 Proof of x:(P(x) P(x 2 )) Let x be even Then there exists y ℤ such that x=2 y (this is the definition of an even number) Therefore x 2 =( 2 y) 2 =(2 y) (2 y) =2 (2 y 2 ) So, if z= 2 y 2 then x 2 =2z Therefore x 2 is even.
9
EE1J2 - Slide 9 Proof of x:(P(x 2 ) P(x)) In this case we’ll use ‘Equivalence of Contrapositive’ I.e. a b b a So, proving P(x 2 ) P(x) is equivalent to proving P(x) P(x 2 )
10
EE1J2 - Slide 10 Proof of P(x) P(x 2 ) Assume P(x). In other words x is odd Then there exists y ℤ such that x=2 y+1 So, x 2 =( 2 y+1) 2 =4 y 2 + 4 y + 1 Let z=2 y 2 + 2 y Then x 2 =2 z + 1, so x 2 is odd. I.e. P(x 2 ) is true So P(x) P(x 2 ), hence P(x 2 ) P(x)
11
EE1J2 - Slide 11 Mathematical Induction Let P(n) be the predicate This is true for particular values of n, e.g:
12
EE1J2 - Slide 12 Mathematical Induction Want to show that P(n) is true for all integers n I.e.: n:P(n) The easiest way to prove such a statement is to use the method of proof by induction
13
EE1J2 - Slide 13 Mathematical Induction If P(1) is true …and for all k, P(k) P(k+1) Then P(n) is true for all values of n This is the principle of mathematical induction
14
EE1J2 - Slide 14 Proof by Induction Intuitively… 1. Show that P(k) P(k+1) for any k 2. Show that P(1) is true 3. Then from 1 and 2, P(2) is true 4. …and from 1 and 3, P(3) is true 5. …and from 1 and 4, P(4) is true 6. etc
15
EE1J2 - Slide 15 Example 1 Case n=1:, so P(1) is true Now assume P(k) is true Need to show P(k+1) is true I.e. need to show that
16
EE1J2 - Slide 16 Example 1 (continued) Step 1: Write S(k+1) in terms of S(k) Step 2: Use the fact that P(k) is true Step 3: Manipulate to get the right formula
17
EE1J2 - Slide 17 Example 1 (concluded) So, Therefore P(k+1) is true Therefore, by the principle of mathematical induction, n:P(n)
18
EE1J2 - Slide 18 Example 2 Let P(n) be the predicate defined by: P(n): ‘n 3 -n is divisible by 3’ Show that n:P(n) Case n=1: n 3 -n=1-1=0, which is divisible by 3. Hence P(1) is true Now assume that P(k) holds Need to prove that P(k+1) holds
19
EE1J2 - Slide 19 Example 2 (continued) Case n=k+1: (k+1) 3 - (k+1) = (k 3 +3k 2 +3k+1) - (k+1) = (k 3 -k)+(3k 2 +3k) = (k 3 -k) + 3(k 2 +k) Divisible by 3 since P(k) is true Clearly divisible by 3
20
EE1J2 - Slide 20 Example 2 (concluded) Hence if k 3 -k is divisible by 3, then (k+1) 3 -(k+1) is also divisible by 3 In other words, k:(P(k) P(k+1)) Also, P(1) is true Therefore, by mathematical induction, n:P(n)
21
EE1J2 - Slide 21 Example 3 Let P(n) be the predicate ‘if S is a finite set such that |S| = n, then |P(S)|=2 n ’ Claim: n:P(n) This is another way of saying that for any finite set S, |P(S)| = 2 |S| (See lecture 7, slide18)
22
EE1J2 - Slide 22 Example 3 (continued) Case n=1: If |S|=1, then S has just one element, x say. Then S = {x} In this case P(S)={ ,S}, so |P(S)|=2=2 1 =2 |S| Hence P(1) is true Now assume P(k) is true for some k In other words, if S is a set such that |S| = k, then |P(S)|=2 k
23
EE1J2 - Slide 23 Example 3 (continued) Let S k+1 be a set such that |S k+1 |=k+1 Write S k+1 = {x 1, x 2,…,x k+1 } = S k {x k+1 }, where S k = {x 1, x 2,…,x k } We can write P(S k+1 ) = P k P k+1, where: P k is the set of subsets of S which don’t include x k+1 P k+1 is the set of subsets of S which do include x k+1 But P k =P(S k ), so | P k |=|P(S k )|=2 k by assumption
24
EE1J2 - Slide 24 Example 3 (continued) Now consider P k+1, the set of subsets which include x k+1 Every subset in P k+1 must arise by taking a subset of S k and adding x k+1 to it …so | P k+1 | = |P(S k )| = 2 k Hence | P(S k+1 )| = |P k | |P k+1 | = 2 k + 2 k = 2 2 k = 2 k+1
25
EE1J2 - Slide 25 Example 3 (concluded) Hence P(1) is true, and if P(k) is true then P(k+1) is also true Hence, by mathematical induction, n:P(n)
26
EE1J2 - Slide 26 Notes Mathematical induction can only be used to prove arguments for which the domain of discourse is the positive, whole numbers. For example, if P(b) is the predicate: the roots of the equation x 2 +bx+1 are given by Then b:P(b) is true, but cannot be proved by induction
27
EE1J2 - Slide 27 Summary Properties of the integers Proof by induction
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.