Exams › GATE › Technical
Which one of the following propositional logic formulas is TRUE when exactly two of p, q, and r are TRUE ?
- ((p ↔ q) ∧ r) ∨ (p ∧ q ∧ ~r)
- (~(p ↔ q) ∧ r) ∨ (p ∧ q ∧ ~r)
- ((p → q) ∧ r) ∨ (p ∧ q ∧ ~r)
- (~(p ↔ q) ∧ r) ∧ (p ∧ q ∧ ~r)
Correct answer: (~(p ↔ q) ∧ r) ∨ (p ∧ q ∧ ~r)
Solution
The correct option is true because it captures the scenario where exactly two of the variables are true: it allows for the case where p and q are true while r is false, and also the case where p and r are true while q is false, ensuring that only two variables are true at any time.
Related GATE Technical questions
⚔️ Practice GATE Technical free + battle 1v1 →