chapter 1, part iii: proofs - western universitylila/discrete/chapter1p3-with-numbers.pdf · is odd...

47
Chapter 1, Part III: Proofs 1

Upload: vankhuong

Post on 02-May-2018

236 views

Category:

Documents


5 download

TRANSCRIPT

Chapter1,PartIII:Proofs

1

Summary� ProofMethods� ProofStrategies

2

Section1.7

3

Sec*onSummary� MathematicalProofs�  FormsofTheorems� DirectProofs�  IndirectProofs

�  ProofoftheContrapositive�  ProofbyContradiction

4

ProofsofMathema*calStatements� Aproofisavalidargumentthatestablishesthetruthofastatement.

� Proofshavemanypracticalapplications:�  verificationthatcomputerprogramsarecorrect�  establishingthatoperatingsystemsaresecure�  enablingprogramstomakeinferencesinartificialintelligence

�  showingthatsystemspecificationsareconsistent

5

Defini*ons�  Atheoremisastatementthatcanbeshowntobetrueusing:

�  definitions�  othertheorems�  axioms(statementswhicharegivenastrue)�  rulesofinference

�  Alemmaisa‘helpingtheorem’oraresultwhichisneededtoproveatheorem.

�  Acorollaryisaresultwhichfollowsdirectlyfromatheorem.�  Lessimportanttheoremsaresometimescalledpropositions.�  Aconjectureisastatementthatisbeingproposedtobetrue.Onceaproofofaconjectureisfound,itbecomesatheorem.However,aconjecturemayturnouttobefalse.

6

FormsofTheorems� Manytheoremsassertthatapropertyholdsforallelementsinadomain,suchastheintegers,therealnumbers,orsomeofthediscretestructuresthatwewillstudyinthisclass.

�  Oftentheuniversalquantifier(neededforaprecisestatementofatheorem)isomittedbystandardmathematicalconvention.

Forexample,thestatement:“Ifx>y,wherexandyarepositiverealnumbers,thenx2>y2”

reallymeans“Forallpositiverealnumbersxandy,ifx>y,thenx2>y2.”

7

ProvingTheorems� Manytheoremshavetheform:� Toprovethem,weshowthatwherecisanarbitraryelementofthedomain,

�  So,wemustprovesomethingoftheform:

8

ProvingCondi*onalStatements:p→ q(0)Theeasycases�  TrivialProof:Ifweknowqistrue,thenp→ qistrueaswell.“Ifitisrainingthen1=1.”�  VacuousProof:Ifweknowpisfalsethenp→ qistrueaswell.“IfIambothrichandpoorthen2 + 2 = 5.”[Eventhoughtheseexamplesseemsilly,bothtrivialandvacuousproofsareoftenusedinmathematicalinduction,aswewillseeinChapter5)]

9

EvenandOddIntegersDefinition:Theintegernisevenifthereexistsanintegerksuchthatn=2k,andnisoddifthereexistsanintegerk,suchthatn=2k+1.Notethateveryintegeriseitherevenoroddandnointegerisbothevenandodd.

Wewillneedthisbasicfactabouttheintegersinsomeoftheexampleproofstofollow.

10

ProvingCondi*onalStatements:p→ q� (1) Direct proof� DirectProof:Assumethatpistrue.Userulesofinference,axioms,andlogicalequivalencestoshowthatqmustalsobetrue.

Example:Giveadirectproofofthetheorem“Ifnisanoddinteger,thenn2isodd.”

11

ProvingCondi*onalStatements:p→ q�  DirectProof:Assumethatpistrue.Userulesofinference,axioms,andlogicalequivalencestoshowthatqmustalsobetrue.

Example:Giveadirectproofofthetheorem“Ifnisanoddinteger,thenn2isodd.”

Solution:Assumethatnisodd.Thenn=2k+1foranintegerk.Squaringbothsidesoftheequation,weget:

n2=(2k+1)2 =4k2 + 4k +1 = 2(2k2 + 2k) + 1= 2r + 1, where r = 2k2 + 2k , an integer. Wehaveprovedthatifnisanoddinteger,thenn2isanoddinteger.

(markstheendoftheproof.SometimesQEDisusedinstead.) 12

ProvingCondi*onalStatements:p→ qDefinition:Therealnumberrisrationalifthereexistintegerspandqwhereq≠0suchthatr=p/q

Example:Provethatthesumoftworationalnumbersisrational.

13

ProvingCondi*onalStatements:p→ qDefinition:Therealnumberrisrationalifthereexistintegerspandqwhereq≠0suchthatr=p/q

Example:Provethatthesumoftworationalnumbersisrational.

Solution:Assumerandsaretworationalnumbers.Thentheremustbeintegersp,qandalsot,usuchthat

Thusthesumisrational.

wherev = pu + qt w =qu≠ 0

14

ProvingCondi*onalStatements:p→ q� (2) Proof by Contraposition�  ProofbyContraposition:Assume¬qandshow¬pistruealso.Thisissometimescalledanindirectproofmethod.Ifwegiveadirectproofof¬q→ ¬p then we have a proof of

p→ q. Whydoesthiswork?

Example:Provethatifnisanintegerand3n+2isodd,thennisodd.

15

ProvingCondi*onalStatements:p→ q�  ProofbyContraposition:Assume¬qandshow¬pistruealso.Thisis

sometimescalledanindirectproofmethod.Ifwegiveadirectproofof¬q→ ¬p then we have a proof of p→ q. Whydoesthiswork?

Example:Provethatifnisanintegerand3n+2isodd,thennisodd.

Solution:Assumeniseven.So,n=2kforsomeintegerk.Thus 3n+2 = 3(2k) + 2 =6k +2 = 2(3k + 1) = 2j for j=3k+1 Therefore3n+2 iseven. Since we have shown ¬q → ¬p ,p → q

must hold as well. Ifnisanintegerand3n+2isodd(noteven),thennisodd(noteven).

16

ProvingCondi*onalStatements:p→ qExample:Provethatforanintegern,ifn2isodd,thennisodd.

17

ProvingCondi*onalStatements:p→ qExample:Provethatforanintegern,ifn2isodd,thennisodd.

Solution:Useproofbycontraposition.Assumeniseven(i.e.,notodd).Therefore,thereexistsanintegerksuchthatn=2k.Hence,

n2=4k2=2 (2k2)andn2iseven(i.e.,notodd).Wehaveshownthatifnisaneveninteger,thenn2iseven.Thereforebycontraposition,foranintegern,ifn2isodd,thennisodd.

18

ProvingCondi*onalStatements:p→ q(3)ProofbyContradic*on�  ProofbyContradiction:(AKAreductioadabsurdum).Toproveq,assume¬qandderiveacontradiction,suchasp∧ ¬p, or anything else that is false. (This is an indirect form of proof.)

Sincewehaveshownthat¬q→Fistrue,itfollowsthatthecontrapositiveT→q also holds.

19

ProofbyContradic*on� ApreviewofChapter4.Example:Useaproofbycontradictiontogiveaproofthat√2 is irrational.

20

ProofbyContradic*on�  ApreviewofChapter4.Example:Useaproofbycontradictiontogiveaproofthat√2 is

irrational. Solution: Suppose √2 is rational. Then there exists integers a and b

with √2 = a/b, where b≠ 0 and a and b have no common factors (see Chapter 4). Then

Therefore a2 must be even. If a2 is even then a must be even (an

exercise). Since a is even, a = 2c for some integer c. Thus, Therefore b2 is even. Again then b must be even as well. But then 2 must divide both a and b. This contradicts our assumption

that a and b have no common factors. We have proved by contradiction that our initial assumption must be false and therefore √2 is irrational .

21

ProofbyContradic*on� ApreviewofChapter4.Example:Provethatthereisnolargestprimenumber.

22

ProofbyContradic*on�  ApreviewofChapter4.Example:Provethatthereisnolargestprimenumber.Solution:Assumethatthereisalargestprimenumber.Callitpn.Hence,wecanlistalltheprimes2,3,..,pn.Form

Noneoftheprimenumbersonthelistdividesr.Therefore,byatheoreminChapter4,eitherrisprimeorthereisasmallerprimethatdividesr.Thiscontradictstheassumptionthatthereisalargestprime.Therefore,thereisnolargestprime.

23

TheoremsthatareBicondi*onalStatements

� Toproveatheoremthatisabiconditionalstatement,thatis,astatementoftheformp↔ q, we show that p → q and q →p are both true.

Example: Prove the theorem: “If n is an integer, then n is odd if and only if n2 is odd.”

Solution: We have already shown (previous slides) that both p →q and q →p. Therefore we can conclude p↔ q.

Sometimes iff is used as an abbreviation for “if an only if,” as in “If n is an integer, then n is odd iff n2 is odd.”

24

Whatiswrongwiththis?“Proof”that1=2.Weusethesesteps,whereaandbaretwoequalpositiveintegers.

25

Whatiswrongwiththis?“Proof”that1=2.Weusethesesteps,whereaandbaretwoequalpositiveintegers.

Solution:Step5.a-b=0 by the premise and division by 0 is unde[ined.

26

LookingAhead�  Ifdirectmethodsofproofdonotwork:

� Wemayneedacleveruseofaproofbycontraposition.�  Oraproofbycontradiction.�  Inthenextsection,wewillseestrategiesthatcanbeusedwhenstraightforwardapproachesdonotwork.

�  InChapter5,wewillseemathematicalinductionandrelatedtechniques.

�  InChapter6,wewillseecombinatorialproofs

27

Section1.8

28

Sec*onSummary� ProofbyCases� WithoutLossofGenerality� ExistenceProofs

�  Constructive� Nonconstructive

� DisproofbyCounterexample� UniquenessProofs� ProofandDisproof� OpenProblems

29

ProofbyCases� Toproveaconditionalstatementoftheform:

� Usethetautology

� Eachoftheimplicationsisacase.

30

ProofbyCasesExample:Leta@b=max{a,b}=aifa ≥ b,anda@b=max{a,b}=b,otherwise.Showthatforallrealnumbersa,b,c(a@b)@c=a@(b@c)(Thismeanstheoperation@isassociative.)

31

ProofbyCasesExample:Leta@b=max{a,b}=aifa ≥ b,otherwisea@b=max{a,b}=b.

Showthatforallrealnumbersa,b,c(a@b)@c=a@(b@c)(Thismeanstheoperation@isassociative.)Proof:Leta,b,andcbearbitraryrealnumbers.Thenoneofthefollowing6casesmusthold.1.  a≥ b ≥ c 2.  a≥ c ≥ b 3.  b≥ a ≥c 4.  b≥ c ≥a 5.  c≥ a ≥ b 6.  c≥ b ≥ a Continuedonnextslideà

32

ProofbyCasesCase1:a≥ b ≥ c(a@b)=a,a@c=a,b@c=bHence(a@b)@c=a=a@(b@c)Thereforetheequalityholdsforthefirstcase.Acompleteproofrequiresthattheequalitybe

showntoholdforall6cases.Buttheproofsoftheremainingcasesaresimilar.Trythem.

33

ExistenceProofs�  Proofoftheoremsoftheform.�  Constructiveexistenceproof:

�  Findanexplicitvalueofc,forwhichP(c)istrue.�  Example:Showthatthereisapositiveintegerthatcanbewrittenasthesumofcubesofpositiveintegersintwodifferentways:

Proof:1729 is such a number since 1729 = 103 + 93 = 123 + 13

GodfreyHaroldHardy(1877-1947)

SrinivasaRamanujan(1887-1920)

34

Nonconstruc*veExistenceProofsExample:Showthatthereexistirrationalnumbersxandysuchthatxyisrational.

35

Nonconstruc*veExistenceProofsExample:Showthatthereexistirrationalnumbersxandysuchthatxyisrational.

Proof:Weknowthat√2 is irrational. Consider the number √2 √2 .

* If it is rational, we have two irrational numbers x and y with xyrational,namelyx=√2 and y = √2.

*But,if√2 √2 is irrational, then we can let x = √2 √2 and y = √2 so that xy= (√2 √2 )√2 = √2 (√2 √2) = √2 2 = 2.

36

Counterexamples� Recall.� Toestablishthatistrue(orisfalse)findacsuchthat¬P(c)istrueorP(c)isfalse.

�  Inthiscaseciscalledacounterexampletotheassertion.

Example:“Everypositiveintegeristhesumofthesquaresof3integers.”Theinteger7isacounterexample.Sotheclaimisfalse.

37

UniquenessProofs�  Sometheoremsassettheexistenceofauniqueelementwithaparticularproperty,∃!xP(x).Thetwopartsofauniquenessproofare�  Existence:Weshowthatanelementxwiththepropertyexists.

�  Uniqueness:Weshowthatify≠x, then y does not have the property.

Example: Show that if a and b are real numbers and a ≠0, then there is a unique real number r such that ar + b = 0.

38

UniquenessProofs�  Sometheoremsassettheexistenceofauniqueelementwithaparticularproperty,∃!xP(x).Thetwopartsofauniquenessproofare�  Existence:Weshowthatanelementxwiththepropertyexists.�  Uniqueness:Weshowthatify≠x, then y does not have the

property. Example: Show that if a and b are real numbers and a ≠0, then

there is a unique real number r such that ar + b = 0. Solution:

�  Existence: The real number r = −b/a is a solution of ar + b = 0 because a(−b/a) + b = −b + b =0.

�  Uniqueness: Suppose that s is a real number such that as + b = 0. Then ar + b = as + b, where r = −b/a. Subtracting b from both sides and dividing by a shows that r = s.

39

ProofandDisproof:TilingsExample1:Canwetilethestandardcheckerboardusingdominos?

Solution:Yes!Oneexampleprovidesaconstructiveexistenceproof.

TheStandardCheckerboard

TwoDominoes

OnePossibleSolution

40

TilingsExample2:Canwetileacheckerboardobtainedbyremovingoneofthefourcornersquaresofastandardcheckerboard?

41

TilingsExample2:Canwetileacheckerboardobtainedbyremovingoneofthefourcornersquaresofastandardcheckerboard?

Solution:� Ourcheckerboardhas64 − 1=63squares.�  Sinceeachdominohastwosquares,aboardwithatilingmusthaveanevennumberofsquares.

� Thenumber63isnoteven.� Wehaveacontradiction.

42

TilingsExample3:Canwetileaboardobtainedbyremovingboththeupperleftandthelowerrightsquaresofastandardcheckerboard?

NonstandardCheckerboard Dominoes

Continuedonnextslideà 43

TilingsSolution:� Thereare62squaresinthisboard.� Totileitweneed31 dominos.� Keyfact:Eachdominocoversoneblackandonewhitesquare.

� Thereforethetilingcovers31blacksquaresand31whitesquares.

� Ourboardhaseither30blacksquaresand32whitesquaresor32blacksquaresand30whitesquares.

� Contradiction!

44

TheRoleofOpenProblems� Unsolvedproblemshavemotivatedmuchworkinmathematics.Fermat’sLastTheoremwasconjecturedmorethan300yearsago.Ithasonlyrecentlybeenfinallysolved.

Fermat’sLastTheorem:Theequationxn+yn =zn

hasnosolutionsinintegersx,y,andz,withxyz≠0 whenever n is an integer with n > 2.

A proof was found by Andrew Wiles in the 1990s.

45

AnOpenProblem� The3x+1Conjecture:LetTbethetransformationthatsendsanevenintegerxtox/2 andanoddintegerxto3x+1.Forallpositiveintegersx,whenwerepeatedlyapplythetransformationT,wewilleventuallyreachtheinteger1.

Forexample,startingwithx=13:T(13)=3∙13 + 1 = 40, T(40)=40/2 = 20, T(20)=20/2 = 10, T(10)=10/2 = 5, T(5)=3∙5 + 1 = 16,T(16)=16/2 = 8, T(8)=8/2 = 4, T(4)=4/2 = 2, T(2)=2/2 = 1 The conjecture has been veri[ied using computers up

to 5.6 ∙ 1013 .

46

Addi*onalProofMethods�  Laterwewillseemanyotherproofmethods:

� Mathematicalinduction,whichisausefulmethodforprovingstatementsoftheform∀nP(n),wherethedomainconsistsofallpositiveintegers.

�  Structuralinduction,whichcanbeusedtoprovesuchresultsaboutrecursivelydefinedsets.

�  Combinatorialproofsusecountingarguments.

47