... ιντεγερκ 2 ⇒ ν = κ , ωηιχη ισεϖεν 1/25/12 More slowly … • Thm For any integer n, n2 is odd if and only if n is odd • To prove a statement of the form “P iff Q,” two separate proofs are needed: – If P ... the assertions together are abbreviated “P iff Q” or “P⇔Q” or “P ≡Q” 1/25/12 More slowly … • Thm For any integer n, n2 is odd if and only if n is odd () “If n2 is odd then n is odd” is equivalent ... (“contrapositive”) which is the same as “if n is even then n2 is even” (since n is an integer) … then n=2k for some k and n2=4k2, which is even 1/25/12 Contrapositive and converse • The contrapositive of...
Ngày tải lên: 22/03/2019, 10:35
... bottom pancake 03/22/19 Why does this take 2n-3 flips? • For n≥2, let P(n) := “n pancakes can be sorted using 2n-3 flips” • Suppose this is false for some n • Let C = {n: P(n) is false} • C has a least ... to “lowest terms” The set of factors of a positive integer is nonempty 03/22/19 To prove P(n) for every nonnegative n: • Let C = {n: P(n) is false} (the set of “counterexamples”) • Assume C ... by WOP Call it m • So m pancakes cannot be sorted using 2m-3 flips and m is the smallest number for which that is the case 03/22/19 Why does this take 2n-3 flips? • m≠2 since one flip sorts pancakes...
Ngày tải lên: 22/03/2019, 10:37
Discrrete mathematics for computer science 07logic and computers
... Logic and computers 2/6/12 Binary Arithmetic Only two digits: the bits and (Think: = F, = T) +0 -0 2/6/12 +1 -1 +0 -1 +1 -10 Logic and Computers A half adder: Two ... Simpler formulas turn into circuits that use less hardware! • E.g p ⋁ q ⋁ (p⋀q) is equivalent to p ⋁ q but would use more logic gates • But the P=NP? question means that it may be hard to simplify formulas ... possible – Any tautology is equivalent to p ⋁ ¬p so if we could easily simplify formulas we could easily determine whether a formula is a tautology 2/6/12 ...
Ngày tải lên: 22/03/2019, 10:41
Discrrete mathematics for computer science 09sets
... or “A is contained in B” (∀x) (x∈A ⇒ x∈B) N ⊆ Z, {7} ⊆ {7, “Sunday”, π} ∅ ⊆ A for any set A (∀x) (x∈∅ ⇒ x∈A) A ⊆ A for any set A To be clear that A ⊆ B but A ≠ B, write A ⊊ B “Proper subset” (I ... Sets 2/10/12 What is a Set? • Informally, a collection of objects, determined by its members, treated as a single mathematical object...
Ngày tải lên: 22/03/2019, 10:45
Discrrete mathematics for computer science 10relations
... → R f(x,y) = x/y Defined for all pairs (x,y) except when y=0! 2/13/12 A Function that is “Partial,” Not Total domain f R×R codomain R f: R ×R → R f(x,y) = x/y Defined for all pairs (x,y) except ... “Size” For finite sets, a bijection exists iff A and B have the same number of elements domain A 2/13/12 f codomain B 10 Cardinality or “Size” Use the same as a definition of “same size” for infinite...
Ngày tải lên: 22/03/2019, 10:47
Discrrete mathematics for computer science 11uncountable
... contradiction: suppose Pf f:A↔P(A) is a bijection Let W::= {a A|a f(a)}, so for any a, a W iff a f(a) f is a bijection, so W=f(a0), for some a0 A (∀a) a f(a0) iff a f(a ) 2/22/12 12 There is no bijection ... contradiction: suppose Pf f:A↔P(A) is a bijection Let W::= {a A|a f(a)}, so for any a, a W iff a f(a) f is a bijection, so W=f(a0), for some a0 A 2/22/12 a 0contradiction f(a0) iff a 0f(a ) 13 So ... every row! So cannot be listed: this diagonal sequence will be missing 2/22/12 10 Cantor’s Theorem For every set, A (finite or infinite), there is no bijection A↔P(A) 2/22/12 11 There is no bijection...
Ngày tải lên: 22/03/2019, 10:49
Discrrete mathematics for computer science 12induction
... Example Induction Proof Let’s prove: 1+r +r + (for r ≠ 1) n +r = (n+ 1) r -1 r -1 Example Induction Proof Statements in magenta form a template for inductive proofs: • • Proof: (by induction ... +r n = (for r ≠ 1) ( n+ ) r -1 r -1 Example Induction Proof Base Case (n = 0): ? r 0+1 - 1+r +r +L +r = r -1 OK! r -1 = =1 r -1 Example Induction Proof • Inductive Step: Assume P(n) for some...
Ngày tải lên: 22/03/2019, 10:51
Discrrete mathematics for computer science arithmetic
... n-1 multiplications • Method 2: use successive squaring – How many times can you divide n by before it is reduced to 1? – Repeated squaring requires between log2n and 2∙log2n multiplications ... multiplications • Method 2: use successive squaring – Requires about log2n multiplications • Same idea works for multiplication modulo p • Example: If n is a 500-digit number, we can compute qn (mod p) in...
Ngày tải lên: 22/03/2019, 10:55
Discrrete mathematics for computer science asymptotic
... ⎠ For example, n Note that n2+1 is being used to name the function f such that f(n) = n2+1 for every n 3/26/12 An example: Stirling’s formula ... Little-Oh: f = o(g) • Def: f(n) = o(g(n)) if lim n • For example, n2 = o(n3) since lim n 3/26/12 = o( ∙ ) is “all one symbol” ... So, for example, 3n 3/26/12 Rough Paraphrase • f∼g: f and g grow to be roughly equal •...
Ngày tải lên: 22/03/2019, 10:59
Discrrete mathematics for computer science coloring
... 4-colorable 1850’s: false proof published (was correct for colors) 1970’s: proof with computer 1990’s: much improved 3/16/12 15 Chromatic Number #colors for G is chromatic number, χ(G) lemma: 3/16/12 ... slots How short an exam period? 3/16/12 Harvard’s Solution Different “exam group” for every teaching hour Exams for different groups at different times 3/16/12 10 3/16/12 11 But This May be Suboptimal...
Ngày tải lên: 22/03/2019, 11:07
Mathematics for Computer Science pot
... simplification Therefore, P (n) is true for all natural n by induction, and the theorem is proved Induction was helpful for proving the correctness of this summation formula, but not helpful for discovering ... core truth of mathematics 2.3 Using Induction Induction is by far the most important proof technique in computer science Generally, induction is used to prove that some statement holds for all natural ... Eric Lehman and Tom Leighton Mathematics for Computer Science 2004 Contents What is a Proof? 15 1.1 Propositions ...
Ngày tải lên: 05/03/2014, 23:20
Mathematics for Computer Science pptx
... of numbers of the form rn, where r is a positive real number and n N Well ordering commonly comes up in Computer Science as a method for proving that computations won’t run forever The idea is ... proposition for each possible set of truth values for the variables For example, the truth table for the proposition “P AND Q” has four lines, since there are four settings of truth values for the ... before we start into mathematics, we need to investigate the problem of how to talk about mathematics To get around the ambiguity of English, mathematicians have devised a special language for...
Ngày tải lên: 23/03/2014, 23:20
concrete mathematics a foundation for computer science phần 1 pdf
... “Discrete Mathematics! ’ Therefore the subject needs a distinctive name, and “Concrete Mathematics has proved to be as suitable as any other The original textbook for Stanford’s course on concrete mathematics ... “simple” closed form For example, the product of the first n integers, n!, has proved to be so important that we now consider it a basic operation The formula ‘n!’ is therefore in closed form, although ... expression for the quantity of interest For the Tower of Hanoi, this is the recurrence (1.1) that allows us, given the inclination, to compute T,, for any n Find and prove a closed form for our...
Ngày tải lên: 14/08/2014, 04:21
concrete mathematics a foundation for computer science phần 2 pptx
... closed form for f(n) , when n L Provethatf(n)=n-l+f([n/2~)+f(~n/Z])foralln~l 35 Simplify the formula \(n + )‘n! e] mod n 36 Assuming that n is a nonnegative integer, find a closed form for the ... arbitrary positive integer n in the form n = 2m + 1, where < < 2” Give explicit formulas for and m as functions of n, using floor and/or ceiling brackets What is a formula for the nearest integer to a ... v(x+l) Au(x) (2.54) This formula can be put into a convenient form using the shij?! operator E, defined by Ef(x) = f(x+l) Substituting this for v(x+l) yields a compact rule for the difference of...
Ngày tải lên: 14/08/2014, 04:21
concrete mathematics a foundation for computer science phần 3 ppsx
... 4) QED for the case m = 12 So far we’ve proved our congruence for prime m, for m = 4, and for m = 12 Now let’s try to prove it for prime powers For concreteness we may suppose that m = p3 for some ... Therefore q(n) is the number of reduced basic fractions with denominator n; and the Farey series 3,, contains all the reduced basic fractions with denominator n or less, as well as the non -basic ... cl(P) = -1; p(pk) = for k > Therefore by (4.52), we have the general formula ifm=pjpz p,; if m is divisible by some p2 (4.57) That’s F If we regard (4.54) as a recurrence for the function q(m),...
Ngày tải lên: 14/08/2014, 04:21
concrete mathematics a foundation for computer science phần 4 ppsx
... summation formula of the form al, a,, z kbk = CF h, b, 1) AI, AM, '5, , BN (5.127) k’ then we also have al, a,, bl, bn k+l ’ for any integer There’s a general formula for shifting ... ignore convergence if we are using z simply as a formal symbol It is not difficult to verify that formal infinite sums of the form tk3,, (Xkzk form a field, if the coefficients ak lie in a field ... on such formal sums without worrying about convergence; any identities we derive will still be formally true For example, the hypergeometric F( “i ,’ /z) = tkZO k! zk doesn’t converge for any...
Ngày tải lên: 14/08/2014, 04:21
concrete mathematics a foundation for computer science phần 5 pps
... a closed formula for them We haven’t found closed forms for Stirling numbers, Eulerian numbers, or Bernoulli numbers either; but we were able to discover the closed form H, = [“:‘]/n! for harmonic ... -F; = (-l).", for n > (6.103) When n = 6, for example, Cassini’s identity correctly claims that 3.5-tS2 = A polynomial formula that involves Fibonacci numbers of the form F,,+k for small values ... a few things For one, kim’ isn’t a polynomial if j = 0; so we will need to split off that term and handle it separately For another, we’re missing the term k = from the formula for nth difference;...
Ngày tải lên: 14/08/2014, 04:21
concrete mathematics a foundation for computer science phần 6 doc
... exist for negative n Two kinds of “closed forms” come up when we work with generating functions We might have a closed form for G(z), expressed in terms of z; or we might have a closed form for ... that R(0) # 00 can be expressed in the form R(z) = S(z) t T(z), (7.28) where S(z) has the form (7.26) and T(z) is a polynomial Therefore there is a closed form for the coefficients [z”] R(z) Finding ... (7.10) and get a closed form for the coefficients, but it’s bett,er to save that for later in the chapter after we’ve gotten more experience So let’s divest ourselves of dominoes for the moment and...
Ngày tải lên: 14/08/2014, 04:21
concrete mathematics a foundation for computer science phần 7 pot
... element of n has the form (T + HT)"HH for some n 0, and each term of T has the form (0 + E)n Therefore by (7.4) we have s = (I-T-HT)-'HH, and the probability generatin.g function for our problem is ... form for P~,~ Generalizing your a.nswer to part (a), find a closed form for the probability that exactly k matches are in the other box when an empty one is first th.rown away Find a closed form ... independent Let F(z) and G(z) be the pgf’s for X and Y, and let H(z) be the pgf for X + Y Then H(z) = F(z)G(z), and our formulas (8.28) through must have (8.31) for mean and variance tell us that we...
Ngày tải lên: 14/08/2014, 04:21
Bạn có muốn tìm thêm với từ khóa: