CS/MATH 1019 Discrete Math for Computer
Science
CS/MATH 1019 Exam
Course Title and Number: CS/MATH 1019 Discrete Math
for CS
Exam Date: Midterm and Final Exam 2024- 2025
Instructor: [Insert Instructor’s Name]
Student Name: [Insert Student’s Name]
Student ID: [Insert Student ID]
Examination
180 minutes
Instructions:
1. Read each question carefully.
2. Answer all questions.
3. Use the provided answer sheet to mark your responses.
4. Ensure all answers are final before submitting the exam.
5. Please answer each question below and click Submit when you have
completed the Exam.
6. This test has a time limit, The test will save and submit automatically
when the time expires
7. This is Exam which will assess your knowledge on the course
Learning Resources.
Good Luck!
, lOMoARcPSD|46692070
YORK UNIVERSITY
SC/ MATH 1019 D
TEST #1
SOLUTIONS
The total number of points for the Test is 100.
1. (5+5 points) (a) Find a formula of Propositional Logic with just three propo-
sitional variables p, q, and r that has value T with values of p and r being T and
the value of q being F, and has value F for any other truth values of p, q, r.
Solution. p ∧ ¬q ∧ r.
(b) Find a formula of Propositional Logic with just three propositional variables
p, q, and r which is a contradiction.
Solution. (p ∧ ¬p) ∨ (q ∧ ¬q) ∨ (r ∧ ¬r) or (p ∧ ¬p) ∧ (q ∧ ¬q) ∧ (r ∧ ¬r).
2. (5+5+5 points) (a) Determine whether the following propositional formula is a
tautology. Show your work.
((p → ¬q) ∧ q) → ¬q.
Solution. This compound proposition is not a tautology because its value is F
whenever the values of q and p are T and F respectively.
(b) Prove that (q ∧ (p → ¬q)) → ¬p is a tautology using basic propositional
equivalences (Laws). Give the names of the Laws you use.
Solution.
(q ∧ (p → ¬q)) → ¬p
≡ (q ∧ (¬p ∨ ¬q)) → ¬p < Conditional Disjunction+Leibniz >
≡ (q ∧ ¬p) ∨ (q ∧ ¬q) → ¬p < Distributivity Law+Leibniz >
≡ (q ∧ ¬p) ∨ F → ¬p < Negation Law+Leibniz >
≡ (q ∧ ¬p) → ¬p < Identity Law+Leibniz >
≡ ¬(q ∧ ¬p) ∨ ¬p < Conditional Disjunction+Leibniz >
≡ (¬q ∨ ¬¬p) ∨ ¬p < De Morgan’s Law+Leibniz >
≡ ¬q ∨ (p ∨ ¬p) < Double Negation, Associativity of ∨+Leibniz >
≡ ¬q ∨ T < Negation Law+Leibniz >
≡ T < Domination Law+Leibniz >
(c) Write the contrapositive, converse, and inverse of the following: You sleep late
if it is Saturday.
Solution. ’If you don’t sleep late, then it is not Saturday’ (or it is not the case
that it is Saturday) (contrapositive).
’If you sleep late, then it is Saturday’ (converse).
’If it is not Saturday, then you don’t sleep late’ (inverse).
Date: Oct 19, 2023.
1
Downloaded by Jack mah
()