... ⇒ ν2 = 4 κ2, ωηιχη ισ εϖεν Trang 4More 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 ... Q ” or “ P⇔Q ” or “ P ≡Q ” Trang 5More slowly …• Thm For any integer n, n2 is odd if and only if n is odd. (<=) If n is odd then n=2k+1 for some integer k … then n2=4k2+4k+1, which is odd ... (“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 Trang 6Contrapositive and converse• The contrapositive of...
Ngày tải lên: 22/03/2019, 10:35
... bottom pancake Trang 9Why 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 ... arguing that a fraction can be reduced to “lowest terms” integer is nonempty Trang 6To 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 Trang 10Why does this take 2n-3 flips? • m≠2 since one flip sorts 2 pancakes...
Ngày tải lên: 22/03/2019, 10:37
Discrrete mathematics for computer science 07logic and computers
... may be hard to simplify formulas as much as 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 ... Trang 1Logic and computersTrang 2Binary Arithmetic0 +0 0 0 +1 1 1 +0 1 1 +1 10 Only two digits: the bits 0 and 1 (Think: 0 = F, 1 = T) Trang 3Logic and Computers A half adder: ... number of bits to be added? 0 a2 b2 a1 b1 c2 c1 carryout Trang 12Simplifying Circuits• Simpler formulas turn into circuits that use less hardware! • E.g p ⋁ q ⋁ (p⋀q) is equivalent to p ⋁ q...
Ngày tải lên: 22/03/2019, 10:41
Discrrete mathematics for computer science 09sets
... 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” ... Trang 1SetsTrang 2What 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
... Total f: R ×R → R f(x,y) = x/y Defined for all pairs (x,y) except when y=0! f Trang 6A Function that is “Partial,” Not Total f: R ×R → R f(x,y) = x/y Defined for all pairs (x,y) except when y=0! ... 10Cardinality or “Size”f For finite sets, a bijection exists iff A and B have the same number of elements Trang 11Cardinality or “Size”Use the same as a definition of “same size” for infinite sets:...
Ngày tải lên: 22/03/2019, 10:47
Discrrete mathematics for computer science 11uncountable
... 1 1 Trang 11Cantor’s TheoremFor every set, A (finite or infinite) , there is no bijection A↔P(A) Trang 12There is no bijection A↔P(A)W::= {a A | a f(a)} , so for any a, a W iff a f(a) ... , for some a0 A (∀a) a f(a0) iff a f(a ) Pf by contradiction: suppose f:A↔P(A) is a bijection Let Pf by contradiction: Trang 13There is no bijection A↔P(A)W::= {a A | a f(a)} , so for ... A↔P(A)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 f(a ) iff a f(a ) Pf by contradiction: suppose f:A↔P(A) is a bijection Let...
Ngày tải lên: 22/03/2019, 10:49
Discrrete mathematics for computer science 12induction
... level Fifth level Trang 5Example Induction ProofLet’s prove: r-1 (for r ≠ 1) Trang 6Statements in magenta form atemplate for inductive proofs: • Proof: (by induction on n ) • The induction ... 1+r +r + +r = r-1 L (for r ≠ 1) Trang 7Base Case (n = 0):r - 1 = = r - 1 1 L 0+1 1+r +r + +r = r - 1 Example Induction Proof 1 OK! Trang 8• Inductive Step: Assume P ( n ) for some n ≥ 0 and prove...
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 2 before it is reduced to 1? – Repeated squaring requires between – Huge savings! n = 1000 => at ... 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 q n (mod p) in...
Ngày tải lên: 22/03/2019, 10:55
Discrrete mathematics for computer science asymptotic
... Functions3/26/12 Trang 2Asymptotic Equivalence• Def: For example, Note that n2 +1 is being used to name the function f such that f(n) = n2 +1 for every n f (n) : g(n) iff limn ... example: Stirling’s formula n! : n e ⎛ ⎝⎜ ⎞ ⎠⎟ 3/26/12 Trang 4Little-Oh: f = o(g)• Def: f(n) = o(g(n)) if lim n • For example, n2 ... So, for example, 3n2 Trang 11Rough 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 conditional
... are independent events iff Pr(A|B) = Pr(A) • That is, knowing whether B is the case gives no information that would help determine the probability of A • Proof: A and B independent iff Pr(A)∙Pr(B) ... probability that Santorum will be the Republican nominee? Trang 9Total ProbabilitySimple version: For any events A and B whose probability is neither 0 nor 1: That is, Pr(A) is the weighted average...
Ngày tải lên: 22/03/2019, 11:14
Discrrete mathematics for computer science counting subsets
... one choice for the last • So by the product rule, n ∙ (n-1) ∙ (n-2) ∙ … ∙ 2.1 = n! Trang 3How Many 4-Letter Words Using Each Letter at Most Once? • 26 choices for first letter • Only 25 for second ... Letter at Most Once? • 26 choices for first letter • Only 25 for second letter • 24 for third letter • 23 for fourth letter • So 26∙25∙24∙23 • or 26!/22! Trang 4Generalized Product Rule• Let ... length-k sequences • if n1 possible 1st elements, n2 possible 2nd elements (for each first entry), n3 possible 3rd elements (for each 1st & 2nd entry, ) then, • |Q| = n1⋅n2⋅⋅⋅nk Trang 5How Many...
Ngày tải lên: 22/03/2019, 11:18
Discrrete mathematics for computer science digraphs and relations
... Trang 1Digraphs and RelationsTrang 5R is a transitive if R = G + for some digraph G transitivity Trang 8reflexivity For any digraph G, G* is reflexive Trang 9G* is the reflexive transitive ... is symmetric if a R b IMPLIES b R a Trang 14(weak) partial ordersTrang 15R is a W PO if R = D * for some DAG D weak partial orders Trang 16transitive, symmetric &reflexive equivalence relations...
Ngày tải lên: 22/03/2019, 11:30
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
Applied Mathematics for Database Professionals phần 9 pdf
... specific salary We hold additional information for all sales representatives in a separate table (SREP) We hold additional information for employees who no longer work for the company (that is, they ... mapping from the informal natural language to the formal world of a database design This data integrity constraint problem is inevitable unless we adopt a formal methodology With a formal language, ... normal forms in database design Covering these topics justifies at least another book in itself Conclusions The unique aspect of this book is captured by its title: applied mathematics for database...
Ngày tải lên: 08/08/2014, 18: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 ... 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), ... write for gcd( m, n), a for m’, and b for -n’.) The Farey series gives us another proof of (4.32), because we can let b/a be the fraction that precedes m/n in 3,, Thus (4.5) is just (4.31) again For...
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 ... aren’t applied nearly as often Therefore it’s best for us just to list the simplest ones, for future reference when a tough Stirling nut needs to be cracked Tables 250 and 251 contain the formulas...
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