York University
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
(mungaidavid2000@gmail.com)
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller YourAssignmentHandlers. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for £12.26. You're not tied to anything after your purchase.