ebook img

Mathematics for Computer Science PDF

697 Pages·2011·7.28 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” — 2011/5/9 — 20:49 — page i — #1 Mathematics for Computer Science revisedMonday9th May,2011,20:49 Eric Lehman GoogleInc. F Thomson Leighton DepartmentofMathematicsandCSAIL,MIT AkamaiTechnologies Albert R Meyer MassachusetsInstituteofTechnology CreativeCommons 2011, EricLehman,FTomLeighton,AlbertRMeyer. “mcs” — 2011/5/9 — 20:49 — page ii — #2 “mcs” — 2011/5/9 — 20:49 — page iii — #3 Contents I Proofs 1 WhatisaProof? 7 1.1 Propositions 7 1.2 Predicates 9 1.3 TheAxiomaticMethod 10 1.4 OurAxioms 11 1.5 ProvinganImplication 13 1.6 Provingan“IfandOnlyIf” 15 1.7 ProofbyCases 17 1.8 ProofbyContradiction 18 1.9 Good ProofsinPractice 19 2 TheWellOrderingPrinciple 25 2.1 WellOrderingProofs 25 2.2 TemplateforWellOrderingProofs 26 2.3 SummingtheIntegers 26 2.4 FactoringintoPrimes 28 3 LogicalFormulas 35 3.1 PropositionsfromPropositions 36 3.2 PropositionalLogicinComputerPrograms 39 3.3 EquivalenceandValidity 42 3.4 TheAlgebraofPropositions 44 3.5 TheSATProblem 49 3.6 PredicateFormulas 50 4 MathematicalDataTypes 67 4.1 Sets 67 4.2 Sequences 70 4.3 Functions 71 4.4 BinaryRelations 73 5 InfiniteSets 87 5.1 FiniteCardinality 88 5.2 InfiniteCardinality 90 5.3 TheHaltingProblem 95 5.4 TheLogicofSets 98 “mcs” — 2011/5/9 — 20:49 — page iv — #4 iv Contents 5.5 DoesAllThisReallyWork? 101 6 Induction 113 6.1 OrdinaryInduction 113 6.2 StateMachines 122 6.3 StrongInduction 134 6.4 StrongInductionvs. Inductionvs. WellOrdering 138 7 RecursiveDataTypes 159 7.1 RecursiveDefinitionsandStructuralInduction 159 7.2 StringsofMatchedBrackets 163 7.3 RecursiveFunctionsonNonnegativeIntegers 166 7.4 ArithmeticExpressions 169 7.5 InductioninComputerScience 174 8 NumberTheory 183 8.1 Divisibility 183 8.2 TheGreatestCommonDivisor 189 8.3 TheFundamentalTheoremofArithmetic 195 8.4 AlanTuring 197 8.5 ModularArithmetic 201 8.6 ArithmeticwithaPrimeModulus 204 8.7 ArithmeticwithanArbitraryModulus 209 8.8 TheRSAAlgorithm 214 8.9 WhathasSATgottodowithit? 216 II Structures 9 Directedgraphs&PartialOrders 233 9.1 Digraphs&VertexDegrees 235 9.2 DigraphWalksandPaths 236 9.3 AdjacencyMatrices 239 9.4 PathRelations 242 9.5 DirectedAcyclicGraphs&PartialOrders 243 9.6 WeakPartialOrders 246 9.7 RepresentingPartialOrdersbySetContainment 247 9.8 Path-TotalOrders 248 9.9 ProductOrders 249 9.10 Scheduling 250 9.11 EquivalenceRelations 256 “mcs” — 2011/5/9 — 20:49 — page v — #5 v Contents 9.12 SummaryofRelationalProperties 257 10 CommunicationNetworks 279 10.1 CompleteBinaryTree 279 10.2 RoutingProblems 279 10.3 NetworkDiameter 280 10.4 SwitchCount 281 10.5 NetworkLatency 282 10.6 Congestion 282 10.7 2-DArray 283 10.8 Butterfly 285 10.9 Benes˘ Network 287 11 SimpleGraphs 299 11.1 VertexAdjacencyandDegrees 299 11.2 SexualDemographicsinAmerica 301 11.3 SomeCommonGraphs 303 11.4 Isomorphism 305 11.5 BipartiteGraphs&Matchings 307 11.6 TheStableMarriageProblem 312 11.7 Coloring 319 11.8 Gettingfromutov inaGraph 324 11.9 Connectivity 325 11.10OddCyclesand2-Colorability 329 11.11Forests&Trees 330 12 PlanarGraphs 361 12.1 DrawingGraphsinthePlane 361 12.2 DefinitionsofPlanarGraphs 361 12.3 Euler’sFormula 371 12.4 BoundingtheNumberofEdgesinaPlanarGraph 372 12.5 ReturningtoK andK 373 5 3;3 12.6 AnotherCharacterizationforPlanarGraphs 374 12.7 ColoringPlanarGraphs 375 12.8 ClassifyingPolyhedra 377 13 StateMachines 387 13.1 TheAlternatingBitProtocol 387 13.2 ReasoningAboutWhilePrograms 390 “mcs” — 2011/5/9 — 20:49 — page vi — #6 vi Contents III Counting 14 SumsandAsymptotics 401 14.1 TheValueofanAnnuity 402 14.2 SumsofPowers 408 14.3 ApproximatingSums 410 14.4 HangingOutOvertheEdge 414 14.5 Products 426 14.6 DoubleTrouble 428 14.7 AsymptoticNotation 431 15 CardinalityRules 449 15.1 CountingOneThingbyCountingAnother 449 15.2 CountingSequences 450 15.3 TheGeneralizedProductRule 453 15.4 TheDivisionRule 457 15.5 CountingSubsets 460 15.6 SequenceswithRepetitions 461 15.7 TheBinomialTheorem 463 15.8 AWordaboutWords 465 15.9 CountingPractice: PokerHands 465 15.10Inclusion-Exclusion 470 15.11CombinatorialProofs 476 15.12ThePigeonholePrinciple 479 15.13AMagicTrick 484 IV Probability 16 EventsandProbabilitySpaces 515 16.1 Let’sMakeaDeal 515 16.2 TheFourStepMethod 516 16.3 StrangeDice 525 16.4 SetTheoryandProbability 533 16.5 ConditionalProbability 537 16.6 Independence 549 16.7 TheBirthdayPrinciple 555 17 RandomVariables 573 17.1 RandomVariableExamples 573 “mcs” — 2011/5/9 — 20:49 — page vii — #7 vii Contents 17.2 Independence 575 17.3 DistributionFunctions 576 17.4 GreatExpectations 585 17.5 LinearityofExpectation 597 18 DeviationfromtheMean 617 18.1 WhytheMean? 617 18.2 Markov’sTheorem 618 18.3 Chebyshev’sTheorem 620 18.4 PropertiesofVariance 624 18.5 EstimationbyRandomSampling 628 18.6 ConfidenceversusProbability 633 18.7 SumsofRandomVariables 634 18.8 ReallyGreatExpectations 644 19 RandomProcesses 661 19.1 Gamblers’Ruin 661 19.2 RandomWalksonGraphs 667 Index 678 “mcs” — 2011/5/9 — 20:49 — page viii — #8 “mcs” — 2011/5/9 — 20:49 — page 1 — #9 I Proofs “mcs” — 2011/5/9 — 20:49 — 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.