Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Final Exam 1 with Answer Key - Discrete Mathematics for Computer Science | CSCI 2610, Exams of Discrete Mathematics

Material Type: Exam; Professor: Pike; Class: Discrete Mathematics for Computer Science; Subject: Computer Science; University: University of Georgia; Term: Spring 2014;

Typology: Exams

2013/2014
On special offer
30 Points
Discount

Limited-time offer


Uploaded on 05/08/2014

darthaaron
darthaaron ๐Ÿ‡บ๐Ÿ‡ธ

5

(1)

2 documents

1 / 7

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CSCI 2610 โ€“ Discrete Mathematics
for Computer Science
Spring, 2014
Thursday, February 13
Exam 1
(100 points)
Time: 75 minutes
Please PRINT your name:
Last Name:__________________
First Name:__________________
pf3
pf4
pf5
Discount

On special offer

Partial preview of the text

Download Final Exam 1 with Answer Key - Discrete Mathematics for Computer Science | CSCI 2610 and more Exams Discrete Mathematics in PDF only on Docsity!

CSCI 2610 โ€“ Discrete Mathematics

for Computer Science

Spring, 2014

Thursday, February 13

Exam 1

(100 points)

Time: 75 minutes

Please PRINT your name:

Last Name:__________________

First Name:__________________

1. (12 points) Determine the truth value of each these statements if the domain consists of all integers:

Circle T for True or F for False, the truth value for each of the following statements.

T F (1) โˆ€๐‘› (๐‘› + 1 > ๐‘›)

T F (2) โˆƒ๐‘› ( 2 ๐‘› = 3 ๐‘›)

T F (3) โˆƒ๐‘› (๐‘› = โˆ’๐‘›)

T F (4) โˆ€๐‘› (๐‘›!^ < 0 )

T F (5) โˆ€๐‘› (๐‘› < 0 โ†’ |๐‘›| = โˆ’๐‘›)

T F (6) โˆ€๐‘› (๐‘› > 0 โ†” ๐‘›!^ > 0 )

2. (18 points) Determine the truth value of each of these statements if the domain of each variable consists of all real numbers:

Circle T for True or F for False, the truth value for each of the following statements.

T F (1) โˆ€๐‘ฅโˆƒ๐‘ฆ (๐‘ฅ!^ = ๐‘ฆ)

T F (2) โˆƒ๐‘ฅโˆ€๐‘ฆ (๐‘ฅ = ๐‘ฆ!)

T F (3) โˆƒ๐‘ฅโˆƒ๐‘ฆ (๐‘ฅ + ๐‘ฆ โ‰  ๐‘ฆ + ๐‘ฅ)

T F (4) โˆ€๐‘ฅ (๐‘ฅ โ‰  0 โ†’ โˆƒ๐‘ฆ (๐‘ฅ๐‘ฆ = 1 ))

T F (5) โˆƒ๐‘ฅโˆ€๐‘ฆ (๐‘ฆ โ‰  0 โ†’ ๐‘ฅ๐‘ฆ = 1 )

T F (6) โˆƒ๐‘ฅโˆƒ๐‘ฆ (๐‘ฅ + 2 ๐‘ฆ = 2 โˆง 2 ๐‘ฅ + 4 ๐‘ฆ = 5 )

T F (7) โˆ€๐‘ฅโˆƒ๐‘ฆ (๐‘ฅ + ๐‘ฆ = 2 โˆง 2 ๐‘ฅ โˆ’ ๐‘ฆ = 1 )

T F (8) โˆ€๐‘ฅโˆ€๐‘ฆโˆƒ๐‘ง (๐‘ง = (๐‘ฅ + ๐‘ฆ) โˆ• 2 )

6. (5 points) Determine whether the following argument is valid, and prove your result is correct. She is a Math Major or a Computer Science Major. If she does not know discrete math, she is not a Math Major. If she knows discrete math, she is smart. She is not a computer Science Major. Therefore, she is smart. Valid. Let p denote โ€œShe is a Math Majorโ€, q denote โ€œshe is a Computer Science Majorโ€, r denote โ€œshe knows discrete mathโ€, s denote โ€œShe is smartโ€. Then the premises of the argument form are: ๐‘ โˆจ ๐‘ž, ยฌ๐‘Ÿ โ†’ ยฌ๐‘, ๐‘Ÿ โ†’ ๐‘ , ยฌ๐‘ž and the conclusion is s. This argument form is valid, because:

  1. ๐‘ โˆจ ๐‘ž Premise
  2. ยฌ๐‘ โ†’ ๐‘ž Logical equivalences
  3. ยฌ๐‘ž Premise
  4. ๐‘ Modus Tollens from 2 and 3
  5. ยฌ๐‘Ÿ โ†’ ยฌ๐‘ Premise
  6. ๐‘Ÿ Modus Tollens from 4 and 5
  7. ๐‘Ÿ โ†’ ๐‘  Premise
  8. ๐‘  Modus Pollens from 6 and 7 7. (5 points) Identify the error or errors in this argument that supposedly shows that if โˆƒ๐’™๐‘ท(๐’™) โˆง โˆƒ๐’™๐‘ธ(๐’™)) is true then โˆƒ๐’™ (๐‘ท(๐’™) โˆง ๐‘ธ(๐’™)) i. โˆƒ๐’™๐‘ท(๐’™) โˆง โˆƒ๐’™๐‘ธ(๐’™) Premise ii. โˆƒ๐’™๐‘ท(๐’™) Simplification from i. iii. ๐‘ท(๐’„) Existential instantiation from ii. iv. โˆƒ๐’™๐‘ธ(๐’™) Simplification from i. v. ๐‘ธ(๐’„) Existential instantiation from iv. vi. ๐‘ท(๐’„) โˆง ๐‘ธ(๐’„) Conjunction from iii. and v. vii. โˆƒ๐’™(๐‘ท(๐’™) โˆง ๐‘ธ(๐’™)) Existential generalization from vi. The error occurs in step v, because we cannot assume, as is being done here, that the c that makes P(x) true is the same as the c that makes Q(x) true.

8. (10 points) Show that ยฌ๐’’ โˆง (๐’‘ โ†’ ๐’’) and ยฌ(๐’‘ โˆจ ๐’’) are equivalent (a) using a truth table (b) using logical equivalences ๐’‘ ๐’’ ยฌ๐’’ ๐’‘ โ†’ ๐’’ ยฌ๐’’ โˆง (๐’‘ โ†’ ๐’’) ๐’‘ โˆจ ๐’’ ยฌ(๐’‘ โˆจ ๐’’) F F T T T F T F T F T F T F T F T F F T F T T F T F T F

  1. ยฌ๐‘ž โˆง (๐‘ โ†’ ๐‘ž)
  2. ยฌ๐‘ž โˆง (ยฌ๐‘ โˆจ ๐‘ž) Logical equivalences from 1
  3. (ยฌ๐‘ž โˆง ยฌ๐‘) โˆจ (ยฌ๐‘ž โˆง ๐‘ž) Distributed Law from 2
  4. (ยฌ๐‘ž โˆง ยฌ๐‘) โˆจ ๐น Negation Law from 3
  5. ยฌ๐‘ž โˆง ยฌ๐‘ Identity Law from 4
  6. ยฌ(๐‘ โˆจ ๐‘ž) De Morganโ€™s Law from 5

10. (15 points) Prove the following theorems: (1) if m and n are integers and mn is even, then m is even or n is even. (2) ๐’™ โ‰ค |๐’™| for all real numbers ๐’™. (give a proof by cases)

Section 1.7 Introduction to Proofs 29

  1. This is true. Suppose that a/b is a nonzero rational number and that x is an irrational number. We must prove that the product xa/b is also irrational. We give a proof by contradiction. Suppose that xa/b were rational. Since a/b != 0 , we know that a != 0 , so b/a is also a rational number. Let us multiply this rational number b/a by the assumed rational number xa/b. By Exercise 26, the product is rational. But the product is (b/a)(xa/b) = x, which is irrational by hypothesis. This is a contradiction, so in fact xa/b must be irrational, as desired.
  2. If x is rational and not zero, then by definition we can write x = p/q , where p and q are nonzero integers. Since 1 /x is then q/p and p != 0 , we can conclude that 1 /x is rational.
  3. We give a proof by contraposition. If it is not true than m is even or n is even, then m and n are both odd. By Exercise 6, this tells us that mn is odd, and our proof is complete.
  4. a) We must prove the contrapositive: If n is odd, then 3 n + 2 is odd. Assume that n is odd. Then we can write n = 2 k + 1 for some integer k. Then 3 n + 2 = 3(2k + 1 ) + 2 = 6 k + 5 = 2(3k + 2 ) + 1. Thus 3 n + 2 is two times some integer plus 1, so it is odd. b) Suppose that 3 n + 2 is even and that n is odd. Since 3 n + 2 is even, so is 3 n. If we add subtract an odd number from an even number, we get an odd number, so 3 n โˆ’ n = 2 n is odd. But this is obviously not true. Therefore our supposition was wrong, and the proof by contradiction is complete.
  5. We need to prove the proposition โ€œIf 1 is a positive integer, then 12 โ‰ฅ 1 .โ€ The conclusion is the true statement 1 โ‰ฅ 1. Therefore the conditional statement is true. This is an example of a trivial proof, since we merely showed that the conclusion was true.
  6. We give a proof by contradiction. Suppose that we donโ€™t get a pair of blue socks or a pair of black socks. Then we drew at most one of each color. This accounts for only two socks. But we are drawing three socks. Therefore our supposition that we did not get a pair of blue socks or a pair of black socks is incorrect, and our proof is complete.
  7. We give a proof by contradiction. If there were at most two days falling in the same month, then we could have at most 2 ยท 12 = 24 days, since there are 12 months. Since we have chosen 25 days, at least three of them must fall in the same month.
  8. We need to prove two things, since this is an โ€œif and only ifโ€ statement. First let us prove directly that if n is even then 7 n + 4 is even. Since n is even, it can be written as 2 k for some integer k. Then 7 n + 4 = 14 k + 4 = 2(7k + 2 ). This is 2 times an integer, so it is even, as desired. Next we give a proof by contraposition that if 7 n + 4 is even then n is even. So suppose that n is not even, i.e., that n is odd. Then n can be written as 2 k + 1 for some integer k. Thus 7 n + 4 = 14 k + 11 = 2(7k + 5 ) + 1. This is 1 more than 2 times an integer, so it is odd. That completes the proof by contraposition.
  9. There are two things to prove. For the โ€œifโ€ part, there are two cases. If m = n, then of course m^2 = n^2 ; if m = โˆ’n, then m^2 = (โˆ’n)^2 = (โˆ’1)^2 n^2 = n^2. For the โ€œonly ifโ€ part, we suppose that m^2 = n^2. Putting everything on the left and factoring, we have (m + n)(m โˆ’ n) = 0. Now the only way that a product of two numbers can be zero is if one of them is zero. Therefore we conclude that either m + n = 0 (in which case m = โˆ’n), or else m โˆ’ n = 0 (in which case m = n), and our proof is complete.
  10. We write these in symbols: a < b, (a + b)/ 2 > a, and (a + b)/ 2 < b. The latter two are equivalent to a + b > 2 a and a + b < 2 b, respectively, and these are in turn equivalent to b > a and a < b, respectively. It is now clear that all three statements are equivalent. 480 Test Bank Questions and Answers
  11. Suppose x is odd but x + 2 is even. Therefore x = 2 k + 1 and x + 2 = 2 l. Hence (2k + 1 ) + 2 = 2 l. Therefore 2(k + 1 โˆ’ l) = โˆ’ 1 (even = odd), a contradiction.
  12. Let n = 2 k. Therefore n + 1 = 2 k + 1 , which is odd.
  13. Suppose n + 1 is even. Therefore n + 1 = 2 k. Therefore n = 2 k โˆ’ 1 = 2 (k โˆ’ 1) + 1 , which is odd.
  14. Suppose n = 2 k but n + 1 = 2 l. Therefore 2 k + 1 = 2 l (even = odd), which is a contradiction.
  15. If n is even, then n = 2 k. Therefore 3 n^2 + 8 = 3(2k)^2 + 8 = 12 k^2 + 8 = 2(6k^2 + 4), which is even. If n is odd, then n = 2 k + 1. Therefore 3 n^2 + 8 = 3(2k + 1 )^2 + 8 = 12 k^2 + 12 k + 11 = 2(6k^2 + 6 k + 5 ) + 1 , which is odd.
  16. If n is even, then n^2 = ( 2 k)^2 = 2(2k^2 ), which is even. If n is odd, then n^2 = ( 2 k + 1 )^2 = 2(2k^2 + 2 k) + 1 , which is odd.
  17. If m = 2 k and n = 2 l, then mn = 4 kl. Hence mn is a multiple of 4.
  18. False: x = 2 y = 1 /2.
  19. False: x = 1 /2.
  20. False: x = 3 /2, y = 3 /2.
  21. Case 1, x โ‰ฅ 0: then x = |x|, so x โ‰ค |x|. Case 2, x < 0: here x < 0 and 0 < |x|, so x < |x|.
  22. It is easier to give a contraposition proof; it is usually easier to proceed from a simple expression (such as n) to a more complex expression (such as 3 n + 5 is even). Begin by supposing that n is not odd. Therefore n is even and hence n = 2 k for some integer k. Therefore 3 n + 5 = 3(2k) + 5 = 6 k + 5 = 2(3k + 2 ) + 1, which is not even. If we try a direct proof, we assume that 3 n + 5 is even; that is, 3 n + 5 = 2 k for some integer k. From this we obtain n = ( 2 k โˆ’ 5)/3, and it it not obvious from this form that n is even.
  23. Prove that (a) and (b) are equivalent and that (a) and (c) are equivalent.
  24. If at most three people were born in each of the 12 months of the year, there would be at most 36 people.
  25. Give a proof by cases. There are only six cases that need to be considered: x = y = 1 ; x = 1 , y = 2 ; x = 1 , y = 3 ; x = 2 , y = 1 ; x = y = 2 ; x = 2 , y = 3.
  26. The steps in the โ€œproofโ€ cannot be reversed. Knowing that the squares of two numbers, โˆ’ 3 and 3, are equal does not allow us to infer that the two numbers are equal. Questions for Chapter 2 For each of the pairs of sets in 1-3 determine whether the first is a subset of the second, the second is a subset of the first, or neither is a subset of the other.
  27. The set of people who were born in the U.S., the set of people who are U.S. citizens.
  28. The set of students studying a programming language, the set of students studying Java.
  29. The set of animals living in the ocean, the set of fish.
  30. Prove or disprove: A โˆ’ (B โˆฉ C) = (A โˆ’ B) โˆช (A โˆ’ C).
  31. Prove that A โˆฉ B = A โˆช B by giving a containment proof (that is, prove that the left side is a subset of the right side and that the right side is a subset of the left side).
  32. Prove that A โˆฉ B = A โˆช B by giving an element table proof.
  33. Prove that A โˆฉ B = A โˆช B by giving a proof using logical equivalence.