Vous êtes sur la page 1sur 5

Practice for Test 1 Take Home Portion It is expected that you will use a computer or a programmable calculator for

these problems. If you want any partial credit be sure to include enough information in your answer to explain how you arrived at it. 1. [10] Translate the statements into logical expressions, then construct a truth table to answer the given question. Four friends have been identified as suspects for an unauthorized access into a computer system. They have made statements to the investigating authorities. Alice said, "Carlos did it." John said, "I did not do it." Carlos said, "Diana did it." Diana said, "Carlos lied when he said that I did it." If the authorities know that exactly one of the four suspects is telling the truth, then who did it? Provide the truth table and your conclusion for credit.
A T F F F C F T F F D F F T F J F F F T c c a c X X d j c c X valid n n y n Justification If Alice is the only truth teller, then John is lying when he denies doing it. But if he did it, then Alice lies when blaming Carlos. Same problem as above. No contradictions and assuming John is a liar only John is implicated. Either Carlos or Diana must be telling the truth, but we are assuming that both are lying.

It must be the case that John is the culprit and Diana the lone truth teller. (In the table above, upper case signifies truth telling, lower case indicates culprit if an "X" or source of contradiction if a "c". 2. [10] Prove that a+b a 2 + b2 for all real numbers, a and b, both greater than zero. 2 2

Case 1 a = b. a + b 2a = = a and 2 2 Case 2 a b

a 2 + b2 2a 2 = =a 2 2

a+b a 2 + b2 2 2 2 2 a + 2ab + b a2 + b2 4 2 2 2 2 a + 2ab + b 2a + 2b 2 0 a 2ab + b = ( a b )


2 2 2

Subtract LHS from RHS

3. [10] Evaluate

( sin ( i ) cos ( j ) )
i =1 j =1

25

10

TI-83+ program 0 sto S For(I,1,25) For(J,1,10) S + (sin(I)-cos(J)) sto S End End Disp S Stop S = 34.85495 In class portion 1. [7] Fill in the truth table for the proposition, ( p q ) ( p r ) . p q r pq p r

T T T T F F F F

T T F F T T F F

T F T F T F T F

T T T T T T F F

F T F T F F F F

( p q ) ( p r ) F T F T F F T T

2. [7] Show that ( p q ) p q ( p q ) ( ( p q ) ( q p ) ) ( p q ) ( q p ) Definition of exclusive or De Morgan De Morgan

( ( p q ) ( q p ) ) ( p q ) ( q p ) ( p q ) ( q p )

( p q ) ( q p ) ( p q ) ( q p ) Definition of implication ( p q ) ( q p ) p q Definition of double implication


3. [7] Assign logical variables to the following statement, and express it using quantifiers. Then state the negation so that no negation is to the left of a quantifier. There exists a pig that can swim and catch fish. P(x) means x can swim and catch fish where x is a pig. Statement: xP ( x ) Negation: xP ( x ) 4. [7] Use rules of inference to identify the incorrect argument(s). a) premises Argument All students in this class understand logic. Xavier is a student in this class. Xavier understands logic. b) premises Argument Every computer science major takes discrete math. Natasha is taking discrete math. Natasha is a computer science major c) premises premises Argument All parrots like fruit. d) Argument Everyone who eats granola every day is healthy. Linda is not healthy. Linda does not eat granola.

My bird is not a parrot. My bird does not like fruit.

Argument Valid/Invalid Reason V mp a)

b) c) d)

I I V

ac dh mt

5. [7] Prove that if m + n and n + p are even integers, where m, n and p are integers, that m + p is even. n is odd m + 2k - 1 = 2j m - 1 = 2(j - k) if m is odd, 2n - 1 - 1 = 2(j - k) 2(n - 1) = 2(j - k) if m is even, 2n -1 = 2(j - k) m and by similar reasoning p are both odd 2j - 1 + 2k - 1 = 2[(j + k) - 1] even n is even m + 2k = 2j m = 2(j - k) m and by similar reasoning p are both even 2j + 2k = 2(j + k) even 6. [7] Let A = {1, 2, 5}. Find A A. (1,1 ) (2,1 ) (5,1 ) (1,2 ) (2,2 ) (5,2 ) (1,5) (2,5) (5,5)

For questions 7 - 9 refer to the universal set, U, and the two subsets of U given by A and B below. Let U = {0, 1, 2, 3, 4, 5, 6}, A = {1, 3, 6} and B = {0, 2, 3, 4} 7. [7] Find the cardinality of A I B . 6 8. [7] Find the Bitstring representation of A U B . A B 0 1 0 1 0 0 1 0 1 0 0 0 1 1

AUB

0 1 0 1 0 1 1

9. [7] Construct a Venn Diagram to illustrate these sets.

1 6

0 2 4

10. [7] Let f be a function from the set A to the set B. Let S and T be subsets of A. Show that f ( S I T ) f ( S) I f (T ) . b f ( S I T ) b = f ( a ) for some a ( S I T ) b f ( S ) b f ( T ) b ( f ( S ) I f ( T ) ) a ( S I T ) a S a T

Vous aimerez peut-être aussi