1Chapter0:Introduction,mathematicalnotation,prooftechniques20.2.1StandardSetTheoryreviewAsetisanunorderedcollectionofobjects.Elements(members)DonotdistinguishrepetitionsoftheelementsMultiset-Dodistinguishrepetitionsoftheelements{7,7}and{7}Singleton-mayhaveonlyoneelementTheemptyset–withnoelementatall:ΦNonemptyNaturalnumbersN(0inclusive)IntegersZ3writtenListingRefertoothersetsandproperties456SetoperationsUnion:ABIntersection:ABComplement:ADifference:A-BDisjointSets:AB=Null7LawsandPropertiesCommutativelawAssociativelawDistributivelawAbsorptionlawDemogan’slawIdempotentlaw8SuperSetAcollectionofanysetsSS910CoverageDifferencebetweencoverageandpartition110.2.2sequencesandtuplesHowtoexpressrelationsbetweenobjectsThelanguageofsetsFortheobjectsbelongtotherelationNotheobjectsnotdistinguished12OrderedPairs13Cartesianproduct14Binaryrelation15OrderedtupleOrdered2-tupleorderedpairsOrdered3-tupleorderedtriplesOrdered4-tuplequadruplesOrdered5-tuplequintuplesOrdered6-tuplesextuplesSequenceisanorderedn-tupleforsomeunspecifiedn,wherenisthelengthofthesequence.N-foldCartesianproduct16N-aryrelation1-aryrelationunaryrelations2-aryrelationbinaryrelations3-aryrelationternaryrelations17185compositionQR={(a,b):forsomec,(a,c)Qand(c,b)R}Compositionoff:ABandg:BCisafunctionhfromAtoCsuchthath(a)=g(f(a)).196specialtypesofbinaryrelationsdirectedgraphNodeEdgesNotes:donotallow“parallelarrows”.AdjacentmatrixotherwisefbaifbaM0),(1{],[20PropertiesofrelationsReflexiveSymmetricAsymmetricAnti-symmetricTransitive21ReflexiveArelationRA×Aisreflexiveif(a,a)RforeachaA.Thedirectedgraphrepresentingareflexiverelationhasaloopfromeachnodetoitself.Whatisthecharacteristicsofitsmatrix?Alloftheelementsonthediagonallineofitsmatrixare1.22SymmetricArelationRA×Aissymmetricif(b,a)Rwhenever(a,b)R.Inthedirectedgraphrepresentingasymmetricrelation,wheneverthereisanarrowbetweentwonodes,therearearrowsbetweenthosenodesinbothdirections.Characteristicsofmatrix?Example:{(a,b):aandbarepersonswiththesamefather}23undirectedgraphAsymmetricrelationwithoutpairsoftheform(a,a)isrepresentedasanundirectedgraph,orsimpleagraph.24Asymmetric(非对称性)ArelationRA×Aisasymmetricif:∃(a,b∈A∧(a,b)R→(b,a)R)25Antisymmetric(反对称性)ArelationRA×Aisanti-symmetric:a,b∈A∧a≠b∧(a,b)R→(b,a)RExample1:LetPbethesetofallpersons,{(a,b):a,bPandaisthefatherofb}26TransitiveArelationRA×Aistransitiveifwhenever(a,b)Rand(b,c)R,then(a,c)R.Intermsofthedirectedgraphrepresentation,transitivityisequivalenttotherequirementthatwheneverthereisasequenceofarrowsleadingfromanelementatoanelementz,thereisanarrowdirectlyfromatoz.27EquivalencerelationReflexiveSymmetricTransitive28EachelementofthepartitionisanequivalenceclassofA.29Exampleatable(relation)abouttoybrickssetU={x1,x2,x3,x4,x5,x6,x7,x8}elementsColor(R1)Shape(R2)Size(R3)x1redroundSmallx2bluesquareLargex3redtriangularSmallx4bluetriangularSmallx5yellowroundSmallx6yellowSquareSmallx7redtriangularLargex8yellowtriangularLarge30ApathinabinaryrelationRisasequence(a1,..,an)forsomen1suchthat(ai,ai+1)Rfori=1,…,n-1;thispathissaidtobefroma1toan.Thelengthofapath(a1,..,an)isn.Thepath(a1,..,an)isacycleiftheai’sarealldistinctandalso(an,a1)R.3132Closuresofrelation3334350.2.3function1DefinitionAfunctionfromasetAtoasetBisabinaryrelationRonAandBwiththefollowingspecialproperty:foreachaA,thereisexactlyoneorderedpairinRwithfirstcomponenta.R1={(x,y):xC,yS,andxisacityinstatey}R2={(x,y):xS,yC,andyisacityinstatex}362expressionf:ABf(a)=bArgumentvaluef(a)imageofaunderfDomain373CertainkindsoffunctionsOne-to-one一对一Onto满射Bijection双射384InverseofabinaryrelationR-1NoteTheinverseofafunctionneednotbeafunction.Iffisabijection,f-1isafunction.f-1(f(a))=a,foreachaA;f(f-1(b))=b,foreachbB;39FiniteandInfiniteSetsSizeWecalltwosetsAandBequinumerousifthereisabijectionf:AB.EquinumerosityisasymmetricrelationEquinumerosityisaequivalencerelation1.440finiteIngeneral,wecallasetfiniteif,intuitively,itisequinumerouswith{1,2,…,n}forsomenaturalnumbern.Forn=0,{1,2,…,n}istheemptyset,soisfinite,beingequinumerouswithitself.IfAand{1,2,…,n}areequinumerous,thecardinalityofAisn,insymbol|A|.41infiniteAsetisinfiniteifitisnotfiniteThesetNofnaturalnumbersThesetofintegersThesetofrealsThesetofperfectsquaresNote:Notallinfinitesetsareequinumerous.4243ThreeProofPrinciples44454647480.3typesofProofProofbyconstructionProofbycontradictionProofbyinduction49ExampleProofbyInduction(BaseCase)(InductionHypothesis)(InductiveStep):Nowcorrectlyprovethefollowingstatement:isdivisibleby6.nnNn3,50nnNn3,1.BasisStep:6divides13-1=0,clearly.2.InductionStep:Suppose6|k3-k.Wewanttoprovethat6|(k+1)3-(k+1)too.Notethat(k+1)3-(k+1)=k3+3k2+2k=(k3–k)+3k(k+1).Now,6|k3-kbyassumption.6|3k(k+1)too,since3|3k(k+1)(trivially)and2|k(k+1)(whichisaproductoftwoconsecutiveintegers).Thus6|(k+1)3-(k+1)=(k3–k)+3k(k+1).510.2.5representinformationTheabilitytorepresentinformationiscrucialtocommunicatingandprocessinginformation.Humansocietiescreatedspokenlan