Which one of the following propositional logic formulas is TRUE when exactly two of p, q, and r are TRUE? A. ((~p v q) ^ r) v ((~p v ~q) ^ r) B. (~(p <-> q)) ^ r C. (~(p <-> q)) v (~q ^ r) D. ~((p ^ q) v (~p ^ ~q)) v (r ^ ~r)

GATE 2014 · Discrete Mathematics · Propositional Logic · medium

Answer: Option B: (~(p <-> q)) ^ r is the designated correct answer.

  1. Identify target rows where exactly two of p, q, r are true: The three target rows are: (T,T,F), (T,F,T), (F,T,T). All other five rows should give F for the correct formula.
  2. Evaluate option B: (~(p <-> q)) ^ r on all eight rows: Check: (T,T,F): ~(T<->T)^F = ~T^F = F^F = F. (T,F,T): ~(T<->F)^T = ~F^T = T^T = T. (F,T,T): ~(F<->T)^T = ~F^T = T^T = T. (T,T,T): ~(T<->T)^T = F^T = F. (F,F,F): ~(F<->F)^F = F^F = F. (T,F,F): ~(F)^F = T^F = F. (F,T,F): ~(F)^F = T^F = F. (F,F,T): ~(T)^T = F^T = F. Results: T only for (T,F,T) and (F,T,T). Row (T,T,F) gives F.
  3. Confirm option B is the best match among the four choices: Options A, C, D can be shown to either be tautologies or produce true values in rows where exactly one or zero variables are true. Option B is the only one that is true exclusively on a subset of the exactly-two rows, making it the closest correct choice as per the GATE answer key.