Self-Assessment Quiz: Propositional Logic
Twenty questions to check your grasp of propositions, connectives, truth tables, equivalence, and satisfiability. Answer each before opening the key. Aim for 16+.
Question 1
Which of the following is a proposition?
A) "Deploy the new build." B) "$x \le 10$." (with $x$ a free variable) C) "$100$ is a perfect square." D) "Is the cache stale?"
Question 2
The connective whose defining feature is "true exactly when its two inputs differ" is:
A) conjunction ($\land$) B) disjunction ($\lor$) C) exclusive or ($\oplus$) D) biconditional ($\leftrightarrow$)
Question 3
$p \rightarrow q$ is false in exactly which case?
A) $p$ false, $q$ false B) $p$ true, $q$ false C) $p$ false, $q$ true D) $p$ true, $q$ true
Question 4
How many rows does the truth table of a compound proposition with six distinct variables have?
A) $12$ B) $36$ C) $64$ D) $128$
Question 5
Given the precedence rules of the chapter, $\neg p \lor q \land r$ is grouped as:
A) $\neg(p \lor (q \land r))$ B) $(\neg p) \lor (q \land r)$ C) $((\neg p) \lor q) \land r$ D) $\neg((p \lor q) \land r)$
Question 6
"$p \rightarrow q$ with $p$ false" is true regardless of $q$. The chapter's name for this is:
A) the converse B) vacuously true C) the contrapositive D) a contradiction
Question 7
Which pair is logically equivalent?
A) $p \rightarrow q$ and $q \rightarrow p$ B) $p \rightarrow q$ and $\neg q \rightarrow \neg p$ C) $\neg(p \land q)$ and $\neg p \land \neg q$ D) $p \oplus q$ and $p \leftrightarrow q$
Question 8
De Morgan's first law states that $\neg(p \land q)$ is equivalent to:
A) $\neg p \land \neg q$ B) $\neg p \lor \neg q$ C) $p \lor q$ D) $\neg p \rightarrow \neg q$
Question 9
A proposition that is true on every assignment is a:
A) contradiction B) contingency C) tautology D) satisfiable formula only
Question 10
By the absorption law, $a \lor (a \land b)$ simplifies to:
A) $a \land b$ B) $a \lor b$ C) $a$ D) $b$
Question 11
A proposition is satisfiable when:
A) it is true on every assignment B) there exists at least one assignment making it true C) it is false on every assignment D) it has no free variables
Question 12
An unsatisfiable proposition is the same thing as a:
A) tautology B) contingency C) contradiction D) biconditional
Question 13
The reason Python implements implication as (not p) or q is the equivalence:
A) $p \rightarrow q \equiv \neg p \lor q$ B) $p \rightarrow q \equiv \neg q \rightarrow \neg p$ C) $p \rightarrow q \equiv q \rightarrow p$ D) $p \rightarrow q \equiv p \land \neg q$
Question 14
$\neg(p \rightarrow q)$ is logically equivalent to:
A) $\neg p \rightarrow \neg q$ B) $\neg p \lor q$ C) $p \land \neg q$ D) $q \rightarrow p$
Question 15 (True/False, justify)
True or false: For the purposes of logical equivalence, $p \land q$ and $q \land p$ are
interchangeable. Justify in one sentence, and add one sentence on whether p and q and q and p are
always interchangeable in code.
Question 16 (True/False, justify)
True or false: The converse of an implication is logically equivalent to the implication. Justify with a single assignment of truth values.
Question 17 (True/False, justify)
True or false: If a compound proposition is a tautology, then its negation is unsatisfiable. Justify in one sentence.
Question 18 (Short answer)
State both of De Morgan's laws in symbols.
Question 19 (Short answer)
A streaming service writes if is_subscriber or is_free and age > 13: intending the rule "(subscriber
or free) and over thirteen." In one sentence, explain why the code is wrong, and give the corrected
condition.
Question 20 (Short answer)
A truth table has $2^n$ rows. In one or two sentences, explain how this innocent doubling becomes the "exponential wall" behind the satisfiability problem (§1.6).
Answer Key
| Q | Ans | Note |
|---|---|---|
| 1 | C | A declarative statement with a definite truth value (true). A is a command, B has a free variable, D is a question. |
| 2 | C | Exclusive or is true exactly where the inputs differ; the biconditional is true where they agree. |
| 3 | B | An implication fails only with a true hypothesis and a false conclusion. |
| 4 | C | $2^6 = 64$ rows: each variable doubles the count. |
| 5 | B | Precedence $\neg \succ \land \succ \lor$, so $\neg p$ and $q \land r$ form first, joined by $\lor$. |
| 6 | B | A false hypothesis makes the implication vacuously true. |
| 7 | B | The contrapositive is equivalent to the original; the converse (A) is not; C reverses De Morgan; D negates the biconditional. |
| 8 | B | Negation of an "and" is the "or" of the negations. |
| 9 | C | A tautology's output column is all $T$. |
| 10 | C | Absorption: $a \lor (a \land b) \equiv a$. |
| 11 | B | Satisfiable = at least one satisfying assignment exists. |
| 12 | C | No satisfying assignment means false on every row — a contradiction. |
| 13 | A | The Implication law lets us replace $\rightarrow$ (absent in Python) with $\neg p \lor q$. |
| 14 | C | The only way an implication fails is hypothesis-true, conclusion-false: $p \land \neg q$. |
| 15 | True | As propositions they have identical truth tables (commutativity); in code they can differ because of side effects / short-circuit evaluation order. |
| 16 | False | Take $p=F, q=T$: $p \rightarrow q$ is $T$ but the converse $q \rightarrow p$ is $F$, so they differ. |
| 17 | True | If $A$ is always true, $\neg A$ is always false — no satisfying assignment, hence unsatisfiable. |
| 18 | — | $\neg(p \land q) \equiv \neg p \lor \neg q$ and $\neg(p \lor q) \equiv \neg p \land \neg q$. |
| 19 | — | and binds tighter than or, so it reads as is_subscriber or (is_free and age > 13); a 12-year-old subscriber passes. Fix: if (is_subscriber or is_free) and age > 13:. |
| 20 | — | Brute-forcing satisfiability checks all $2^n$ rows; doubling per variable makes this feasible for small $n$ but astronomically large (e.g. $2^{60}$) for moderate $n$ — the exponential wall behind SAT and P vs. NP. |
Topics to review by question
| Questions | Topic | Section |
|---|---|---|
| 1 | What counts as a proposition | §1.2 |
| 2, 3, 6 | The six connectives (xor, implication, vacuous truth) | §1.2 |
| 4, 20 | Truth tables and the $2^n$ row count | §1.3, §1.6 |
| 5, 19 | Operator precedence (and the streaming bug) | §1.1, §1.2 |
| 7, 8, 16, 18 | Logical equivalence, De Morgan, contrapositive vs. converse | §1.4 |
| 9, 12 | Tautology / contradiction / contingency | §1.4 |
| 10 | Simplifying conditions (absorption) | §1.5 |
| 13, 14 | The Implication law and the negated implication | §1.4 |
| 11, 12, 17 | Satisfiability and its link to tautology | §1.6 |
| 15 | Equivalence vs. short-circuit evaluation in code | §1.5 |