cs182Fall2011MidtermSolution

cs182Fall2011MidtermSolution - PROBLEM 1 a. (2 pts)...

Info iconThis preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 4
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 6
Background image of page 7
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: PROBLEM 1 a. (2 pts) Evaluate —17 mod 5. 3 b. (2 pts) What is the prime factorization of 12! (factorial of 12)? ll)‘ u x :oxaxsx’lxaxx xHxS x 7’ 2x35 1x1} S x zxsx '7 x ulex 3x3x ’2:x.lfxn x .. . I .. I .. . Zfldg 0 z‘xsyx yawn c. (3 pts) What is the LCM (least common multiple) of the following integers 22 -3 - 5 and 23 - 7? 23K 3x§2< 7 ~8x i575? 3 DOA? ~ 9(4) (:1. (3 pts) What is the GOD (greatest common divisor) of the following integers 23-32-5- 13 and 22-33-7-11? 212‘}? :Hxfirgc PROBLEM 2 Give the big—O estimate for each of the following functions. Provide a simple function 9(22) of the smallest order a. (2 pts) f(£L') = 3:210g(:1:3 —— 1) + 561'5. x1 H x b. (2 Pts) f(93) = W2 + 3)/2l- V /‘ c. (2 pts) f(:r) = 2”” + x6. (1‘. ('4 pts) Show that f = 3x2+4x is 0(362) by providing constants C and $0 as evidence. PROBLEM 3 a. (5 pts) Compute the following: M V) fic— .2" [>1 (.4 h 22? r” 1;. ) 7/ ,/z “82.1" J) = "" b. (2 + 3 pts) Determine if the following functions are bijections from R to R. i. f(ac) = 2:2: +1. LI¢> ii. = 23:2 — 1. PROBLEM 4 a. (6 pts) Show using set identities that = (50:? )m‘r. b. (4 pts) What is the Cartesian product A x B for sets A = {sunny, rainy} and B 2 {nights, days}. A X B: {Cgkhm}, nigh—rs ), (gunmé’ O‘OUjS)/ C m:‘«% ,nfak-rs), (mm?) OMS) PROBLEM 5 a. (4 pts) Use a direct proof to show that the sum of two odd integers is even. S “PPQ We have, 2 bold {Ix-re 0d any 0, and 02 t The“ 0,: ‘ "FDY' gomc ln‘fefler m 02: 2n+l ‘FDV Cvme I(h'fv€?er r1 Thus. O,+0z: 2m+| +2n-Pl : 2Cm+n3+ 2 / uh-‘ch is e (fen. b. (6 pts) Show using rules of inference that the premise “Everyone who exercises has a sore muscle” and “Jimmy exercises” imply that “Jimmy has a sore muscle.” Use E to denote “ac exercises” and S(:c) to denote that “a: has a sore muscle.” “71% C500» 300)] $[E£J’immgt)~> Scamng ECTFMW3> A ECTMMQ) --9 SCTI‘mmg) MM t‘ . S Cj“MM4 >_ PROBLEM 6 Let 5(23) denote “a: is a. student,” F(x) denote “a: is on the faculty,” and A(x,y) denote “x asked y a question.” Let a: be drawn from the universe of all people in the world (i.e., ac need not necessarily be a student or faculty). Translate the following into logical statements. a. (4 pts) Every student has asked Professor Smith a question. .61“ < S‘CX) __; A (1%] Smith)) b. (6 pts) Some student has not asked any faculty member a question. 3%, tn} (fem Ample» we”) ), PROBLEM 7 (5 pts) Show that [(p —> q) /\ (q —> 7")] —> (p —> 7") is a tautology. Lcm>«<%—»r>1—>cw>r> 7W , [CwPVQflA (1%vr)j —-> (qpvr) why/QT) v-tC-tqfvrlv (fipvr) .2 (“w-1:8) foonvr) AT ] (VA—106%, Cay/hr) V CflPvr) C‘1PV4%)V cka‘ 4‘) V6%V1/)VY -1V\/ T Vr 1:: (5 pts) Show using identities that —(p V (-79 /\ q)) and (—np /\ ~1q) are logically equivalent. v u.— .’ /\ ’1 (PV («we») "P #5 EPA?” 91 T: /\ W W W .1 i ‘1? M F My 1 E bwflv («VA-«w * F “‘73”? a 7 v («3: m g) .— i-n ...
View Full Document

Page1 / 7

cs182Fall2011MidtermSolution - PROBLEM 1 a. (2 pts)...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online