StreakPeaked· Practice

ExamsGATETechnical

Which one of the following propositional logic formulas is TRUE when exactly two of p, q, and r are TRUE ?

  1. ((p ↔ q) ∧ r) ∨ (p ∧ q ∧ ~r)
  2. (~(p ↔ q) ∧ r) ∨ (p ∧ q ∧ ~r)
  3. ((p → q) ∧ r) ∨ (p ∧ q ∧ ~r)
  4. (~(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 →