Download They are not equivalent

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Eisenstein's criterion wikipedia , lookup

Fundamental theorem of algebra wikipedia , lookup

Boolean satisfiability problem wikipedia , lookup

Propositional calculus wikipedia , lookup

Laws of Form wikipedia , lookup

Transcript
EECS 210
Review Sheet for Test 1
Fall 2011
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 necessary that n is even.
If n2 is even then n 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
or vice versa. 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 not taking it.
y (A(y)  x( (F(x) V S(x))  T(x, y) )
b. No course is being taken by only freshmen. y(C(y)  x (F(x)  T(x, 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. Use a truth table to determine if the following statements are equivalent.
p V (q  r) and (p V q)  (p  r)
p
T
T
T
T
F
F
F
F
q
T
T
F
F
T
T
F
F
r
T
F
T
F
T
F
T
F
q r
T
F
T
T
T
F
T
T
p V (q  r)
T
T
T
T
T
F
T
T
pVq
T
T
T
T
T
T
F
F
pr
T
F
T
F
F
F
F
F
(pVq)p  r
T
F
T
F
F
F
T
T
They are not equivalent
8. Use propositional logic to prove the following. Give reasons for each step.
(p V q)  (q  r)  (p  r)
1) p V q
2) p  q
3) q  r
4) p  r
hypothesis
implication and step 1
hypothesis
hypothetical syllogism from steps 2 and 3
9. 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
10. Evaluate the following sum:  (3/2)i The appropriate formula must be used.
i= 15
30

30
(3/2)i
14
=
i=15
(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
11. Evaluate the following sum and prove that your answer is correct by using induction:  (2i + 5).
i=1
The sum is
n
n2
+ 6n obtained as follows:
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
12. 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
13. 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, the
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
14. 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.
15. 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.
16. 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