Mid Term Exam 2023
Mid Term Exam 2023
Objective
c) Biconditional d) Conjunction
2. In propositional logic, what is the contrapositive of the statement "If it is raining, then the
ground is wet"?
a) If the ground is wet, then it is raining. b) If it is not raining, then the ground is not wet.
c) If the ground is not wet, then it is not raining. d) If it is raining, then the ground is not wet.
3. Which rule of inference is used to make conclusions from a conjunction in propositional logic?
4. Which rule of inference allows you to conclude that if "A implies B" is true and "B implies C" is
true, then "A implies C" is also true?
5. In propositional logic, what is the rule of inference that allows you to infer the negation of the
conclusion if you know the negation of the consequent in a conditional statement?
c) Simplification d) Contradiction
a) p ∨ ~ p b) p ∧ ~ p
c) p ⊕ ~ p d) p → ~ p
7. If p is true and q is false, what is the truth value of the expression (p ∧ ~q)?
a) True b) False
a) ∧ (Conjunction) b) ∨ (Disjunction)
9. If you have the statements "p ∧ q" and "¬q," which rule of inference allows you to conclude "p"?
10. Which of the following logical equivalences is known as De Morgan's law in propositional logic?
a) ¬(p ∧ q) ≡ ¬p ∧ ¬q b) ¬(p ∨ q) ≡ ¬p ∨ ¬q
c) ¬(p → q) ≡ ¬p → ¬q d) ¬(p ⊕ q) ≡ ¬p ⊕ ¬q
11. In predicate logic, what is the role of quantifiers like "∀" and "∃"?
a) "There exists a number x such that x > 5." b) "For every student s, s studies diligently."
a) Disjunction b) Conjunction
c) Implication d) Negation
16. Which rule of inference allows you to conclude that "If it is not raining, then the ground is not
wet"?
17. What is the conclusion of the rule of inference known as "Modus Ponens" given the premises "If
it is sunny, then Jane goes for a walk" and "It is sunny"?
19. In discrete mathematics, if you have the premises "If A, then B" and "If B, then C," which rule of
inference allows you to conclude "If A, then C"?
20. What is the rule of inference that allows you to infer the negation of the conclusion when you
know the antecedent and the negation of the consequent in a conditional statement?
Subjective
Q:1. Let p and q be the propositions where p : You drive over 65 miles per hour. q : You get a speeding
ticket. [10 Marks]
Write these propositions using p and q and logical connectives (including negations).
b) You drive over 65 miles per hour, but you do not get a speeding ticket.
c) You will get a speeding ticket if you drive over 65 miles per hour.
d) If you do not drive over 65 miles per hour, then you will not get a speeding ticket.
e) Driving over 65 miles per hour is sufficient for getting a speeding ticket
Q:2. Let p, q, and r be the propositions, p : Grizzly bears have been seen in the area. q : Hiking is safe on
the trail. r : Berries are ripe along the trail. [10 Marks]
Write these propositions using p, q, and r and logical connectives (including negations).
a) Grizzly bears have not been seen in the area and hiking on the trail is safe, but berries are ripe along
the trail.
b) If berries are ripe along the trail, hiking is safe if and only if grizzly bears have not been seen in the
area.
c) It is not safe to hike on the trail, but grizzly bears have not been seen in the area and the berries along
the trail are ripe.
d) For hiking on the trail to be safe, it is necessary but not sufficient that berries not be ripe along the
trail and for grizzly bears not to have been seen in the area.
e ) Hiking is not safe on the trail whenever grizzly bears have been seen in the area and berries are ripe
along the trail.
Q:3. Construct a truth table for each of these compound propositions. [10 Marks]
Q:4. Following given questions relate to inhabitants of an island on which there are three kinds of
people: [10 Marks]
knights who always tell the truth, knaves who always lie, and spies (called normals by Smullyan [Sm78])
who can either lie or tell the truth. You encounter three people, A, B, and C. You know one of these
people is a knight, one is a knave, and one is a spy. Each of the three people knows the type of person
each of other two is.
For each of these situations, if possible, determine whether there is a unique solution and determine
who the knave, knight, and spy are. When there is no unique solution, list all possible solutions or state
that there are no solutions.
a) A says “I am the knight,” B says “I am the knave,” and C says “B is the knight.”
b) A says “I am not the spy,” B says “I am not the spy,” and C says “I am not the spy.”
Q:5. Translate each of these statements into logical expressions in three different ways by varying the
domain and by using predicates with one and with two variables. [10 Marks]
Q:6. What rule of inference is used in each of these arguments? [10 Marks]
Q:7. a) Prove or disprove that the product of two irrational numbers is irrational. [5 Marks]
b) Prove that if n is a positive integer, then n is odd if and only if 5n + 6 is odd. [5 Marks]