1. Trang chủ
  2. » Thể loại khác

Mahtematics for computer science

800 396 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 800
Dung lượng 7,69 MB

Nội dung

“mcs” — 2012/1/4 — 13:53 — page i — #1 Mathematics for Computer Science revised Wednesday 4th January, 2012, 13:53 Eric Lehman Google Inc F Thomson Leighton Department of Mathematics and the Computer Science and AI Laboratory, Massachussetts Institute of Technology; Akamai Technologies Albert R Meyer Department of Electrical Engineering and Computer Science and the Computer Science and AI Laboratory, Massachussetts Institute of Technology Creative Commons 2011, Eric Lehman, F Tom Leighton, Albert R Meyer “mcs” — 2012/1/4 — 13:53 — page ii — #2 “mcs” — 2012/1/4 — 13:53 — page iii — #3 Contents I Proofs What is a Proof? 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 The Well Ordering Principle 25 2.1 2.2 2.3 26 Propositions from Propositions 36 Propositional Logic in Computer Programs Equivalence and Validity 41 The Algebra of Propositions 44 The SAT Problem 49 Predicate Formulas 50 Mathematical Data Types 69 4.1 4.2 4.3 4.4 Well Ordering Proofs 25 Template for Well Ordering Proofs Factoring into Primes 28 Logical Formulas 35 3.1 3.2 3.3 3.4 3.5 3.6 Propositions Predicates The Axiomatic Method Our Axioms Proving an Implication 11 Proving an “If and Only If” 13 Proof by Cases 15 Proof by Contradiction 16 Good Proofs in Practice 17 Sets 69 Sequences 72 Functions 73 Binary Relations 75 Infinite Sets 89 5.1 5.2 5.3 5.4 5.5 Finite Cardinality 90 Infinite Cardinality 92 The Halting Problem 97 The Logic of Sets 101 Does All This Really Work? 104 39 “mcs” — 2012/1/4 — 13:53 — page iv — #4 iv Contents Induction 115 6.1 6.2 6.3 6.4 128 Recursive Data Types 161 7.1 7.2 7.3 7.4 7.5 Ordinary Induction 115 Strong Induction 124 Strong Induction vs Induction vs Well Ordering State Machines 129 Recursive Definitions and Structural Induction 161 Strings of Matched Brackets 165 Recursive Functions on Nonnegative Integers 168 Arithmetic Expressions 171 Induction in Computer Science 176 Number Theory 187 8.1 8.2 8.3 8.4 8.5 8.6 8.7 8.8 8.9 Divisibility 187 The Greatest Common Divisor 193 The Fundamental Theorem of Arithmetic 199 Alan Turing 202 Modular Arithmetic 205 Arithmetic with a Prime Modulus 208 Arithmetic with an Arbitrary Modulus 213 The RSA Algorithm 219 What has SAT got to with it? 221 II Structures Directed graphs & Partial Orders 245 9.1 9.2 9.3 9.4 9.5 9.6 9.7 9.8 9.9 9.10 9.11 9.12 Digraphs & Vertex Degrees 247 Digraph Walks and Paths 248 Adjacency Matrices 251 Walk Relations 254 Directed Acyclic Graphs & Partial Orders 255 Weak Partial Orders 258 Representing Partial Orders by Set Containment Path-Total Orders 261 Product Orders 262 Scheduling 263 Equivalence Relations 269 Summary of Relational Properties 270 260 “mcs” — 2012/1/4 — 13:53 — page v — #5 v Contents 10 Communication Networks 295 10.1 10.2 10.3 10.4 10.5 10.6 10.7 10.8 10.9 Complete Binary Tree 295 Routing Problems 295 Network Diameter 296 Switch Count 297 Network Latency 298 Congestion 298 2-D Array 299 Butterfly 301 Bene˘s Network 303 11 Simple Graphs 315 11.1 Vertex Adjacency and Degrees 315 11.2 Sexual Demographics in America 317 11.3 Some Common Graphs 319 11.4 Isomorphism 321 11.5 Bipartite Graphs & Matchings 323 11.6 The Stable Marriage Problem 328 11.7 Coloring 335 11.8 Getting from u to v in a Graph 339 11.9 Connectivity 341 11.10 Odd Cycles and 2-Colorability 345 11.11 Forests & Trees 346 12 Planar Graphs 381 12.1 12.2 12.3 12.4 12.5 12.6 12.7 12.8 Drawing Graphs in the Plane 381 Definitions of Planar Graphs 381 Euler’s Formula 392 Bounding the Number of Edges in a Planar Graph Returning to K5 and K3;3 394 Coloring Planar Graphs 395 Classifying Polyhedra 397 Another Characterization for Planar Graphs 400 13 State Machines 407 13.1 The Alternating Bit Protocol 407 13.2 Reasoning About While Programs 410 393 “mcs” — 2012/1/4 — 13:53 — page vi — #6 vi Contents III Counting 14 Sums and Asymptotics 421 14.1 14.2 14.3 14.4 14.5 14.6 14.7 The Value of an Annuity 422 Sums of Powers 428 Approximating Sums 430 Hanging Out Over the Edge 434 Products 446 Double Trouble 448 Asymptotic Notation 451 15 Cardinality Rules 471 15.1 Counting One Thing by Counting Another 15.2 Counting Sequences 472 15.3 The Generalized Product Rule 475 15.4 The Division Rule 479 15.5 Counting Subsets 482 15.6 Sequences with Repetitions 483 15.7 The Binomial Theorem 485 15.8 A Word about Words 487 15.9 Counting Practice: Poker Hands 487 15.10 The Pigeonhole Principle 492 15.11 A Magic Trick 496 15.12 Inclusion-Exclusion 501 15.13 Combinatorial Proofs 507 16 Generating Functions 541 16.1 16.2 16.3 16.4 Operations on Generating Functions 542 The Fibonacci Sequence 547 Counting with Generating Functions 550 An “Impossible” Counting Problem 554 IV Probability 17 Events and Probability Spaces 571 17.1 17.2 17.3 17.4 Let’s Make a Deal 571 The Four Step Method 572 Strange Dice 581 Set Theory and Probability 589 471 “mcs” — 2012/1/4 — 13:53 — page vii — #7 vii Contents 17.5 Conditional Probability 17.6 Independence 605 593 18 Random Variables 635 18.1 18.2 18.3 18.4 18.5 Random Variable Examples 635 Independence 637 Distribution Functions 638 Great Expectations 646 Linearity of Expectation 658 19 Deviation from the Mean 679 19.1 19.2 19.3 19.4 19.5 19.6 19.7 19.8 Why the Mean? 679 Markov’s Theorem 680 Chebyshev’s Theorem 682 Properties of Variance 686 Estimation by Random Sampling 690 Confidence versus Probability 695 Sums of Random Variables 696 Really Great Expectations 706 20 Random Processes 725 20.1 Gamblers’ Ruin 725 20.2 Random Walks on Graphs 734 V Recurrences 21 Recurrences 753 21.1 21.2 21.3 21.4 21.5 The Towers of Hanoi 753 Merge Sort 760 Linear Recurrences 764 Divide-and-Conquer Recurrences A Feel for Recurrences 778 Index 780 771 “mcs” — 2012/1/4 — 13:53 — page viii — #8 “mcs” — 2012/1/4 — 13:53 — page — #9 I Proofs “mcs” — 2012/1/4 — 13:53 — page — #10 “mcs” — 2012/1/4 — 13:53 — page 778 — #786 778 21.5 Chapter 21 Recurrences A Feel for Recurrences We’ve guessed and verified, plugged and chugged, found roots, computed integrals, and solved linear systems and exponential equations Now let’s step back and look for some rules of thumb What kinds of recurrences have what sorts of solutions? Here are some recurrences we solved earlier: Towers of Hanoi Merge Sort Hanoi variation Fibonacci Recurrence Solution Tn D 2Tn C Tn 2n Tn D 2Tn=2 C n Tn n log n Tn D 2Tn C n Tn 2n p Tn D Tn C Tn Tn 1:618 : : : /nC1 = Notice that the recurrence equations for Towers of Hanoi and Merge Sort are somewhat similar, but the solutions are radically different Merge Sorting n D 64 items takes a few hundred comparisons, while moving n D 64 disks takes more than 1019 steps! Each recurrence has one strength and one weakness In the Towers of Hanoi, we broke a problem of size n into two subproblem of size n (which is large), but needed only additional step (which is small) In Merge Sort, we divided the problem of size n into two subproblems of size n=2 (which is small), but needed n 1/ additional steps (which is large) Yet, Merge Sort is faster by a mile! This suggests that generating smaller subproblems is far more important to algorithmic speed than reducing the additional steps per recursive call For example, shifting to the variation of Towers of Hanoi increased the last term from C1 to Cn, but the solution only doubled And one of the two subproblems in the Fibonacci recurrence is just slightly smaller than in Towers of Hanoi (size n instead of n 1) Yet the solution is exponentially smaller! More generally, linear recurrences (which have big subproblems) typically have exponential solutions, while divideand-conquer recurrences (which have small subproblems) usually have solutions bounded above by a polynomial All the examples listed above break a problem of size n into two smaller problems How does the number of subproblems affect the solution? For example, suppose we increased the number of subproblems in Towers of Hanoi from to 3, giving this recurrence: Tn D 3Tn C This increases the root of the characteristic equation from to 3, which raises the solution exponentially, from ‚.2n / to ‚.3n / “mcs” — 2012/1/4 — 13:53 — page 779 — #787 21.5 A Feel for Recurrences 779 Divide-and-conquer recurrences are also sensitive to the number of subproblems For example, for this generalization of the Merge Sort recurrence: T1 D Tn D aTn=2 C n 1: the Akra-Bazzi formula gives: ˆ for a < 2: So the solution takes on three completely different forms as a goes from 1.99 to 2.01! How boundary conditions affect the solution to a recurrence? We’ve seen that they are almost irrelevant for divide-and-conquer recurrences For linear recurrences, the solution is usually dominated by an exponential whose base is determined by the number and size of subproblems Boundary conditions matter greatly only when they give the dominant term a zero coefficient, which changes the asymptotic solution So now we have a rule of thumb! The performance of a recursive procedure is usually dictated by the size and number of subproblems, rather than the amount of work per recursive call or time spent at the base of the recursion In particular, if subproblems are smaller than the original by an additive factor, the solution is most often exponential But if the subproblems are only a fraction the size of the original, then the solution is typically bounded by a polynomial “mcs” — 2012/1/4 — 13:53 — page 780 — #788 Index , set difference, 70 k1 ; k2 ; : : : ; km /-split of A, 484 Cn , 320, 341 IE , indicator for event E, 636 K3;3 , 381 K5 , 381 big omega, 456 ‚./, 453 bij, 90 C, 70 ;, 70 WWD, Á mod n/, 205 ExŒR, expectation of R, 646 Ex2 ŒR, 686 8, Done, 410 2, inj, 86, 90 Z, 70 Z , 70 \, 70 , 73 N, 6, 70 A, 70 n/, 216 ZC , P.A/, 71 Q, 70 R, 70 RC , 70 , 451 (asymptotic equality), 445 strict, 90 , 70 Â, 70 surj, 90 [, 70 k-combinations, 487 k-edge connected, 342 k-to-1 function, 479 k-way independent, 610 n C 1-bit adder, 145 r-permutation, 517 IQ, 680, 686 icr , 350 while programs, 410 2-D Array, 310 2-Layer Array, 310 2-dimensional array, 299 absolute value, 709 acyclic, 255 Addition Rule (for generating functions), 543 adjacency matrix, 251 adjacent, 316 Adleman, 213 Agrawal, 189 Akra-Bazzi formula, 773 Akra-Bazzi Theorem, 775 alphabet, 162 annuity, 422 antecedents, antichain, 268, 284 antisymmetric, 259, 271 antisymmetry, 259 a posteriori, 601 arrows, 245 assignment statement, 139, 410 asymmetric, 258, 282 asymmetry, 258 asymptotically equal, 445 asymptotically smaller, 451 “mcs” — 2012/1/4 — 13:53 — page 781 — #789 INDEX asymptotic relations, 463 average, 646, 679 average degree, 318, 375 axiomatic method, Axiom of Choice, 104 axioms, 4, Banach-Tarski, 104 base case, 118 basis step, 118 Bayes’ Rule, 601 Bene˘s nets, 303 Bernoulli distribution, 640 Bernoulli variable, 687 Bernoulli variables, 636 biased, 725 bijection, 522 Bijection Rule, 471 bijective, 78 binary predicate, 53 binary relation, 76 Binary relations, 75 binary trees, 178 binomial, 485 binomial coefficient, 486 binomial coefficients, 518, 520 binomial distribution, 640, 644, 690 Binomial Theorem, 486, 551 bin packing, 697 bipartite graph, 323, 327, 362, 394 degree-constrained, 327 birthday principle, 613 blocks, 267 body, 411 bogus proofs, 18 Bookkeeper Rule, 562 Boole’s inequality, 590 Boolean variables, 36 Borel-Cantelli Lemma, 721 bottleneck, 327 781 boundary conditions, 765 branches, 411 bridge, 390 Brin, Sergey, 245, 735 buildup error, 344 busy, 671, 672 butterfly, 301 butterfly net, 313 Cancellation, 210 Cantor’s paradise, 93, 105 cardinality, 90 carry bit, 56 CDO, 720 chain, 266, 284 chain of “iff”, 14 characteristic equation, 768 characters, 162 Chebyshev’s bound, 713 Chebyshev’s Theorem, 683, 695 Chebyshev bound, 711 Chernoff Bound, 698 Chinese Appetizer problem, 681 Chinese Remainder Theorem, 232 Choice axiom, 103 chromatic number, 336 Church-Turing thesis, 202 closed form, 542, 549 closed forms, 421 closed walk, 249, 340 CML, 312, 313 CNF, 45 codomain, 73, 76 Cohen, 104 collateralized debt obligation, 720 colorable, 336 coloring, 336 solid, 352 combinatorial proof, 419, 509, 538, 539 “mcs” — 2012/1/4 — 13:53 — page 782 — #790 782 INDEX common divisor, 193 communication nets, 245 compilation, 97 complement, 70 Complement Rule, 590 complete binary tree, 295 complete bipartite graph, 381 complete digraph, 273 complete graph, 319, 381 components, 72 composing, 75 composition, 75, 88, 254 concatenation, 162, 163, 250 conclusion, 9, 37 conditional, 411 conditional expectation, 649 conditional probability, 593 confidence, 717 confidence level, 696, 716 congestion, 298, 313 congestion for min-latency, 312, 313 congestion of the network, 299 congruence, 205 congruent, 205 conjunctive form, 45 conjunctive normal form, 45, 48 connected, 341, 343 k-edge, 343 edge, 343 connected components, 342 connects, 316 consequent, consistent, 105 continuous faces, 385 Continuum Hypothesis, 104 contrapositive, 12, 42 convergence, 541 converges, 709 converse, 42 convex function, 703 convolution, 547 Convolution Counting Principle, 562 Convolution Rule, 552 corollary, countable, 94, 95, 105, 107 countably infinite, 95 counter model, 54 coupon collector problem, 663 cover, 272, 326 covering edge, 272 critical path, 266, 267, 268 cumulative distribution function, 638 cut edge, 343 cycle, 249, 337, 340 of length n, 320 cycle of a graph, 341 DAG, 243, 273 de Bruijn sequences, 278 degree, 316 degree-constrained, 327, 499, 529 degree sequence, 522 DeMorgan’s Laws, 46 depth, 267 derivative, 544 Derivative Rule, 545 describable, 111 deviation from the mean, 679 diagonal argument, 97 diameter, 296 Die Hard, 191, 192 Difference Rule, 590 digraphs, 245 directed acyclic graph (DAG), 255 directed edge, 247 directed graph, 247 Directed graphs, 245 directed graphs, 243 discrete faces, 388 “mcs” — 2012/1/4 — 13:53 — page 783 — #791 INDEX disjoint, 71 disjunctive form, 44 disjunctive normal form, 44, 48 distance between vertices, 250 Distributive Law, 72 distributive law, 44 divide-and-conquer, 773 divides, 187 divisibility relation, 247 divisible, 188 Division Rule, 479 Division Theorem, 190 divisor, 188 DNF, 44 domain, 52, 73, 76 domain of discourse, 52, 532 Dongles, 390 double letter, 98 Double or nothing, 584 double summations, 448 drawing, 381 edge connected, 343 edge cover, 326 edges, 247, 316 efficient solution, 49 elements, 69 Elkies, empty graph, 319, 337 empty relation, 279, 280, 282, 288, 292 empty sequence, 73 empty string, 65 end of chain, 266 endpoints, 316 end vertex, 247 Enigma, 207 environment, 411 equivalence class, 269, 292, 293 783 equivalence classes, 292 equivalence relation, 269, 272, 292, 293 equivalent, 40 erasable, 183 Euclid, 8, 188, 222 Euclid’s Algorithm, 193 Euler, 6, 222 formula, 392 Euler’s function, 216 Euler’s constant, 445 Euler’s formula, 399 Euler’s Theorem, 217 Euler’s theorem, 235 Euler circuit, 276 Euler tour, 276 evaluation function, 172 event, 575, 589 events, 635 exclusive-or, 37 existential, 51 expectation, 646 expected return, 653 expected value, 570, 646, 647, 679 exponential backoff, 644 exponentially, 45, 49 extends F , 352 Extensionality, 102 face-down four-card trick, 529 factor, 188 factorial function, 422 factorials, 518, 520 Factoring, 189 fair, 653 fair game, 725 Fast Exponentiation, 139 father, 513 Fermat’s Last Theorem, 189 Fermat’s Little Theorem, 211 “mcs” — 2012/1/4 — 13:53 — page 784 — #792 784 INDEX Fermat’s theorem, 231 Fibonacci, 547 Fibonacci recurrence, 765 Fifteen Puzzle, 155 Floyd’s Invariant Principle, 129 Foundation, 103 Four-Color Theorem, Four Step Method, 616 four-step method, 620 Frege, 104 Frege, Gotlob, 101 function, 73, 77 Fundamental Theorem of Arithmetic, 199 Găodel, 104, 105 Gale, 334 Gauss, 189, 205 general binomial density function, 645 Generalized Pigeonhole Principle, 493 Generalized Product Rule, 476 generating function, 556, 561 Generating Functions, 541 geometric distribution, 653, 653 geometric series, 541 geometric sum, 421 Goldbach’s Conjecture, 51, 52 Goldbach Conjecture, 189 golden ratio, 195, 225 good count, 185, 559, 559 Google, 725 graph bipartite, 323 coloring problem, 336 matching, 326 perfect, 326 shortest path, 253 valid coloring, 336 graph coloring, 336 graph of R, 76 gray edge, 352 greatest common divisors, 187 grid, 299 grows unboundedly, 22 guess-and-verify, 751 half-adder, 56 Hall’s Matching Theorem, 324 Hall’s Theorem, 327, 529 Hall’s theorem, 362 Halting Problem, 97 Handshake Lemma, 319 Hardy, 187, 203 Harmonic number, 444 Hat-Check problem, 681 head, 247 Herman Rubin, 702 Hoare Logic, 415 homogeneous linear recurrence, 765 homogeneous solution, 769 hypothesis, 37 identity relation, 282, 292 image, 75, 78 implications, 11 incident, 316 Inclusion-Exclusion, 502, 504 inclusion-exclusion for probabilities, 590 Inclusion-Exclusion Rule, 502 increasing subsequence, 290 in-degree, 247 independence, 605 independent, 689 independent random variables, 637 indicator random variable, 636 indicator variable, 647, 712 indicator variables, 638 indirect proof, 16 Induction, 115 “mcs” — 2012/1/4 — 13:53 — page 785 — #793 INDEX induction hypothesis, 118 inductive step, 118 inference rules, infinite, 89 Infinity axiom, 102 infix notation, 76 inhomogeneous linear recurrence, 769 injection relation, 86 injective, 77 integer linear combination, 190 intended profit, 725 interest rate, 458 interpreters, 97 intersection, 70 Invariant, 191 invariant, 130 inverse, 79, 83 inverse image, 79 irrational, 13 irreducible, 227 irreflexive, 257, 270, 282 irreflexivity, 257 isomorphic, 260, 281, 404 Kayal, 189 King Chicken Theorem, 275 known-plaintext attack, 212 latency, 298 latency for min-congestion, 312, 313 Latin square, 360 lattice basis reduction, 496 Law of Large Numbers, 695 leaf, 347 lemma, length-n cycle, 320 length-n walk relation, 255 length of a walk, 340 Let’s Make a Deal, 616 letters, 162 785 linear combination, 190 Linearity of Expectation, 658, 659 linear orders, 261 literal, 674 LMC, 312, 313 load balancing, 697, 700 logical deductions, logical formulas, lowest terms, 25 Mapping Rules, 471, 493 Markov’s bound, 713 Markov’s Theorem, 671, 680 Markov bound, 702 matched string, 165 matching, 324, 326 matching birthdays, 693 matching condition, 325 mathematical proof, matrix multiplication, 453 maximal, 264 maximum, 264 maximum dilation, 746 mean, 14, 646 meaning, 411, 413 median, 649 Menger, 343 merge, 249, 250 Merge Sort, 760 merging vertices, 400 minimal, 114, 264, 264 minimum, 264 minimum weight spanning tree, 350 minor, 400 modulo, 205 modus ponens, Monty Hall Problem, 571 multigraphs, 317 multinomial coefficient, 484 multinomials, 486 “mcs” — 2012/1/4 — 13:53 — page 786 — #794 786 INDEX Multinomial Theorem, 538 multiple, 188 multiplicative, 233 multiplicative inverse, 208 Multiplicative Inverses, 208 multisets, 69 Murphy’s Law, 705 mutual independence, 689 mutually independent, 607, 630, 638, 693, 699 mutually recursive, 557 neighbors, 326, 357 network latency, 298 node, 247, 316 nodes, 317 nonconstant polynomial, 21 nonconstructive proof, 494 nondecreasing, 430 nonincreasing, 431 non-unique factorization, 227 norm, 227 not primes, 22 numbered tree, 513 numbered trees, 522 number of processors, 267 Number theory, 187 o(), asymptotically smaller, 451 O(), big oh, 452 o(), little oh, 451 one-sided Chebyshev bound, 713 optimal spouse, 333 order, 765 ordinary generating function, 541 ordinary induction, 116 outcome, 573, 589 out-degree, 247 outside face, 385 overhang, 434 packet, 295 Page, Larry, 245, 735 page rank, 736, 738 Pairing, 102 pairwise disjoint, 113 pairwise independence, 689 pairwise independent, 610, 612, 690, 693 Pairwise Independent Additivity, 690 Pairwise Independent Sampling, 694, 716 parallel schedule, 267 parallel time, 268 parity, 156 partial correctness, 138 partial correctness assertion, 415 partial fractions, 549 partial functions, 74 partial order, 281 particular solution, 769 partition, 267, 292, 323 partitions, 269 Pascal’s Identity, 509 path, 669 path-total, 271 perfect graph, 326 perfect number, 188, 222 permutation, 210, 406, 478, 518 Perturbation Method, 423 pessimal spouse, 333 Pick-4, 699 pigeonhole principle, 419 planar drawing, 381 planar embedding, 387, 388, 404 planar graph, 385 planar graphs, 339 planar subgraph, 395 plug-and-chug, 751 pointwise, 75 “mcs” — 2012/1/4 — 13:53 — page 787 — #795 INDEX Polyhedra, 397 polyhedron, 397 polynomial growth, 49 polynomial time, 323 population size, 695 positive walk relation, 254 potential, 148 power set, 71, 81, 96 Power Set axiom, 103 Power sets, 96 precondition, 415 predicate, pre-MST, 352 preserved, 206 preserved invariant, 134 preserved under isomorphism, 322 Primality Testing, 189 prime, 5, 188 prime factorization, 224 Prime Factorization Theorem, 28 prime number, 188 Prime Number Theorem, 214 private key, 215 probability density function, 638 probability density function,, 638 probability function, 589, 619 probability of an event, 589 probability space, 589 product of sets, 73 Product Rule, 473, 597 product rule, 630 Product Rule (for generating functions), 546 proof, proof by contradiction, 16 proposition, 4, propositional variables, 36 public key, 215 public key cryptography, 215 787 Pulverizer, 223, 231 Pythagoreans, 397 quicksort, 644 quotient, 191 Rabin cryptosystem, 238 randomized, 569 randomized algorithm, 644 random sample, 717 random sampling, 713 random variable, 635 random variables, 636 random walk, 669, 737 Random Walks, 725 range, 75 rank, 519 rational, 13, 16 reachability., 134 reachable states, 134 recognizable, 98 recognizes, 98 recurrence, 440, 751 Recursive data types, 161 recursive definitions, 161 reflexive, 254, 270 regular polyhedron, 397 relation on a set, 76 relatively prime, 215 relaxed, 671, 672 remainder, 191 Replacement axiom, 103 reversal, 176 Riemann Hypothesis, 214, 214 right-shift, 544 Right-Shift Rule, 544 ripple-carry, 57 ripple-carry circuit, 145 Rivest, 213 root mean square, 685 “mcs” — 2012/1/4 — 13:53 — page 788 — #796 788 INDEX round-robin tournament, 274 routing, 296 routing problem, 296 RSA, 213, 237 RSA public key crypto-system, 187 RSA public key encryption scheme, 219 Russell, 101, 104 Russell’s Paradox, 101, 103 sample space, 573, 589 sampling, 713 SAT, 49 satisfiable, 43, 49, 60, 675 SAT-solvers, 49 Saxena, 189 Scaling Rule, 542 scheduled at step k, 267 Schrăoder-Bernstein, 93, 107 self-loop, 317 self-loops, 249 sequence, 72 sequencing, 411 set, 69 covering, 326 set difference, 70, 80 Shamir, 213 Shapley, 334 simple graph, 316 Simple graphs, 315 simple graphs, 243 smallest counterexample, 27 solid coloring, 352 solves, 296 sound, 10 spanning subgraph, 350 spanning tree, 349 spread, 435 St Petersberg paradox, 677 St Petersburg Paradox, 707 stable matching, 329 standard deviation, 685, 686, 689 start vertex, 247 state graph, 130 state machines, 243 stationary distribution, 738 Stirling’s formula, 669 store, 412 strictly bigger, 96 strictly decreasing, 431 strictly increasing, 430 strict partial order, 257, 271 string procedure, 98 Strong Induction, 124 strongly connected, 746 Structural induction, 163 structural induction, 161, 181 subsequence, 290 subset, 70 subset relation, 281 substitution function, 173 suit, 519 summation notation, 27 Sum Rule, 474, 590 surjection relation, 85 surjective, 77 switches, 295 symbols, 162 symmetric, 243, 271, 315, 745 tail, 247 tails, 644 tails of the distribution, 644 terminals, 295 terms, 72 test, 411 tests, 411 theorems, “mcs” — 2012/1/4 — 13:53 — page 789 — #797 INDEX topological sort, 264 total, 77 total expectation, 651 total function, 74 totient function, 216 tournament digraph, 274 Towers of Hanoi, 556, 753 trail, 277 transition, 130 transition relation, 130 transitive, 254, 271, 282, 586 Traveling Salesman Problem, 277, 373 tree diagram, 573, 620 truth tables, 36 Turing, 202, 203, 213 Turing’s code, 203, 207, 212 Twin Prime Conjecture, 189 type-checking, 97, 99 unbiased, 725 unbiased binomial distribution, 644 unbounded Gambler’s ruin, 733 uncountable, 110, 113 undirected, 315 undirected edge, 316 uniform, 582, 591, 641 uniform distribution, 640, 641 union, 70 Union axiom, 102 Union Bound, 591 unique factorization, 224 unique factorizations, 226 Unique Factorization Theorem, 199 universal, 51 unlucky, 672 valid, 43 valid coloring, 336 value of an annuity, 424 variance, 683, 692, 712 789 Venn diagram, 630 vertex, 247, 316 vertex connected, 343 vertices, 247, 316 virtual machines, 97 walk, 373 walk counting matrix, 252 walk in a digraph, 248 walk in a simple graph, 340 walk relation, 254 Weak Law of Large Numbers, 695, 716 weakly connected, 277 weakly decreasing, 147, 199, 431 weakly increasing, 430 weak partial order, 272 well founded, 114 Well Ordering, 125 Well Ordering Principle, 25, 117, 129 while loop, 411 width, 367 winnings, 653 wrap, 559 Zermelo, 104 Zermelo-Frankel, Zermelo-Frankel Set Theory, 102 ZFC, 9, 102, 104, 105 ZFC axioms, 104 “mcs” — 2012/1/4 — 13:53 — page 790 — #798 790 INDEX Glossary of Symbols symbol WWD ^ _ ! ! :P; P ! ˚  [ \ A P.A/ ; Z N; Z ZC ; NC Z Q R C R.X / R R X / surj inj bij meaning is defined to be and or implies, if , then state transition not P iff, equivalent xor, exclusive-or exists for all is a member of, is in is a (possibly =) subset of is a proper (not =) subset of set union set intersection complement of set A set difference powerset of set, A the empty set, f g integers nonnegative integers positive integers negative integers rational numbers real numbers complex numbers image of set X under binary relation R inverse of binary relation R inverse image of set X under relation R A surj B iff 9f W A ! B: f is a surjective function A inj B iff 9R W A ! B: R is an injective relation A bij B iff 9f W A ! B: f is a bijection “mcs” — 2012/1/4 — 13:53 — page 791 — #799 INDEX symbol ŒÄ in Œ in ŒÄ out Œ out ŒD out; D in A rev.s/ s t #c s/ mjn gcd k; n/ Œk; n/ k; n Œk; n hu ! vi IdA R RC hu—vi E.G/ V G/ Cn Ln Kn L.G/ R.G/ Kn;m Hn nŠ o./ O./ ‚./ / !./ 791 meaning injective property of a relation surjective property of a relation function property of a relation total property of a relation bijection relation the empty string/list the finite strings over alphabet A the reversal of string s concatenation of strings s; t; append.s; t / number of occurrences of character c in string s integer m divides integer n; m is a factor of n greatest common divisor fi j k < i < ng fi j k Ä i < ng fi j k < i Ä ng fi j k Ä i Ä ng directed edge from vertex u to vertex v identity relation on set A: aIdA a0 iff a D a0 path relation of relation R; reflexive transitive closure of R positive path relation of R; transitive closure of R undirected edge connecting vertices u neqv the edges of graph G the vertices of graph G the length-n undirected cycle the length-n line graph the n-vertex complete graph the “left” vertices of bipartite graph G the “right” vertices of bipartite graph G the complete bipartite graph n left and m right vertices Pwith n the nth Harmonic number i D1 1= i asymptotic equality n factorial WWDn n 1/ asymptotic notation “little oh” asymptotic notation “big oh” asymptotic notation “Theta” asymptotic notation “big Omega” asymptotic notation “little omega” “mcs” — 2012/1/4 — 13:53 — page 792 — #800 792 INDEX symbol PrŒA Pr A j B IE ExŒR ExŒR j A VarŒR R meaning probability of event A conditional probability of A given B indicator variable for event E expectation of random variable R conditional expectation of R given event A variance of R standard deviation of R ... analyze problems that arise in computer science Proofs play a central role in this work because the authors share a belief with most mathematicians that proofs are essential for genuine understanding... if any, practical applications, but it has turned out to have multiple applications in Computer Science For example, most modern data encryption methods are based on Number theory “mcs” — 2012/1/4... there is a special notation for them With this notation, Proposition 1.1.3 would be 8n N: p.n/ is prime: (1.2) Here the symbol is read for all.” The symbol N stands for the set of nonnegative

Ngày đăng: 01/06/2018, 15:08

w