Uploaded by badr.haitof

Quiz1 F16 Sol vf

advertisement
COEN 231: Introduction to Discrete Mathematics
October 6th, 2016: 8:50am – 9:55am
Time Allowed: 1 hour and 5 minutes
Last Name: _______________________________Instructor’s Solution___________________________
Student Number (Concordia ID):___________________________________________________________
Email address:
________________________________________________________________________
INSTRUCTIONS
1. This is a 65 minutes, Close Book test. A non-programmable calculator may be used, but no other material
will be allowed to be used including any blank paper.
2. Write your name, student number, and email address on your test paper in the space provided above. Don’t
turn this page until you are instructed to do so.
3. All questions are of valued based on table below. Each part of a question has different value as defined at the
end of each part.
4. Please complete all 4 questions on this booklet. Use the test booklet for all your work (including scratch
work) and you may use the back of pages. Do not tear out pages. Hand in the test booklet at the end of the
examination.
5. Make sure your number the solution parts according to the problem. You should show your work and explain
clearly what you are doing. Answers without explanation or shown work, where appropriate, will receive low
or zero points.
6. No questions are allowed during the exam. Good luck!
Maximum
Problem 1
10
Problem 2
30
Problem 3
30
Problem 4
30
Total
100
Score
Question 1 (10 marks)
a) Consider the following sets: A = {a, b, {a,b}, {}}, B = {b, c, d}. What are the cardinalities of:
A, B, C = {x | (x ϵ A) ˄ (x ϵ B)}, and D = {x | (x ϵ A) ˅ (x ϵ B)}? [4 points]
b) What is the power set of set A = {b, {a,b}, {}}. [2 points]
c) Find the cardinality of the following set: E = {x ϵ N} 2 ≤ x ≤ 22 ˄ x is divisible by 3}. [4 points]
Solution:
a) |A| = 4, |B| = 3, |C| = 1, and |D| = 6
b) P(A) = {{b}, {{}}, {{a,b}}, {b,{a,b}}, {b, {}}, {{a,b},{}}, { b, {a,b}, {}}, {}}
c) E = {3, 6, 9, 12, 15, 18, 21}, therefore |E|=7.
copyright © F16, COEN-231, Concordia University
2
Question 2 (30 marks)
a) Show that the following conditional statements is a tautology without using truth tables and
by using equivalence and inference rules. [10 points] (Hint: Note that Disjunctive Syllogism
rule of inference states that ((p ∨ q) ∧ ¬p) → q is a tautology.)
[(p ∨ q) ∧ (p → r) ∧ (q → r)] → r
b) Translate the following statements into logical expressions sing predicates, quantifiers, and
logical connectives, assume the domain of discourse to be all things. [20 points]
a. Nothing is in the correct place and is in excellent condition.
b. One of your tools is not in the correct place, but it is in excellent condition.
Solution:
a) Using the equivalence for conditional operation we have: p → r≡¬p ∨ r and q → r≡¬q ∨ r,
therefore, the compound proposition on the left hand side (LHS) of the equation in the
question reduces to: (p ∨ q) ∧ (¬p ∨ r) ∧ (¬q ∨ r). For the last two terms we have the
following equivalence (¬p ∨ r) ∧ (¬q ∨ r) ≡ r ∨ (¬p ∧ ¬q) ≡ r ∨ ¬ (p ∨ q) which reduces
the equation to (p ∨ q) ∧ (r ∨ ¬ (p ∨ q)) based of the rule of Disjunctive syllogism we
can conclude that r is true.
b) Let the domain of discourse be all things and
R(x): “x is in the correct place”;
E(x): “x is in excellent condition”;
T(x): “x is a [or your] tool”; and let.
a. This is saying that everything fails to satisfy the condition: ∀x¬(R(x) ∧ E(x)).
b. There exists a thing with this property: ∃x (T(x) ∧ ¬R(x) ∧ E(x)).
copyright © F16, COEN-231, Concordia University
3
Question 3 (30 marks)
(a) Use rules of inference to show that if ∀x(P(x) →(Q(x) ∧ S(x))) and ∀x(P(x) ∧ R(x)) are true, then
∀x(R(x) ∧ S(x)) is true. [10 points]
(b) Use rules of inference to show that the hypotheses “If it does not rain or if it is not foggy, then the
sailing race will be held and the lifesaving demonstration will go on,” “If the sailing race is held, then
the trophy will be awarded,” and “The trophy was not awarded” imply the conclusion “It rained.” [20
points]
Solution:
a)
Step
Reason
1. From P(x) ∧ R(x), we conclude P(x)
Simplification
3. From Q(x) ∧ S(x), we conclude S(x)
Simplification
2. From P(x) →(Q(x) ∧ S(x)) and P(x), Modus ponens
conclude Q(x) ∧ S(x)
4. From P(x) ∧ R(x), we conclude R(x)
5. From 3 and 4 we conclude R(x) ∧ S(x)
Simplification
Conjunction
b)
copyright © F16, COEN-231, Concordia University
4
Question 4 (30 marks)
a) Show that at least three of any 25 days chosen must fall in the same month of the year. [10 points]
b) Prove that if n is a positive integer, then n is even if and only if 7n + 4 is even. [20 points]
Solution:
a) 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.
b) 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 7n + 4 is even. Since n is even, it can be written as 2k for some
integer k. Then 7n + 4 = 14k + 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 7n + 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 2k +1 for some integer k. Thus
7n+4 = 14k +11 = 2(7k +5)+1. This is 1 more than 2 times an integer, so it is odd. That
completes the proof by contraposition.
copyright © F16, COEN-231, Concordia University
5
Extra Page
copyright © F16, COEN-231, Concordia University
6
Download