CSI2101-Mid-term-2019- Solution

Telechargé par mail
CSI 2101 (W19) - MIDTERM TEST
SOLUTION
(For questions 1 and 2 you do not need to show your work, it will not be marked,
even if you do show it)
Question 1. [4 points] Suppose P(x, y) is a predicate and the universe for the variables x
and y is {1, 2, 3}. Suppose P(1, 3), P(2, 1), P(2, 2), P(2, 3), P(3, 1), P(3, 2) are true, and
P(x, y) is false otherwise. Determine the truth value of the statements:
¬xy (P(x, y) ˄ ¬P(y, x)) FALSE
It is equivalent to xy ¬ (P(x, y) ˄ ¬P(y, x)) = xy P(x, y) ˅ P(y, x))
And this is not true when x= 2 and y=1
yx (P(x, y) P(y, x)) TRUE
It is equivalent to yx (¬ (P(x, y) ˅ P(y, x)). Easy to check for y=1, 2 and 3
yx (x y ˄ P(x, y)) FALSE
For y=1 the only x where x y is x=1. But P(1, 1) is false.
xy (x = y ˄ P(x, y)) TRUE
x=2 and y=2 satisfy the formula.
Question 2. [2 points] (Circle the correct answer)
The formula 5 y x M(x, y) corresponds to 'Everybody has a mother'?
Question 3 [6 marks] Determine whether the following argument is valid (write clearly
your proof):
p r
q r
¬ (p ˅ q)
¬r
Not valid, enough to consider the counter example p=F, q=F and r=T. All hypothesis are
true but not the conclusion.
Question 4 [6 marks] Prove or disprove the following:
If p and q are prime numbers, then p + q is not a prime number.
Disprove: enough to consider the counter example p=2 and q=3, both are primes but
p+q=5 is also prime.
2
Question 5. [7 points] Prove the following theorem:
Let n be an integer. If n2 2n +3 is even, then n is odd.
(Indicate clearly which type of proof you are using)
Proof by contrapositive:
Suppose n is even thus n= 2k. Therefore n2 2n +3 = (2k)2 2(2k) +3 = 2(2k2 2k +1) +1.
Thus n2 2n +3 is odd.
1 / 2 100%
La catégorie de ce document est-elle correcte?
Merci pour votre participation!

Faire une suggestion

Avez-vous trouvé des erreurs dans linterface ou les textes ? Ou savez-vous comment améliorer linterface utilisateur de StudyLib ? Nhésitez pas à envoyer vos suggestions. Cest très important pour nous !