ebook img

Mathematics for Computer Science PDF

918 Pages·2015·10.31 MB·English
by  
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Mathematics for Computer Science

“mcs” — 2015/5/18 — 1:43 — page i — #1 Mathematics for Computer Science revisedMonday18th May,2015,01:43 Eric Lehman GoogleInc. F Thomson Leighton DepartmentofMathematics andtheComputerScienceandAILaboratory, MassachussettsInstituteofTechnology; AkamaiTechnologies Albert R Meyer DepartmentofElectricalEngineeringandComputerScience andtheComputerScienceandAILaboratory, MassachussettsInstituteofTechnology 2015,EricLehman,FTomLeighton,AlbertRMeyer.Thisworkisavailableunderthe termsoftheCreativeCommonsAttribution-ShareAlike3.0license. “mcs” — 2015/5/18 — 1:43 — page ii — #2 “mcs” — 2015/5/18 — 1:43 — page iii — #3 Contents I Proofs Introduction 3 0.1 References 4 1 WhatisaProof? 5 1.1 Propositions 5 1.2 Predicates 8 1.3 TheAxiomaticMethod 8 1.4 OurAxioms 9 1.5 ProvinganImplication 11 1.6 Provingan“IfandOnlyIf” 13 1.7 ProofbyCases 15 1.8 ProofbyContradiction 16 1.9 Good ProofsinPractice 17 1.10 References 19 2 TheWellOrderingPrinciple 27 2.1 WellOrderingProofs 27 2.2 TemplateforWellOrderingProofs 28 2.3 FactoringintoPrimes 30 2.4 WellOrderedSets 31 3 LogicalFormulas 41 3.1 PropositionsfromPropositions 42 3.2 PropositionalLogicinComputerPrograms 45 3.3 EquivalenceandValidity 48 3.4 TheAlgebraofPropositions 50 3.5 TheSATProblem 55 3.6 PredicateFormulas 56 3.7 References 61 4 MathematicalDataTypes 81 4.1 Sets 81 4.2 Sequences 86 4.3 Functions 87 4.4 BinaryRelations 89 4.5 FiniteCardinality 93 “mcs” — 2015/5/18 — 1:43 — page iv — #4 iv Contents 5 Induction 115 5.1 OrdinaryInduction 115 5.2 StrongInduction 124 5.3 StrongInductionvs.Inductionvs.WellOrdering 129 5.4 StateMachines 130 6 RecursiveDataTypes 173 6.1 RecursiveDefinitionsandStructuralInduction 173 6.2 StringsofMatchedBrackets 177 6.3 RecursiveFunctionsonNonnegativeIntegers 180 6.4 ArithmeticExpressions 183 6.5 InductioninComputerScience 188 7 InfiniteSets 205 7.1 InfiniteCardinality 206 7.2 TheHaltingProblem 215 7.3 TheLogicofSets 219 7.4 DoesAllThisReallyWork? 222 II Structures Introduction 241 8 NumberTheory 243 8.1 Divisibility 243 8.2 TheGreatestCommonDivisor 248 8.3 PrimeMysteries 254 8.4 TheFundamentalTheoremofArithmetic 257 8.5 AlanTuring 259 8.6 ModularArithmetic 263 8.7 RemainderArithmetic 265 8.8 Turing’sCode(Version2.0) 268 8.9 MultiplicativeInversesandCancelling 270 8.10 Euler’sTheorem 274 8.11 RSAPublicKeyEncryption 279 8.12 WhathasSATgottodowithit? 281 8.13 References 282 9 Directedgraphs&PartialOrders 317 9.1 VertexDegrees 319 9.2 WalksandPaths 320 “mcs” — 2015/5/18 — 1:43 — page v — #5 v Contents 9.3 AdjacencyMatrices 323 9.4 WalkRelations 326 9.5 DirectedAcyclicGraphs&Scheduling 327 9.6 PartialOrders 335 9.7 RepresentingPartialOrdersbySetContainment 339 9.8 LinearOrders 340 9.9 ProductOrders 340 9.10 EquivalenceRelations 341 9.11 SummaryofRelationalProperties 343 10 CommunicationNetworks 373 10.1 CompleteBinaryTree 373 10.2 RoutingProblems 373 10.3 NetworkDiameter 374 10.4 SwitchCount 375 10.5 NetworkLatency 376 10.6 Congestion 376 10.7 2-DArray 377 10.8 Butterfly 379 10.9 Benesˇ Network 381 11 SimpleGraphs 393 11.1 VertexAdjacencyandDegrees 393 11.2 SexualDemographicsinAmerica 395 11.3 SomeCommonGraphs 397 11.4 Isomorphism 399 11.5 BipartiteGraphs&Matchings 401 11.6 TheStableMarriageProblem 406 11.7 Coloring 413 11.8 SimpleWalks 417 11.9 Connectivity 419 11.10Forests&Trees 424 11.11References 433 12 PlanarGraphs 473 12.1 DrawingGraphsinthePlane 473 12.2 DefinitionsofPlanarGraphs 473 12.3 Euler’sFormula 484 12.4 BoundingtheNumberofEdgesinaPlanarGraph 485 12.5 ReturningtoK andK 486 5 3;3 12.6 ColoringPlanarGraphs 487 “mcs” — 2015/5/18 — 1:43 — page vi — #6 vi Contents 12.7 ClassifyingPolyhedra 489 12.8 AnotherCharacterizationforPlanarGraphs 492 III Counting Introduction 501 12.9 References 502 13 SumsandAsymptotics 503 13.1 TheValueofanAnnuity 504 13.2 SumsofPowers 510 13.3 ApproximatingSums 512 13.4 HangingOutOvertheEdge 516 13.5 Products 522 13.6 DoubleTrouble 525 13.7 AsymptoticNotation 528 14 CardinalityRules 551 14.1 CountingOneThingbyCountingAnother 551 14.2 CountingSequences 552 14.3 TheGeneralizedProductRule 555 14.4 TheDivisionRule 559 14.5 CountingSubsets 562 14.6 SequenceswithRepetitions 564 14.7 CountingPractice: PokerHands 567 14.8 ThePigeonholePrinciple 572 14.9 Inclusion-Exclusion 581 14.10CombinatorialProofs 587 14.11References 591 15 GeneratingFunctions 627 15.1 InfiniteSeries 627 15.2 CountingwithGeneratingFunctions 629 15.3 PartialFractions 635 15.4 SolvingLinearRecurrences 638 15.5 FormalPowerSeries 643 15.6 References 646 “mcs” — 2015/5/18 — 1:43 — page vii — #7 vii Contents IV Probability Introduction 665 16 EventsandProbabilitySpaces 667 16.1 Let’sMakeaDeal 667 16.2 TheFourStepMethod 668 16.3 StrangeDice 677 16.4 TheBirthdayPrinciple 684 16.5 SetTheoryandProbability 686 16.6 References 690 17 ConditionalProbability 697 17.1 MontyHallConfusion 697 17.2 DefinitionandNotation 698 17.3 TheFour-StepMethodforConditionalProbability 700 17.4 WhyTreeDiagramsWork 702 17.5 TheLawofTotalProbability 710 17.6 Simpson’sParadox 712 17.7 Independence 714 17.8 MutualIndependence 716 18 RandomVariables 739 18.1 RandomVariableExamples 739 18.2 Independence 741 18.3 DistributionFunctions 742 18.4 GreatExpectations 751 18.5 LinearityofExpectation 762 19 DeviationfromtheMean 789 19.1 Markov’sTheorem 789 19.2 Chebyshev’sTheorem 792 19.3 PropertiesofVariance 796 19.4 EstimationbyRandomSampling 800 19.5 ConfidenceversusProbability 806 19.6 SumsofRandomVariables 807 19.7 ReallyGreatExpectations 816 20 RandomWalks 839 20.1 Gambler’sRuin 839 20.2 RandomWalksonGraphs 849 “mcs” — 2015/5/18 — 1:43 — page viii — #8 viii Contents V Recurrences Introduction 865 21 Recurrences 867 21.1 TheTowersofHanoi 867 21.2 MergeSort 870 21.3 LinearRecurrences 874 21.4 Divide-and-ConquerRecurrences 881 21.5 AFeelforRecurrences 888 Bibliography 895 GlossaryofSymbols 899 Index 902 “mcs” — 2015/5/18 — 1:43 — page 1 — #9 I Proofs “mcs” — 2015/5/18 — 1:43 — page 2 — #10

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.