Review sheet answers

advertisement
EECS 210
Review Sheet for Test 1
Spring 2015
Here are some problems to aid you in reviewing for test 1. You are responsible for all material
covered in class and in discussion. If there is a topic for which no question is given below, you
are still responsible for that topic. Also review the summaries at the end of Chapters 1 and 2.
1. State the contrapositive of the following: If x or y is even then x•y is even
If xy is odd then x and y are odd
2. Write the statement below (in English) in the form if p then q
For n2 to be even, it is sufficient that n is even.
If n is even then n2 is even
3. If first two statements below are true, does the conclusion logically follow? Explain.
No healthy people are fat.
All strong people are healthy
Yes, the conclusion is correct by hypothetical
Therefore, no fat people are strong. syllogism and contrapositive.
4. Consider the statement: For every x there is some y such that x2 + y2  0
a. Write the statement in symbolic notation. x y(x2 + y2  0)
b. Write the negation of the original statement (in English).
There is an x such that for every y, x2 + y2 < 0
5. Use the following predicates to translate each of the following from English to logic notation.
Assume the domains are students and courses at KU.
C(y): y is a course
S(x): x is a sophomore
A(y): y is an advanced course
F(x): x is a freshman
P(x, y): x passed course y.
T(x, y): x is taking course y
a. For each advanced course there is a freshman or sophomore who is taking it.
y (A(y)  x( (F(x) V S(x))  T(x, y) )
b. No freshman taking an advanced course passed it. xy(A(y)  F(x)  T(x, y) P(x, y)
c. Jane took an advanced course but didn’t pass it. y(A(y)  T(Jane, y)  P(Jane, y))
6. Using the predicates in question 5, translate the following expression into English:
x ((S(x)  T(x, EECS 210))  P(x, EECS 210))
Every sophomore who took EECS 210 passed it.
7. The domain of x is the set of all people, and the domain of y is the set of all movies. Using
the predicates below and any needed quantifiers, translate the sentences below into logic
notation.
S(x, y): x saw y
A(y): y won an award
L(x, y): x liked y
C(y): y is a comedy
a. No one liked every comedy he saw. x  y(C(y)  S(x, y)  L(x, y))
b. Someone has seen every award-winning comedy. xy((A(y)  C(y))  S(x, y))
8. Rewrite the following so that no negation symbol is outside of a quantifier or an expression
containing logical connectives.
(y
((C(y)  A(y))  x (L(x, y))))
y ((C(y)  A(y))  x (L(x, y)))
9. Use a truth table to determine if the following statements are equivalent.
p V (q  r) and (p V q)  (p  r)
p
q
r
q r p V (q  r) p V q
p  r (pVq)p  r
T
T
T
T
T
T
T
T
T
T
F
F
T
T
F
F
T
F
T
T
T
T
T
T
T
F
F
T
T
T
F
F
F
T
T
T
T
T
F
F
F
T
F
F
F
T
F
F
F
F
T
T
T
F
F
T
F
F
F
T
T
F
F
T
They are not equivalent—note that the fifth and last columns are not the same.
10. Prove or disprove each of the following:
a. If a mod c = b mod c then a = b
The statement is false. Letting a = 3, b = 8 and c = 5 gives a counterexample.
b. If a mod b = c then (a + 1) mod b = c + 1
This is also false, but not quite as obvious. Let a = 4 and b = 5. Then c = 4.
However, (a + 1) mod b is 5 mod 5 = 0 not 4 + 1 = 5
30
11. Evaluate the following sum:  (3/2)i The appropriate formula must be used.
i= 15
30

30
(3/2)i
i=15
=
14
(3/2)i
i=0
-  (3/2)i. Notice that this is a geometric progression with r = 3/2
i=0
Using the formula we get: [(3/2)31 – 1]/(3/2 – 1) – [(3/2)15 – 1]/(3/2 – 1)
= 2[(3/2)31 – 1] – 2[(3/2)15 – 1]
= 2[(3/2)31 – (3/2)15]
n
12. Evaluate the following sum and prove that your answer is correct by using induction:  (2i + 5).
i=1
The sum is n2 + 6n obtained as follows:
n
n
n
 (2i + 5) = 2• i +  5 = 2•[(n(n+1)/2] + 5n = n2 + n + 5n = n2 + 6n
i=1
i=1
i=1
25
13. Using the fact that 1•4 + 2•5 +... + (n)(n + 3) = [n(n+1)(n+5)]/3 find  i•(i+3).
i=11
(Do not use other formulas to evaluate this.)
25
25
10
 i•(i + 3) =  i•(i + 3) -  i•(i + 3) = (25)(26)(30)/3 – (10)(11)(15)/3 = (10)(25)(26) – 5(10)(11)
i=11
i=1
i=1
14. Consider the statement: if 3 divides n and 5 divides n then 15 divides n.
a. Prove the original statement using a direct proof.
Since 3 | n, then n = 3k for k  Z
(Definition of divides)
Since 5 | n then 5 | 3k or 3k = 5j for j  Z (Definition of divides)
Since 3k is a multiple of 5 and 5 does not divide 3, since 3 and 5 are relatively prime
Therefore, 5 | k and thus 15 | 3k or 15 | n.
b. Prove the inverse of the original statement. (Note: this is not the same as the negation.)
The inverse is “if 3 does not divide n or 5 does not divide n then 15 does not divide n”.
Since the converse is equivalent to the inverse, let’s instead prove the converse of
the original statement thereby proving the inverse. Specifically, we must show that if
15 divides n then 3 divides n and 5 divides n.
Suppose 15 | n.
Then, n = 15 j for some integer j (Definition of divides)
n = 3• 5 • j and again by the definition of divides, 3 | n and 5 | n
15. Determine if the following statements are consistent. Clearly define the propositions you
use and explain how you reached your conclusion.
If Judy does not take EECS 210 then she will not graduate. P(Judy)  G(Judy)
If Judy does not graduate then she isn’t qualified for the job. G(Judy)  Q(Judy)
If Judy reads the textbook then she is qualified for the job. R(Judy)  Q(Judy)
P(Judy)  R(Judy)
Judy doesn’t take EECS 210, but she reads the book.
Use the following predicates:
P(x) : x takes EECS 210
G(x): x graduates
Q(x): x is qualified for the job
R(x): x reads the book
The translations of the statements are to their right. Since consistency implies all
statements must be true at the same time, the last statement implies that P(Judy) is false
and that R(Judy) is true. The third statement has a true hypothesis so that for the
implication to be true the conclusion must also be true so Q(Judy) is true. Looking at
the first statement, the hypothesis is true so it’s conclusion must be also. This implies
G(Judy) is false. Finally, looking at the second statement, the hypothesis is true and the
conclusion is false so the statements are inconsistent.
16. Use mathematical induction to prove the following: 1 + 5 + 9 + ... + (4n - 3) = n(2n - 1)
Basis: n = 1 l.h.s = 1 and r.h.s. = 1(2 x 1 - 1) = 1 so it's true for the basis case.
Induction hypothesis: Assume 1 + 5 + 9 + ... + (4k - 3) = k(2k - 1) for k 1
Induction step: 1 + 5 + 9 + ... + (4k - 3) + (4(k+1) - 3) = k(2k - 1) + 4k + 1
= 2k2 - k + 4k + 1
= 2k2 + 3k + 1
= (k + 1)(2k + 1)
= (k + 1)(2[k+1] - 1)
Therefore, by the principle of Mathematical induction, the statement is true for all n.
17. Prove that n! + 2 is even for all n ≥ 2.
By definition, n! = 2•3•…•n.
Definition of factorial
then n! + 2 = 2•3•…•n + 2 = 2(3•…•n + 1)
algebra
Therefore, n! + 2 is even since it has a factor of 2 Definition of even
Download