# GATE2014-1-53

4.2k views

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

1. $(( p \leftrightarrow q) \wedge r) \vee (p \wedge q \wedge \sim r)$
2. $( \sim (p \leftrightarrow q) \wedge r)\vee (p \wedge q \wedge \sim r)$
3. $( (p \to q) \wedge r) \vee (p \wedge q \wedge \sim r)$
4. $(\sim (p \leftrightarrow q) \wedge r) \wedge (p \wedge q \wedge \sim r)$

edited
18

B is correct one ! Here is better clarification:

$A.$ will be true if $P,Q,R$ are true, $((p ↔q) ∧ r)$ will return true. So "exactly two" is false
$C.$ if only $r$ is true and $p$ and $q$ are false, first part of implication itself will result in true
$D.$ if $r$ is true or false, this returns false due to $r$ and $\neg r$ present in conjunction. So, this is a CONTRADICTION.

B is the answer. B is true if $p$ is TRUE and $q$ is FALSE or vice verse, and $r$ is true or if $p$ and $q$ are TRUE and $r$ is FALSE.

PS: Actually the question should have been "TRUE ONLY when exactly two of $p,q$ and $r$ are TRUE"

edited by
2

Why A is false. If P=Q=T and R = F then option A, B and C becomes true.
because (P^Q^~R) will be true and as it is in OR-ing then whole expression becomes true.

0
Do we need to modify the explanation Arjun sir???? Could you please check the video link that I posted below?
1

A is true when p-T,q-T,r-F

B is true when p-F,q-T,r-T

C is true when p-F,q-T,r-T

Can you please explain why only B is selected ?

17

Actually the question says "exactly two". So, we must also ensure that the formula is never TRUE if all the variables are (or if only 1 variable is) TRUE and also ensure that whenever exactly two of the variables are TRUE, it must evaluate to TRUE.

2

To get answer as B is the question must be Which one of the following propositional logic formulas is TRUE  ONLY when exactly two of p,q and r are TRUE?

3
Grammatically you are right :) But sometimes we need to assume stuffs especially for last 2 years of GATE where they stopped giving Marks to All for debatable questions.
0
Thank you :)
0
sir ,

please explain little bit more...how do you take exactly 2 , i mean it can be p,q or q,r or r,p .. should we check for all cases in all option ...? actually how to solve it ...
3
Yes. But options can be quickly eliminated as shown in the selected answer. Options are eliminated if 3 variables being true gives true, if only 1 variable being true gives true or if the formula is a tautology or if it is a contradiction.
1
ohk :) i got . thank you!
0
video solution seems perfect.
1
the proposition logic formula is required to be true when any two of the p q r are true .so let's make truth table taking any two of p q r as true

P  Q  R

0   1   1

1    1    0

1     0    1

now write down the POS for above truth table

i.e. P'QR+PQR'+PQ'R  .

option B will satisfy the above POS expression hence answer.
0
@preetam

Can u write the steps of how option B satisfies it?
0
Thanks, that's more quicker way to solve it.
0
thanks

propositional logic formulas is TRUE when exactly two of p,q and r are TRUE means possibilities are pq or qr or pr to be TRUE
option A)
((p↔q)∧r)∨(p∧q∧∼r)
=((T↔T)∧r)∨(T∧T∧∼r) ( take p=T and q=T)
=((T)∧r)∨(T∧∼r)
=(r)∨(∼r)
=T
It doesn't depend upon the value of r, so, if the value of r is T then it also to be T so the condition exactly 2 are T is false. Hence option A is FALSE.

option B)
(∼(p↔q)∧r)∨(p∧q∧∼r)
=(∼(T↔T)∧r)∨(T∧T∧∼r)  ( take p=T and q=T)
=(∼(T)∧r)∨(T∧∼r)
=(F∧r)∨(T∧∼r)
=(F)∨(∼r)
=∼r
so if r=F then this is T so condition exactly 2 are T is true

(∼(p↔q)∧r)∨(p∧q∧∼r)
=(∼(T↔q)∧T)∨(T∧q∧∼T)  ( take p=T and r=T)
=(∼(q)∧T)∨(F)
=∼(q)∨(F)
=∼q
so if q=F then this is T so condition exactly 2 are T is true

(∼(p↔q)∧r)∨(p∧q∧∼r)
=(∼(p↔T)∧T)∨(p∧T∧∼T)  ( take q=T and r=T)
=(∼(p)∧T)∨(F)
=∼(p)∨(F)
=∼p
so if p=F then this is T so condition exactly 2 are T is true

Hence option B is CORRECT.

option C)
((p→q)∧r)∨(p∧q∧∼r)
=((T→T)∧r)∨(T∧T∧∼r) ( take p=T and q=T)
=((T)∧r)∨(T∧∼r)
=(r)∨(∼r)
=T
It doesnt depend upon value of r , so , if value of r is T then it also to be T so the condition exactly 2 are T is false . Hence option C is FALSE.

option D)
(∼(p↔q)∧r)∧(p∧q∧∼r)
=(∼(T↔T)∧r)∧(T∧T∧∼r)  ( take q=T and r=T)
=(∼(T)∧r)∧(T∧∼r)
=(F∧r)∧(T∧∼r)
=F∧(∼r)
=F
It doesnt depend upon value of r , so , if value of r is F then it also to be F so the condition exactly 2 are T is false . Hence option D is FALSE.

Answer is (B) here any two propositional variables can be true and any one of p,q and r can be false .So let's start with elimination:

D is eliminated as D won't be true if p ,q will be true and r is false since there is an and between two expressions.

In C if q is false and p and r is true then the expression:(~p or q)AND r becomes false which doesn't satisfy the condition .

Coming to B it seems to be the right answer even when p is false ,q and r is true and when q is false and p and r is true.

A won't satisfy the condition if anyone p or q is false.

The key is : p<->q is actually (p->q)AND(q->p).

P->q is ~p or q.you just need to substitute T and F and check for condition.

In option (B) :
We assume ‘p’ and ‘q’ to be TRUE. Therefore, ‘r’ is false because exactly two of ‘p’, ‘q’, and ‘r’ can be TRUE.
p <--> q means if both ‘p’ and ‘q’ have same values then p <--> q is TRUE. So, ((p <--> r ) and r) evaluates to be FALSE. Therefore, ~((p <--> r ) and r) is TRUE.
Here, two sub- expression are connected via OR operator and one of the sub-expression is TRUE. So, the complete expression becomes TRUE.

Therefore, option (B) evaluates to be TRUE.

If you check for 110

A,B, C all are true.

If you check for 111,

A, C are true, while B is false.

### Correct answer is option B.

Consider 4,6,7 cases and check options.

$B)\\ (\sim (p\leftrightarrow q)\wedge r) \vee (p \wedge q \wedge \sim r)\\$

$4^{th}$ case

$=(\sim (F\leftrightarrow T)\wedge T) \vee (F \wedge T \wedge \sim T)\\ =(\sim F\wedge T) \vee F\\ =(T\wedge T) \vee F\\ =T \vee F\\ =T$

Similarly Check $6^{th} \&\ 7^{th}$ cases.

## Related questions

1
3.3k views
Which one of the following Boolean expressions is NOT a tautology? $((\,a\,\to\,b\,)\,\wedge\,(\,b\,\to\,c))\,\to\,(\,a\,\to\,c)$ $(\,a\,\to\,c\,)\,\to\,(\,\sim b\,\to\,(a\,\wedge\,c))$ $(\,a\,\wedge\,b\,\wedge\,c)\,\to\,(\,c\vee\,a)$ $a\,\to\,(b\,\to\,a)$
Consider the statement "Not all that glitters is gold Predicate glitters$(x)$ is true if $x$ glitters and predicate gold$(x)$ is true if $x$ is gold. Which one of the following logical formulae represents the above statement? $\forall x: glitters (x)\Rightarrow \neg gold(x)$ ... $\exists x: gold(x)\wedge \neg glitters(x)$ $\exists x: glitters(x)\wedge \neg gold(x)$
What are the truth values of these statements? $\exists \sim x P(x) \rightarrow \exists x P(x)$ $\forall x P(x) \rightarrow \exists \sim x P(x)$ $\exists \sim x \sim P(x) \rightarrow \sim \forall x P(x)$
Suppose that the domain of the propositional function $P(x)$ consists of the integers $-2,-1,0,1,2.$ Write out each of these propositions using disjunctions, conjunctions, and negations. $\exists x P(x)$ $\forall x P(x)$ $\exists x \sim p(x)$ $\forall x \sim P(x)$ $\sim \exists x P(x)$ $\sim \forall x P(x)$