Professional Documents
Culture Documents
Qand » " aa andsOland acer eee is Nona Case (ii), I < 0 and » Teen and +1 > 0 the < Oand@ > 1, Hence PRO We eunrare a0 Se es <2 Otte m fact r of a positive number asin oy > 0. Since © < O and the product ; 2041) <0. Than at pei number is negative, it follows that 4 . ) whe0.4. METHODS OF PROOF my 0.4.3 Contrapositive Law, P <> Qs equivalentto NOT Q = Nor iE Proof. g P; > @ || NOTQ | Nor? | NOT Q =$ NOT P 5 y + F I F T v 1 " F T im T T We sce from the truth table that P => Q is equivalent to NOT Q = NOT P. fe} For example, the contrapositiv is the statement ‘If I same thing. of the statement ‘If it rained then 1 would be wet. am not wet then it has not rained,’ These statements mean the 0.4.4 Contrapositive Method of Proving P = Q. This method uses the Contrapositive Law above, We assume that @ is false and use this to prove that P is false. PROPOSITION. Let n be an integer, If n® is odd then n is odd. Proof. Suppose that n is not odd; that is, suppose n is even. Then n3 will also be even; that is n° is not odd. Hence we have shown NOT (nis odd) => NOT (n° is odd). The contrapositive is n® is odd => nis odd which is what we had to prove. oO 0.4.5 Proof by Contradiction. In the proof technique called proof by contradiction we assume that the statement We want to prove is false, and then show that this implies a contradiction. For example, suppose we wanted to prove the statement Q. qt we can show that NOT Q leads to a contradiction, then NOT Q must be false; that is, Q must be true, PROPOSITION, There is no real solution to a = Gx + 10=0. Proof, This result can be stated symbolically as NOT (a2 «? —6x+10=0) where the universe of discourse is the set of real numbers.14 CHAPTER 0. LOGIC AND moe ‘Assume thatthe rest is false} that is, Assume that there iy a number .# with «2 = Gx + 10 = 0. Then, by completing the Square, we 0.5. COU can write this as é Sa (@-374 1 = 01 xaot However (1 — 8)? > 0, $0 the left side of this equation fs greater than 047 1 grequal 1 1. This ives a contradiction. Hence the original statement, The true, oO each cai e we wanted to prove the Q Altematively, suppose we wan I VO P and NOT Q, and show that this leads to a co c AND Not, 05 Hence NOT(P AND NOT Q) is true. T i i P. Example 0.1.6, this is equivalent to P => @ being true, YOR GQ, proposition. If. isa real number such that «* +72? < 9 then show that < 1.1. Proof, Suppose that is a real number such that x9 + 72? < 9, but s r < 1.1 is not true; thatis @ > 1.1, It follow that as 4722 > 11%+7(1.1)? = 13314847 = 9801. a is: However this gives a contradiction to the assumption that 28 + 72? <9, E, Hence the original result is true. o Pl ‘This example could also be proved by using the contrapositive law. Other good examples of proof by contradiction are Proposition 1.5.2, Euclid’s Theorem 1.5.3, and Theorem 4.2.1. 0.4.6 Proving P => (Q OR R). The statement Q is either true or false. If Q is true then P —> (Q OR R) is true, regardless of the truth values of P and R. We therefore only have to prove the result when Q is false. The method of proof therefore consists of assuming that P is true: and NOT Q is true, and using these to prove that Fis true. The theorem is equivalent: to the statement (P AND NOT Q) = R. PROPOSITION. Let m and n be integers. If m® + n® is odd then m is odd or n is odd, Proof. Suppose that m® + n* is odd, and that mis not odd. Therefore mis even and so m* will also be even. Hence m3 +n3 — m3 =n} will be odd: By the result in subsection 0.4.4 it follows that n is odd, and we have shown a (m? +n is odd) AND NOT ( This is equivalent to the stat (m® + n¥ is odd) —s ( mis odd) => (n is odd). tement that was to be K proved, namel: mis odd ) OR (nis odd), ‘0.5. COUNTEREXAMPLES Another good example of this type of proof is in Theorem 1.5.4 em 1.5.4, P => (Q AND R). ican be split Up into the two ases, P fl D be proved separately, = Q,and P = R, and then 0.5 COUNTEREXAMPLES Sometimes a conjectured result in mathematics i , be able to prove it. However, we could Feito uianrova Faroe we would not negation is true. If the conjectured result is of the form ¥ Ple\ uae ia habits E_NOT (Wz F(q))) whichJby ite Olen exiyeBatrenlresiee Oe) eeanavateatta o NOT F(a): Hence'to disprovelthe slatement Ve E()iwelenly have rh ae F such that P(zo) is false, This 29 is caled a counterexample the conjecte RoEeN conjecture If the conjectured result is of the form Vz P(x) =} Q(z) then its negat soa or (ie) => OCs) ick area mas aa ment 3r (P(2) AND NOT Q(c)). Hence arp is a counterexample to the conjecture if (zo) is true while Q(t) is false. EXAMPLE. Let a be a real number. Disprove the statement: if? > 9 then > 3. Solution. One counterexample to the statement is obtained by taking 9 = —4, since 23 = 16 > 9and zp < 3. This counterexample disproves the statement. Note that if we wanted to disprove an. existence statement such as Sx P(x) then its negation is NOT (Az P(a)), which is equivalent to Vx NOT P(z). In this case we cannot use a counterexample, because we have to show that P(x) is false for all values of x.[ 16 CHAPTER 0. LOGIC AND PRooy Exercise Set 0 166. Determine which af the following sentences are statements. What are the truth values of those that are statements? LT>5. 3. 185 > 7? 5, Show that V/2 is not an integer: 7 4, J/2is an integer. 6. If 5 is even then 6 bles for each expression. 7. NOT(NOT P) 8. NOT(P OR Q) P= (QORR) 10. (P AND Q) => R . (POR NOT Q) => fe 12, NOT P => (Q => Ry 7-12. Write down the truth ta} Fre 13, P UNLESS Qs defined as (NOT Q) =+ P. Show that this statement has same truth table as P OR Q. Give an example in common English showing equivalence of P UNLESS Q and P OR Q. 14. Write down the truth table for the exclusive or connective XOR. | 15, Write down the truth table for the not or connective NOR. 16, Write down the truth table for the nor and connective NAND- 17-21. Write each statement using P, Q, and connectives. 17. P whenever Q. 18. P is necessary for Q. 19. Pis sufficient for Q. 20. P only if Q. 21. P is necessary and sufficient for Q. 22, Show that the statements P AND (Q AND R) and (P AND Q) AND R have the same truth tables, Th the associative law for AND. 23, Show that the statements ? AND (Q OR R) and (P AND Q) OR (P AND R) have the same truth tables, This is a distributive lav. 44, Is (P AND Q) => R equivalent to P => (Q => R)? Give reasons. 25 - 28, Let P be the statement ‘Wt is ing! ab s is snowing,’ and let Q be the statement ‘It is freezing, Write each statement using P, Q, and connectives. 25, If'itis snowing, then it is freezing, 26, Itis freezing when it is snowing, 27. Itis freezing but not snowing, 28. When it is not freezing it is not Snowing.EXERCISE SETO v7 29-32. Let P be the statement ean wat tk G Jog.’ and R be the statement V take the tree” ivan anneal hae broken my SS CGD sRatiomene at am English 29, Q =+ NOT P 8, a. R= (QORNOTP) 2 Res (an 1 wee Py 33-36, Express each statement as ato 33 gical expr universe of discourse. Tension Maing couaniiers. State the 33. There isa smallest positive integer. 34, There is no smallest positive real number. 35. There exists an integer that is larger th: legers, ran the product of 36, Every pair of integers has a common divisor. a "ae. 37-40. Negate and simplify each expression. 37. Vz (P(z) OR Q(z) 38. ¥z ((P(z) AND Q(z)) = Riz) 39. Sr (P(z) => Q(z) 40. x Yy (P(z) AND Qiy) 41 - 44. If the universe of discourse is the real numbers, what does eacle statement mean in English? Are they true or false? 42, 3r3y (z>y). 41. Vrvy (r>¥)- 44. Vr3y (2>y)- 43. 3y¥r (c>y)- 45-48. Determine whether each pair of statements is equivalent Give reasons (Ar P(z)) OR Gz Qe) 45, 3r (P(z) OR Q(z) 46. 32 (P(z) AND Q(2)) (@r P(z)) AND Ge Qiz)) 47. Vz (P(z) OR Q()) (Ve P(z)) OR (¥z Q=)) 48. ‘Vz (P(z) OR QUy)) (Vr P(z)) OR QW) 49, If A, B and C are sets, the statement A) B.C © can be expressed as, Va ((c € AAND& €B) =r). Express and simplify the negation of this expressions namely ANB E Cin terms of quantifiers. 50, If A and B are sels, the statement A = B canbe expressed as Vic (we Ace vB). f expressing this ) Give different ways 0) sets are not the same? What does A # B mea af fiers, How would you go about showing that two using quanti-po we a 34. uw a 56-60. Write the contrapositive of each statement. The definition of the limit of a function, Tim, f(7) . Show that the statement P => (Q AND R) is equivalent to the st | Show that the statement P AND Q AND RF is equivalent to the si . If Ido my assignments then I will get a good mark in the course. . If > 3 then 2? > 9. . If < —3 then 2? > 9. ). Ifa number is divisible by 2 then it is not prime. ). If > Nandy > 0 then xy > 0. . Leta and) be real numbers, Prove that if ab = 0 then a = 0 orb = 0. , Let A and B be sets, Prove that if « ¢ AM B thenax ¢ A ora ¢ B. CHAPTER 0. LOGIC AND PROOFS LL, can be expressed Usiny quantifiers Yes 0 A> 0 Ve (0<|n=al <6 => If) 1 <6), Use quantifiers to express the negation of this statement, namely Jim Sa) #L. Show that the sta a P =>» (QOR R) is equivalent to the statem (P AND NOT Q) = [This explains the proof aoe 0.4.6 for P =» (Q OR R).) (P = Q) AND (P = 1), [This explains the Sestnalloao 4.7 for P => (Q AND R). Is the statement P => (Q => R) equivalent to SS 0)—an Give reasons. (NOT P AND NOT Q) => R).Chapter 1 Integers and Diophantine Equations Throughout this chapter, all the numbers that are used will be integers. The basic tool in this chapter is the Division Algorithm, We use it to demonstrate the Euclidean aE gorithm, which in turn enables us to solve linear Diophantine equations. The Division Algorithm is also used to represent numbers to different bases. The Unique Factor ization Theorem, which is also called the Fundamental Theorem of Arithmetic, states that any integer can be factored into primes in a unique way, and the proof of this result depends on the Division Algorithm. 1.1 THE DIVISION ALGORITHM subtracted property that any two elements can be added, ill be an integer. However, division of if the quotient is also to be an integer. The set of integers, Z, has the and multiplied together, and the result will st one integer by another is not always possible, 1.1.1 Definition. If a,b € Z, we say that a divides b, and write this symboli- cally as alb, if there exists q € Z such that b = qa. A Alternative ways to express this are t say that a is a factor of 6 or that b is a multiple of a, If no integer q exists such that b = qa we say that a does not divide b and write a { b. Hence —3/12 because 12 = (—A)( be noted that with this definition 0|0 because 0 = q0, where q can becl integer. However 0 { 4 because there is no integer q such that = 40. ; We now prove some elementary properties of this divisibility relation. 19 7) —Tand 4|0. It should —$), Also 5|10, 7|7, ) 4 | hosen to be any20 CHAPTER 1. INTEGERS AND DIOPHANTINE EQUAT; 1.1.2 Proposition. Leta,b,ce Z. ( Iajb and ble then ale, Gi) Ifa) and ale then al(ba + ey) for any ,y € Z. In particular al(b +e) a\(b—c). (iii) Tfa|b and bla then a = +b, a (iv) Ifa|b, anda and b are positive integers, then a < b. e of Proof, (i). Wf.a|b and b[c then there exist qr € Z such that 6 = qa and ¢ = 1} ef Hence c = rqa and, because rq € Z, it follows that ale. (ii). If a|b and ale then there exist g,r € Z such that b = ga and c= ra. Ne br + cy = (qx + ry)a and, since qx + ry € Z for any x,y € Z, it follows a|(bx + cy). (iii), If ab and bla then there exist g,r € Z such that b = qa and a = rb. Hen ga and 0 = a(rq —1). Ifa £0 then rq must be 1 andr = q = +1. Therefc a= +b, On the other hand, if a = 0 then b = q0 = 0 anda = b. (iy). Ifalb then there exists q € Z such that b = ga. Ifa and b are positive integer so is q. In particular g > 1 and hence b = qa > a. Even if the integer b cannot be exactly divided by the integer a, we can try to divide b by a and obtain a remainder, This familiar process is known as the Division Algorithm. 1.1.3 Division Algorithm. Ifa, € Z where a > 0, then there exist uniq integers q andr such that b = qa+r where O0 0, the element b — 0a = b € 3” and, if <0, the element b= ba = (=1)(a— 1) > Oand belongs to ne One of the properties of the integers is that every nonempty set of nonnegative numbers contains a smallest clement. Let r be the smallest element of $” and let q be the integer such that b — ga =r. Since all the elements of 9! are nonnegative, 7 > 0. Furthermore r < a, otherwise r — a = (b — qa) —a =b — (q+ 1Ja would ‘be a nonnegative integer smaller than r but in the set 9’, We have therefore shown the existence of integers q andr with b= qa+rand0 0, we can find these by ordinary long division with remainder. If < 0, use long division to divide —b by a to obtain =b = datr’ where 0 0, He und r such that Division Algorithm can be applied to ~a.to obtain unique integers 4 & b = g(-a)+r where 0 0; that nm < 4 will yield all the nonnegative (#,u) = (4,9), (9,7), (14,5), (19,3) or (24, 1). Hence the second item could be paid for in exactly in five di i yin five different wa the customer has at least 24 dimes and 9 quarters, ae What do the negative solutions mean in this case? If we put n = —1, we obtain the solution 2 = —1, y = 11, This corresponds to the situation in which the customer offers 11 quarters and receives one dime in change, 1.3.7 Example. A hallway 5 metres long is to be tiled with strips of tile of widths 8 ems and 18 ems. In how many ways can this be done, without cutting some of the tiles to different widths? Solution. If x strips of tile of width 8 cms and y strips of width 18 ems exactly fill the length of the hallway then 8r+18y = 500. Thatis, dividing by the GCD(8, 18) = 2, 4c 4+9y = 250. By inspection, we see that one solution to the equation 4a + 9y = lisa = —2,y = 1. Hence one solution to our desired equation is x = —500,y = 250. This is clearly not a feasible solution because it is impossible to have a negative number of tiles. However, this particular solution will allow us to obtain the general integral solution. This is « = —500 + 9n, y = 250 — 4n, where n € Z. The only workable solutions occur when zr and y are nonnegative. Hence we need —500+9n > 0 and 250—4n > 0; that is Since n must be integral, it follows that 56 1,2 > qo > gi > +++, and the quotients form a strictly decreasing se ‘of nonnegative integers, which must eventually reach zero. Using this list of eqt we can write 2 = gob+ro (abtr)b+ro = ab? +rib+ro (qb +72) +rib+ro = qb? + rab? + rib ro p= tbl tryb8) oe rab? + rib + ro and this is the required expression. To show that the expression if unique, suppose that 2 = Wert Dro = Sinbl boosh sib $0 where 0 < rj . Check. (1406); =1-7° +4-7? +0-7+6 =343 + 196 +6 = 545. (1000100001) = 2° + 2° + 2° = 512 + 324+ 1=545. o Each digit in a number in the base b can be any one of the symbols 0, 1,....5—1 and therefore numbers in base b require b symbols to represent them. If the base is Jarger than 10, new symbols are required to represent some of the numbers. 1.4.3 Example. Using the symbols A for ten and B for eleven, express (1AAB9) » in the decimal system, and express 1511 in base 12. Solution, (1AAB9);. = 1(12)' +10(12)$ + 10(12)? + 11-12+9 20736 + 17280 + 1440 + 132+ 9 = 39597. To express 1511 in base 12, repeatedly divide by 12 to obtain 1511 = 125-12+11 125 10-12+5 10 0-12+10. Hence 1511 = (A5B),2.38. CHAPTER 1. INTEGERS AND DIOPHANTINE EQUATIOy, Check. 39597 = 3209-1249 3299 = 274-124 11 - Wd = 22-12410 re 22)= 1+12410) ie 1 = 01241, wr (A5B)12 = 10+ 12? 45-124 11 = 1440 +604 14 = 1511, i 1 of Arithmetical calculations can be performed in base b without reference to bas es ifthe addition and multiplication tables for base b are known. The tables for base: as follows. Remember that only the digits 0, 1, 2.and 3 are used in base 4 arith Base 4 Addition Table Base 4 Multiplication Table + On Oi Oh aa oe (Ms | a (ya 1. Qs] Ga (0). 1), 4] Qs (0), (Ba | (10). (11), (12), (3) | Bs _(2)s a f 1.4.4 Example. — Calculate the sum and product of (2031), and (332), base 4. Ee f Solution. (2031), (2031). Z + (632), x_ (832), as (8023); (0122); Tee (122130), (1221300), (2020212), ce heck (2031), = 2-4? + 3-4 +1 = 141 and (832), = 3-44 3-4-2 = (3023), =3- 4942-443 = 209 = 1414.60, Me g (2020212) = 2-49 42-44 42.4? +442 = 8749 = 141.62, s te 1.5 PRIME NUMBERS be n Or Mf the most ij a o pee ino pan class of numb ss of ofa) mute Me Fs pa be clon k lumbers which ea Beer vcled Prime numbers, ‘They form the basic building blocks of us mM, because any other integer can be written as a product of primes. 15.1 Definition, —Aninteperp > 1. ing 7 The first few primes are 2, 3, 5, 7, 11 while 4 < P 5 88,10 = 2-5 are composite, The inewer | a caer 2 8 = 222 a facior 1 i$ of no in, leger | is neither prim i ereSt in any product ne nor composi1.5, PRIME NUMBERS: PF 1.5.2 Proposition. — Every integer > 1 can be expressed as a product of primes, Proof, Suppose that the result is false and let NV be the ‘smalle; 1, that cannot be written as a product of primes, V cannot be write N = rs where 1 <1 < 8 < N, By our hypothesis, that cannot be written as a product of primes; hence r and. ci of primes. It follows that V = 7 s can also be written contradiction shows that our hypothesis is false and the t St integer, greater than prime itself, so we can N is the smallest integer “an be written as a product aS a product of primes, This fheorem must be true, Ttis natural to wonder whether there are only a finite number of primes or whether the set of primes is infinite, This question was answered by Euclid in about 300 Bc. and the following proof is essentially the same as his, : 1.5.3 Euclid’s Theorem. — There are an infinite number of primes. Proof. Suppose that there are justa finite number of primes, say ps, ‘ a Pa, P3y---sPn- Consider the integer N=pi-Po-Pa--- Ppt] This is not a prime because itis larger than all the primes p1, po, p3,-.-.Pp. On the other hand, V is not divisible by any of the primes pj, for 1 < i < n:if p,|.V then p,\(N — pi - ++ Dp) and so pi|1, which is impossible. Therefore NV cannot be written as a product of primes, contrary to the previous theorem. Hence our original supposition must be false and the theorem is true. Oo There is no known efficient procedure for finding prime numbers. A tedious pro- cess known as the sieve of Eratosthenes will yield all the primes less than any gi number NV. It consists of writing down all the numbers from 2 to N — 1. Leave 2 alone and cross out every second number (that is, composite numbers that are mul- tiples of 2). The next remaining number, namely 3, will be prime; Keep it and cross Out every third number starting from 3 (that is, composite multiples of 3). The next remaining number, namely 5, will be prime; Keep it and cross out every fifth num- ber after 5. If we proceed in this way we will eventually cross out all the composite numbers and all the primes less than N’ will remain, h ‘The following important result shows that if a prime divides a product then it must divide one of the factors, This is not true for composite numbers; for example 6/15 +4 but6 {15 and6 +4, 15.4 Theorem, — Ifpis.a prime and plab then pla or pb. x wee the only) Proof, Suppose that the prime p divides ab but does not divide a. Sin eae Positive divisors of the prime p are 1 and p, the only positive common: is 1; hence GCD(a,p) = 1, It now follows from Theorem 1.2.8 that p[d. aos either pla or plb,|, INTEGERS AND DIOPHANTINE EQUATIONS CHAPTER i. I. apne Lit numbers i i rimes is to enable us to spl i f the reasons for introducing P! aS fe Saar ‘are as small as possible, We shall now eae aa “ca vrtten asa proiactof primes in essentially only one Way. i may apa ob A vr rbilyHeease you Rae never een a number being factored ino pri j 1. eee ways, (This can be seen by looking at the set ol real i nb j : cs bV5 | a,b € Z) instead of the set of integers Z, In 3, a e factoret 4 p EWE. 1) aswell as 2» 2,and the numbers 2, ¥5-+ Land v5 — 1 cannot 5 =l)a s i he set 9.) er factored, and so are “primes” int 7 -" ae multipli commutative, the prime factors in any factorization can be written in different orders; for example, 45 3° b=3+ 5 . 3. Hone i er : the factorization of integers is unique, This Unique Factorization 1e01 ic E itis often referred to as the Fundamental Theorem of Arithmetic, 1.5.5 Unique Factorization Theorem. Every integer, greater than 1, be expressed as a product of primes and, apart from the order of the factors, this expression is unique, E Proof, The existence ofthe factorization was shown in Proposition 1.5.2. fi Now suppose that an integer « can be factored into primes in two ways as. fe & = piparssPn = 4192°''dm where all the p's and q's are primes. Since px, p1|q1q2 +> - @m- By repeated applica: tion of Theorem 1.5.4, it follows that p; divides at least one of the q’s. If necess rearrange the q's so that p:|g1. Since q is prime and py is a nontrivial factor, it foll that p, = q1. Cancelling p; and q, we have P2P3***Pn = 4243 +*" Gm w By continuing in this way, we see that each p must be paired off with one of the q's P Until there are no factors on either side, Hence n = m and, apart from the order of the factors, the two expressions for are the same, th a eo “hat this theorem does not provide an algorithm for finding the prime factors, i fllowingresal shows that we can determine whether an integersr has any factory | Boe 7 lsby checking whether itis divisible by all the primes le 1.5.6 Theorem, i evi. An integer > 1 is either Prime or contains a prime factor Proof, ; ; fret Sayers that p is is Smallest prime factor of 2, Ifa is composite, we eat ere a and b are positive integers b , smallest prime fase “gers between | and a, Since p is th A> p,b> panda =ab > p? a se 2 p*, Hence p pr lenes, we only have to the