(cid:2) Discrete Mathematics (cid:2) (cid:2) (cid:2) (cid:2) This page intentionally left blank (cid:2) (cid:2) (cid:2) (cid:2) Discrete Mathematics Eighth Edition Richard Johnsonbaugh DePaul University, Chicago (cid:2) (cid:2) 330HudsonStreet,NY,NY10013 (cid:2) (cid:2) Director,PortfolioManagementDeirdreLynch MarketingAssistantJenniferMyers ExecutiveEditorJeffWeidenaar SeniorAuthorSupport/TechnologySpecialistJoeVetere EditorialAssistantJenniferSnyder RightsandPermissionsProjectManagerGinaCheselka ContentProducerLaurenMorse ManufacturingBuyerCarolMelville,LSCCommunications ManagingProducerScottDisanno AssociateDirectorofDesignBlairBrown MediaProducerNicholasSweeney TextDesign,ProductionCoordination,andCompositionSPiGlobal ProductMarketingManagerYvonneVannatta CoverDesignLaurieEntringer FieldMarketingManagerEvanSt.Cyr CoverandChapterOpenerHelenecanada/iStock/GettyImages Copyright(cid:2)c 2018,2009,2005byPearsonEducation,Inc.AllRightsReserved.PrintedintheUnited StatesofAmerica.Thispublicationisprotectedbycopyright,andpermissionshouldbeobtainedfrom thepublisherpriortoanyprohibitedreproduction,storageinaretrievalsystem,ortransmissioninany formorbyanymeans,electronic,mechanical,photocopying,recording,orotherwise.Forinformation regardingpermissions,requestformsandtheappropriatecontactswithinthePearsonEducationGlobal Rights&Permissionsdepartment,pleasevisitwww.pearsoned.com/permissions/. PEARSONandALWAYSLEARNINGareexclusivetrademarksownedbyPearsonEducation,Inc.or itsaffiliatesintheU.S.and/orothercountries. Unlessotherwiseindicatedherein,anythird-partytrademarksthatmayappearinthisworkarethe propertyoftheirrespectiveownersandanyreferencestothird-partytrademarks,logosorothertrade dressarefordemonstrativeordescriptivepurposesonly.Suchreferencesarenotintendedtoimply anysponsorship,endorsement,authorization,orpromotionofPearson’sproductsbytheownersof suchmarks,oranyrelationshipbetweentheownerandPearsonEducation,Inc.oritsaffiliates, authors,licenseesordistributors. Microsoftand/oritsrespectivesuppliersmakenorepresentationsaboutthesuitabilityoftheinformation containedinthedocumentsandrelatedgraphicspublishedaspartoftheservicesforanypurpose.Allsuch (cid:2) (cid:2) documentsandrelatedgraphicsareprovided"asis"withoutwarrantyofanykind.Microsoftand/orits respectivesuppliersherebydisclaimallwarrantiesandconditionswithregardtothisinformation,including allwarrantiesandconditionsofmerchantability,whetherexpress,impliedorstatutory,fitnessfora particularpurpose,titleandnon-infringement.Innoeventshallmicrosoftand/oritsrespectivesuppliers beliableforanyspecial,indirectorconsequentialdamagesoranydamageswhatsoeverresultingfromlossof use,dataorprofits,whetherinanactionofcontract,negligenceorothertortiousaction,arisingoutofor inconnectionwiththeuseorperformanceofinformationavailablefromtheservices. Thedocumentsandrelatedgraphicscontainedhereincouldincludetechnicalinaccuraciesortypographical errors.Changesareperiodicallyaddedtotheinformationherein.Microsoftand/oritsrespectivesuppliers maymakeimprovementsand/orchangesintheproduct(s)and/ortheprogram(s)describedhereinatanytime. (cid:2) (cid:2) Partialscreenshotsmaybeviewedinfullwithinthesoftwareversionspecified.Microsoft WindowsExplorer , andMicrosoftExcel®areregisteredtrademarksofthemicrosoftcorporationintheU.S.A. andothercountries.Thisbookisnotsponsoredorendorsedbyoraffiliatedwiththemicrosoftcorporation. Johnsonbaugh,Richard,1941- Discretemathematics/RichardJohnsonbaugh,DePaulUniversity,Chicago.–Eighthedition. pagescm Includesbibliographicalreferencesandindex. ISBN978-0-321-96468-7–ISBN0-321-96468-3 1. Mathematics.2. Computerscience–Mathematics. I.Title. QA39.2.J652015 510–dc23 2014006017 1 17 ISBN13:978-0-321-96468-7 ISBN10:0-321-96468-3 (cid:2) (cid:2) Contents Preface XIII 1 Sets and Logic 1 1.1 Sets 2 1.2 Propositions 14 1.3 ConditionalPropositionsandLogicalEquivalence 20 (cid:2) 1.4 ArgumentsandRulesofInference 31 (cid:2) 1.5 Quantifiers 36 1.6 NestedQuantifiers 49 Problem-Solving Corner:Quantifiers 57 Chapter1Notes 58 Chapter1Review 58 Chapter1Self-Test 60 Chapter1ComputerExercises 60 2 Proofs 62 2.1 MathematicalSystems,DirectProofs, andCounterexamples 63 2.2 MoreMethodsofProof 72 Problem-Solving Corner:ProvingSomeProperties ofRealNumbers 83 † 2.3 ResolutionProofs 85 2.4 MathematicalInduction 88 Problem-Solving Corner:MathematicalInduction 100 2.5 StrongFormofInductionandtheWell-OrderingProperty 102 Chapter2Notes 109 Chapter2Review 109 †Thissectioncanbeomittedwithoutlossofcontinuity. v (cid:2) (cid:2) vi Contents Chapter2Self-Test 109 Chapter2ComputerExercises 110 3 Functions, Sequences, and Relations 111 3.1 Functions 111 Problem-Solving Corner:Functions 128 3.2 SequencesandStrings 129 3.3 Relations 141 3.4 EquivalenceRelations 151 Problem-Solving Corner:EquivalenceRelations 158 3.5 MatricesofRelations 160 † 3.6 RelationalDatabases 165 Chapter3Notes 170 Chapter3Review 170 Chapter3Self-Test 171 Chapter3ComputerExercises 172 4 Algorithms 173 4.1 Introduction 173 (cid:2) 4.2 ExamplesofAlgorithms 177 (cid:2) 4.3 AnalysisofAlgorithms 184 Problem-Solving Corner:DesignandAnalysis ofanAlgorithm 202 4.4 RecursiveAlgorithms 204 Chapter4Notes 211 Chapter4Review 211 Chapter4Self-Test 212 Chapter4ComputerExercises 212 5 Introduction to Number Theory 214 5.1 Divisors 214 5.2 RepresentationsofIntegersandIntegerAlgorithms 224 5.3 TheEuclideanAlgorithm 238 Problem-Solving Corner:MakingPostage 249 5.4 TheRSAPublic-KeyCryptosystem 250 Chapter5Notes 252 Chapter5Review 253 Chapter5Self-Test 253 Chapter5ComputerExercises 254 †Thissectioncanbeomittedwithoutlossofcontinuity. (cid:2) (cid:2) Contents vii 6 Counting Methods and the Pigeonhole Principle 255 6.1 BasicPrinciples 255 Problem-Solving Corner:Counting 267 6.2 PermutationsandCombinations 269 Problem-Solving Corner:Combinations 281 6.3 GeneralizedPermutationsandCombinations 283 6.4 AlgorithmsforGeneratingPermutationsand Combinations 289 † 6.5 IntroductiontoDiscreteProbability 297 † 6.6 DiscreteProbabilityTheory 301 6.7 BinomialCoefficientsandCombinatorialIdentities 313 6.8 ThePigeonholePrinciple 319 Chapter6Notes 324 Chapter6Review 324 Chapter6Self-Test 325 Chapter6ComputerExercises 326 7 Recurrence Relations 327 7.1 Introduction 327 (cid:2) (cid:2) 7.2 SolvingRecurrenceRelations 338 Problem-Solving Corner:RecurrenceRelations 350 7.3 ApplicationstotheAnalysisofAlgorithms 353 † 7.4 TheClosest-PairProblem 365 Chapter7Notes 370 Chapter7Review 371 Chapter7Self-Test 371 Chapter7ComputerExercises 372 8 Graph Theory 373 8.1 Introduction 373 8.2 PathsandCycles 384 Problem-Solving Corner:Graphs 395 8.3 HamiltonianCyclesandtheTravelingSalesperson Problem 396 8.4 AShortest-PathAlgorithm 405 8.5 RepresentationsofGraphs 410 8.6 IsomorphismsofGraphs 415 8.7 PlanarGraphs 422 † 8.8 InstantInsanity 429 †Thissectioncanbeomittedwithoutlossofcontinuity. (cid:2) (cid:2) viii Contents Chapter8Notes 433 Chapter8Review 434 Chapter8Self-Test 435 Chapter8ComputerExercises 436 9 Trees 438 9.1 Introduction 438 9.2 TerminologyandCharacterizationsofTrees 445 Problem-Solving Corner:Trees 450 9.3 SpanningTrees 452 9.4 MinimalSpanningTrees 459 9.5 BinaryTrees 465 9.6 TreeTraversals 471 9.7 DecisionTreesandtheMinimumTimeforSorting 477 9.8 IsomorphismsofTrees 483 † 9.9 GameTrees 493 Chapter9Notes 502 Chapter9Review 502 Chapter9Self-Test 503 Chapter9ComputerExercises 505 (cid:2) 10 (cid:2) Network Models 506 10.1 Introduction 506 10.2 AMaximalFlowAlgorithm 511 10.3 TheMaxFlow,MinCutTheorem 519 10.4 Matching 523 Problem-Solving Corner:Matching 528 Chapter10Notes 529 Chapter10Review 530 Chapter10Self-Test 530 Chapter10ComputerExercises 531 11 Boolean Algebras and Combinatorial Circuits 532 11.1 CombinatorialCircuits 532 11.2 PropertiesofCombinatorialCircuits 539 11.3 BooleanAlgebras 544 Problem-Solving Corner:BooleanAlgebras 549 11.4 BooleanFunctionsandSynthesisofCircuits 551 11.5 Applications 556 †Thissectioncanbeomittedwithoutlossofcontinuity. (cid:2) (cid:2) Contents ix Chapter11Notes 564 Chapter11Review 565 Chapter11Self-Test 565 Chapter11ComputerExercises 567 12 Automata, Grammars, and Languages 568 12.1 SequentialCircuitsandFinite-StateMachines 568 12.2 Finite-StateAutomata 574 12.3 LanguagesandGrammars 579 12.4 NondeterministicFinite-StateAutomata 589 12.5 RelationshipsBetweenLanguagesandAutomata 595 Chapter12Notes 601 Chapter12Review 602 Chapter12Self-Test 602 Chapter12ComputerExercises 603 Appendix 605 A Matrices 605 (cid:2) (cid:2) B Algebra Review 609 C Pseudocode 620 References 627 Hints and Solutions to Selected Exercises 633 Index 735 (cid:2)
Description: