Midterm Solutions

# Discrete Mathematics and Its Applications with MathZone

• Homework Help
• davidvictor
• 4

This preview shows pages 1–2. Sign up to view the full content.

ICS.6D, Fall 2007, Midterm, November 5, 2007, SOLUTIONS 1) True, False, or Depends? [ 48 pts = 16 items x 3pts each ] For each statement mark whether it’s True, False, or it depends on the instantiation of the variables and/or the definition of the predicates: a. If (p and ¬ q) then p True, because (p and r) implies p for any r . b. If p then (10=5 and a=a) Depends, because it’s true whenever p ≡ F and false whenever p ≡ T, because (10=5 and a=a) ≡ F, and (p→F) ≡ ( ¬ p). c. (p ¬ p) False, because it’s false for all p. d. (p ¬ p) is a contradiction The answer to (d) is “True” because the answer to (c) is “False”. In other words, (p ¬ p) is a contradiction because it’s a statement that’s false for all values of the variable p. e. ( 2200 x ¬ A(x)) if ( ¬ 5 x A(x)) True, because these two statements are equivalent for all predicates A. Note that implicitly both quantifiers are over the same universe (which was not stated but was to be assumed). f. {1,4} ({1,2,3,4,5} – {2,3}) True, because {1,4} is a proper subset of {1,4,5} g. | {1,1,2,2,3} x {1,1,1} | = 3 True, because |{1,1,2,2,3}|=3, |{1,1,1}|=1, and 3*1=3 h. | P({1,1,2}) | = 2 False, because |{1,1,2}|=2, so |P({1,1,2}|=2 2 =4 i. Ø { Ø } True, just a case of a {a} for some a. j. Ø { Ø } True, because Ø A for all A and Ø ≠ {Ø} k. S S False, because S=S for all S. l. (A B) C = (A C) (B C) True. It’s one of the distribution laws and it can be quickly checked using basic definitions of union or intersection or using a Venn Diagram. m. 2 2 •3 2 = gcd( 2 2 •3 3 , 2 2 •3 1 ) False, because the gcd here is 2 2 •3 1 n. gcd(a,b) = gcd(b mod a, a) True for all integers (a,b) s.t. a≠0. The Euclidean Algorithm for fast gcd computation is based on this fact for b>=a. However it’s also true for a>b because if a>b then (b mod a) = b, and it’s true for b=a because gcd(0,a)=a if a≠0.

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

This is the end of the preview. Sign up to access the rest of the document.
• Fall '07
• Jarecki
• Integers, Quantification, Euclidean algorithm, implicit domain

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern