Question 1 |

A | |

B | |

C | |

D |

**GATE CS 2013**

**Propositional and First Order Logic.**

**Discuss it**

Question 1 Explanation:

F(x) ==> x is my friend P(x) ==> x is perfect D is the correct answer. A. There exist some friends which are not perfect B. There are some people who are not my friend and are perfect C. There exist some people who are not my friend and are not perfect. D. There doesn't exist any person who is my friend and perfect

Question 2 |

A | |

B | |

C | |

D |

**GATE CS 2013**

**Propositional and First Order Logic.**

**Discuss it**

Question 2 Explanation:

Given statement is :

**¬ ∃ x ( ∀y(α) ∧ ∀z(β) )**where ¬ is a negation operator, ∃ is Existential Quantifier with the meaning ofNow we need to use these results as shown below:"there Exists", and ∀ is a Universal Quantifier with the meaning" for all ", and α, β can be treated as predicates. here we can apply some of the standard results of Propositional and 1st order logic on the given statement, which are as follows : [Result 1: ¬(∀x P(x)) <=> ∃ x¬P(x), i.e. negation of "for all" gives "there exists" and negation also gets applied to scope of quantifier, which is P(x) here. And also negation of "there exists" gives "for all", and negation also gets applied to scope of quantifier ] [Result 2: ¬ ( A ∧ B ) = ( ¬A ∨ ¬B ) ] [Result 3: ¬P ∨ Q <=> P -> Q ] [Result 4: If P ->Q, then by Result of Contrapositive, ¬Q -> ¬P ]

¬ ∃ x ( ∀y(α) ∧ ∀z(β) ) [ Given ] => ∀ x (¬∀y(α) ∨ ¬∀z(β) ) [ after applyingHence, the correct answer is Option A and Option D. But in GATE 2013, marks were given to all for this question.Result 1&Result 2] => ∀ x ( ∀y(α) -> ¬∀z(β) ) [after applyingResult 3] =>∀ x ( ∀y(α) -> ∃z(¬β) )[after applyingResult 1] which is same as the statement C. Hence the Given Statement is logically Equivalent to the statement C. Now, we can also prove that given statement is logically equivalent to the statement in option B. Let's see how ! The above derived statement is : ∀ x ( ∀y(α) -> ∃z(¬β) ) Now this statement can be written as (or equivalent to) :=> ∀ x ( ∀z(β) -> ∃y(¬α) )[after applyingResult 4] And this statement is same as statement B. Hence the Given statement is also logically equivalent to the statement B. So, we can conclude that the Given statement isNOTlogically equivalent to the statementsAandD.

Question 3 |

What is the correct translation of the following statement into mathematical logic?
“Some real numbers are rational”

A | |

B | |

C | |

D |

**GATE CS 2012**

**Propositional and First Order Logic.**

**Discuss it**

Question 3 Explanation:

(A) "There exist some numbers which are either real OR rational" (B) "All real numbers are rational" (C) "There exist some numbers which are both real AND rational" (D) "There exist some numbers for which rational implies real" (See Propositional Logic for details) Clearly answer C is correct among all

Question 4 |

Which one of the following options is CORRECT given three positive integers x, y and z, and a predicate?

P(x) = ¬(x=1)∧∀y(∃z(x=y*z)⇒(y=x)∨(y=1))

P(x) being true means that x is a prime number | |

P(x) being true means that x is a number other than 1 | |

P(x) is always true irrespective of the value of x | |

P(x) being true means that x has exactly two factors other than 1 and x |

**GATE CS 2011**

**Propositional and First Order Logic.**

**Discuss it**

Question 4 Explanation:

Discrete Mathematics and Its Applications by Kenneth H Rosen

So the predicate is evaluated as P(x) = (¬(x=1))∧(∀y(∃z(x=y*z)⇒((y=x)∨(y=1)))) P(x) being true means x ≠ 1 and For all y if there exists a z such that x = y*z then y must be x (i.e. z=1) or y must be 1 (i.e. z=x) It means that x have only two factors first is 1 and second is x itself. This predicate defines the prime number.Source: http://clweb.csa.iisc.ernet.in/rahulsharma/gate2011key.html

Question 5 |

Suppose the predicate F(x, y, t) is used to represent the statement that person x can fool person y at time t. which one of the statements below expresses best the meaning of the formula ∀x∃y∃t(¬F(x, y, t))?

Everyone can fool some person at some time | |

No one can fool everyone all the time | |

Everyone cannot fool some person all the time | |

No one can fool some person at some time |

**GATE CS 2010**

**Propositional and First Order Logic.**

**Discuss it**

Question 5 Explanation:

∀ x ∃ y ∃ t(¬ F(x,y,t)) => ∀ x ¬(∀ y ∀ t F(x,y,t))

Question 6 |

Which one of the following is the most appropriate logical formula to represent the statement? "Gold and silver ornaments are precious".
The following notations are used:
G(x): x is a gold ornament
S(x): x is a silver ornament
P(x): x is precious

∀x(P(x)→(G(x)∧S(x))) | |

∀x((G(x)∧S(x))→P(x)) | |

∃x((G(x)∧S(x))→P(x) | |

∀x((G(x)∨S(x))→P(x)) |

**GATE-CS-2009**

**Propositional and First Order Logic.**

**Discuss it**

Question 6 Explanation:

=> This statement can be expressed as => For all X, x can be either gold or silver then the ornament X is precious => For all X, (G(X) v S(x)) => P(X).

This solution is contributed by **Anil Saikrishna Devarasetty** .

Question 7 |

The binary operation c is defined as follows

Which one of the following is equivalent to P∨Q?

P |
Q |
PcQ |

T |
T |
T |

T |
F |
T |

F |
T |
F |

F |
F |
T |

A) B) C) D)

A | |

B | |

C | |

D |

**GATE-CS-2009**

**Propositional and First Order Logic.**

**Discuss it**

Question 8 |

I and III | |

I and IV | |

II and III | |

II and IV |

**GATE-CS-2009**

**Propositional and First Order Logic.**

**Discuss it**

Question 8 Explanation:

According to negation property of universal qualifier and existential quantifier

Question 9 |

Let fsa and pda be two predicates such that fsa(x) means x is a finite state automaton, and pda(y) means that y is a pushdown automaton. Let equivalent be another predicate such that equivalent (a, b) means a and b are equivalent. Which of the following first order logic statements represents the following:
Each finite state automaton has an equivalent pushdown automaton.

A | |

B | |

C | |

D |

**Propositional and First Order Logic.**

**GATE CS 2008**

**Discuss it**

Question 9 Explanation:

Considering each option :

(A) If everything is a FSA, then there exists an equivalent PDA for everything.

(B) It is not the case that for all y if there exist a FSA then it has an equivalent PDA.

(C) Everything is a FSA and has an equivalent PDA.

(D) Everything is a PDA and has exist an equivalent FSA.

Thus, option (A) is correct.

Please comment below if you find anything wrong in the above post.

(A) If everything is a FSA, then there exists an equivalent PDA for everything.

(B) It is not the case that for all y if there exist a FSA then it has an equivalent PDA.

(C) Everything is a FSA and has an equivalent PDA.

(D) Everything is a PDA and has exist an equivalent FSA.

Thus, option (A) is correct.

Please comment below if you find anything wrong in the above post.

Question 10 |

Only I and II | |

Only I, II and III | |

Only I, II and IV | |

All of I, II, III and IV |

**Propositional and First Order Logic.**

**GATE CS 2008**

**Discuss it**

Question 10 Explanation:

I and II are same by Demorgan's law
The IIIrd can be simplified to I.

Question 11 |

Let Graph(x) be a predicate which denotes that x is a graph. Let Connected(x) be a predicate which denotes that x is connected. Which of the following first order logic sentences DOES NOT represent the statement: “Not every graph is connected”?

A | |

B | |

C | |

D |

**Propositional and First Order Logic.**

**GATE-CS-2007**

**Discuss it**

Question 11 Explanation:

Option A and option C are same G(x)-->C(x) can also be written as ~G(x) or C(x), and they are the correct representation.
Option C says :There exists a graph and graph is not connected ,which is equivalent to given sentence.
Option D: Every x which is graph is not connected.
Option D is correct choice

Question 12 |

Which of the following is TRUE about formulae in Conjunctive Normal Form?

For any formula, there is a truth assignment for which at least half the clauses evaluate to true. | |

For any formula, there is a truth assignment for which all the clauses evaluate to true | |

There is a formula such that for each truth assignment, at most one-fourth of the clauses evaluate to true. | |

None of the above |

**Propositional and First Order Logic.**

**GATE-CS-2007**

**Discuss it**

Question 12 Explanation:

*We can easily prove that for any formula, there is a truth assignment for which at least half the clauses evaluate to true .*

**Proof :**Consider an arbitrary truth assignment. For each of its clause ‘j’ , introduce a random variable. X

_{j}= 1 if clause ‘j’ is satisfied X

_{j}= 0 otherwise Then, X = summation of (j * X

_{j}) is the number of satisfied clauses. Given any clause ’c’ , it is unsatisfied only if all of its ‘k’ constituent literals evaluates to false as they are joined by OR operator. Now, because each literal within a clause has a 1/2 chance of evaluating to true independently of any of the truth value of any of the other literals, the probability that they are all false is (1 / 2)

^{k}. Thus, the probability that ‘c’ is satisfied = 1 − (1 / 2)

^{k}So, E(X

_{j}) = 1 * (1 / 2)

^{k}= (1 / 2)

^{k}Therefore, E(X

_{j}) >= 1/2 Summation on both sides to get E(X). Therefore, we have E(X) = summation of (j * X

_{j}) >= m/2 where ‘m’ is the number of clauses. E(X) represents expected number of satisfied clauses. Thus, there must exist an assignment that satisfies at least half of the clauses. Please comment below if you find anything wrong in the above post.

Question 13 |

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

A | |

B | |

C | |

D |

**Propositional and First Order Logic.**

**GATE-CS-2014-(Set-1)**

**Discuss it**

Question 13 Explanation:

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.

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.

Please comment below if you find anything wrong in the above post.

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.

Please comment below if you find anything wrong in the above post.

Question 14 |

A | |

B | |

C | |

D |

**Propositional and First Order Logic.**

**GATE-CS-2014-(Set-2)**

**Discuss it**

Question 14 Explanation:

(A)

**a -> b**means if ‘a’ is true then ‘b’ is also true. Now, ‘b’ is true. Therefore, ‘c’ is also true. => Using transitivity rule , a -> c

(B)

**a <-> c**is true if both ‘a’ and ‘c’ have same values. Let ‘a’, ‘b’ and c’ be false. Expression '

**a and b**' is false and expression

**'not b'**is true. RHS of the given equation should be true. But it evaluates to be false. Therefore, contradiction is there.

Option (B) is not a tautology.

(C) Let ‘a’ and ‘c’ be false. ’b’ be true

**a and b and c**is false

**c or a**is false

(D) Let ‘b’ be true.

**b -> a**means if ‘b’ is true then ‘a’ is also true. Therefore, ‘a’ and ‘b’ both evaluates to be true.

Thus, option (B) is correct.

Please comment below if you find anything wrong in the above post.

Question 15 |

A | |

B | |

C | |

D |

**Propositional and First Order Logic.**

**GATE-CS-2014-(Set-3)**

**Discuss it**

Question 15 Explanation:

**(A)**Note that (p ∧ ~q) ≡ ~(p -> q). So it means rainy day to cold implication is false for all days. Which means non-rainy days are cold.

**(B)**For all days, if day is not rainy, then it is cold [Non-Rainy days are cold]

**(C)**There exist some days for which not rainy implies cold. [Some non-rainy days are cold]

**(D)**Note that (p ∧ ~q) ≡ ~(p -> q). So it means rainy day to cold implication is false for some days. Which means not all rainy days are cold.

Question 16 |

Which one of the first order predicate calculus statements given below correctly express the following
English statement?

Tigers and lions attack if they are hungry or threatened.

A | |

B | |

C | |

D |

**Propositional and First Order Logic.**

**GATE-CS-2006**

**Discuss it**

Question 16 Explanation:

The statement "Tigers and lions attack if they are hungry or threatened" means that if an animal is either tiger or lion, then if it is hungry or threatened, it will attack. So option (D) is correct.
Don't get confused by "and" between tigers and lions in the statement. This "and" doesn't mean that we will write "tiger(x) ∧ lion(x) ", because that would have meant that an animal is both tiger and lion, which is not what we want.
Source: www.cse.iitd.ac.in/~mittal/gate/gate_math_2006.html

Question 17 |

Consider the following propositional statements:
P1 : ((A ∧ B) → C)) ≡ ((A → C) ∧ (B → C))
P2 : ((A ∨ B) → C)) ≡ ((A → C) ∨ (B → C))
Which one of the following is true?

P1 is a tautology, but not P2 | |

P2 is a tautology, but not P1 | |

P1 and P2 are both tautologies | |

Both P1 and P2 are not tautologies |

**Propositional and First Order Logic.**

**GATE-CS-2006**

**Discuss it**

Question 17 Explanation:

The easiest way to solve this question by creating truth tables for the expressions given. Note that P1 will be a tautology if truth table for left expression is exactly same as truth table for right expression. Same holds for P2 also.

So as we see from table, none of the P1 or P2 are tautologies, so option

A | B | C | ((A ∧ B) → C)) | ((A → C) ∧ (B → C)) | ((A ∨ B) → C)) | ((A → C) ∨ (B → C)) |
---|---|---|---|---|---|---|

0 | 0 | 0 | T | T | T | T |

0 | 0 | 1 | T | T | T | T |

0 | 1 | 0 | T | F | F | T |

0 | 1 | 1 | T | T | T | T |

1 | 0 | 0 | T | F | F | T |

1 | 0 | 1 | T | T | T | T |

1 | 1 | 0 | F | F | F | F |

1 | 1 | 1 | T | T | T | T |

**(D)**is correct. Source: www.cse.iitd.ac.in/~mittal/gate/gate_math_2006.htmlQuestion 18 |

A logical binary relation □ ,is defined as follows:
Let ~ be the unary negation (NOT) operator, with higher precedence than □.
Which one of the following is equivalent to A∧B ?

(A)(~A □ B)(B)~(A □ ~B)(C)~(~A □ ~B)(D)~(~A □ B)

A | |

B | |

C | |

D |

**Propositional and First Order Logic.**

**GATE-CS-2006**

**Discuss it**

Question 18 Explanation:

In A∧B, we have 3 entries as False, and one as True. In table, it is opposite case, so we have to negate A □ B, moreover, we want True only when both A and B are true, so in 3rd entry (which becomes true after negation), we want both true, so we have to negate A also.
So A ∧ B ≡ ~(~A □ B), so option (D) is correct.
Source: www.cse.iitd.ac.in/~mittal/gate/gate_math_2006.html

Question 19 |

Let P, Q and R be three atomic prepositional assertions. Let X denote (P v Q) → R and Y denote (P → R) v (Q → R). Which one of the following is a tautology?

X ≡ Y | |

X → Y | |

Y → X | |

¬ Y → X |

**Propositional and First Order Logic.**

**GATE-CS-2005**

**Discuss it**

Question 19 Explanation:

Answer : [ B ] X = (P ⋁ Q) → R = ~(P ⋁ Q) ⋁ R = (~P ⋀ ~Q) ⋁ R = (~P ⋁ R) ⋀ (~Q ⋁ R) = (P → R) ⋀ (Q → R) X → Y is true as (A ⋀ B) → (A ⋁ B) is always TRUE but reverse implication is not always true.

Question 20 |

What is the first order predicate calculus statement equivalent to the following?
Every teacher is liked by some student

∀(x) [teacher (x) → ∃ (y) [student (y) → likes (y, x)]] | |

∀ (x) [teacher (x) → ∃ (y) [student (y) ^ likes (y, x)]] | |

∃ (y) ∀ (x) [teacher (x) → [student (y) ^ likes (y, x)]] | |

∀ (x) [teacher (x) ^ ∃ (y) [student (y) → likes (y, x)]] |

**Propositional and First Order Logic.**

**GATE-CS-2005**

**Discuss it**

Question 20 Explanation:

Answer is B] Statement : If X is a teacher then there exists some Y who is a student and likes X.
A] Statement : If X is a teacher, then there exists a Y such that if Y is a student, then Y likes X.
C] Statement : There exist a student who likes all teachers.
D] Statement : Everyone is a teacher and there exists a Y such that if Y is student then y likes X.

Question 21 |

Identify the correct translation into logical notation of the following assertion.

"Some boys in the class are taller than all the girls"Note : taller(x,y) is true if x is taller than y.

(∃x) (boy(x) → (∀y) (girl(y) ∧ taller(x,y))) | |

(∃x) (boy(x) ∧ (∀y) (girl(y) ∧ taller(x,y))) | |

(∃x) (boy(x) → (∀y) (girl(y) → taller(x,y))) | |

(∃x) (boy(x) ∧ (∀y) (girl(y) → taller(x,y))) |

**Propositional and First Order Logic.**

**GATE-CS-2004**

**Discuss it**

Question 21 Explanation:

Now many people get confused when to use ∧ and when to use →. This question tests exactly that.
We use ∧ when we want to say that the both predicates in this statement are always true, no matter what the value of x is.
We use → when we want to say that although there is no need for left predicate to be true always, but whenever it becomes true, right predicate must also be true.
D means there exist some boys x which taller than all girls y.

Question 22 |

The following propositional statement is
(P → (Q v R)) → ((P ^ Q) → R)

satisfiable but not valid | |

valid | |

a contradiction | |

none of the above |

**Propositional and First Order Logic.**

**GATE-CS-2004**

**Discuss it**

Question 22 Explanation:

We create the truth table for given statement S as :
A formula is satisfiable if there is atleast one assignment for which it is true. Clearly this formula is satisfiable as there are 7 assignments for which it is true.
A formula is valid if it is true for all assignments, which is not the case here.
Thus, option (A) is correct.
Please comment below if you find anything wrong in the above post.

Question 23 |

Which of the following is a valid first order formula ? (Here α and β are first order formulae with x as their only free variable)

A | |

B | |

C | |

D |

**Propositional and First Order Logic.**

**GATE-CS-2003**

**Discuss it**

Question 24 |

Consider the following formula a and its two interpretations I1 and I2
Which of the following statements is true?

I1 satisfies α, I2 does not | |

I2 satisfies α, I1 does not | |

Neither I2 nor I2 satisfies α | |

Both I1 and I2 satisfy α |

**Propositional and First Order Logic.**

**GATE-CS-2003**

**Discuss it**

Question 24 Explanation:

First of all, note that, in α, ¬Qyy is always false, because every number divides itself. Also not that rightmost formula (∀x)[¬Px] is always false, because clearly it is not the case that every number is not the prime number (in case of I1), nor it is the case that every number is not the composite number (in case of I2). Also note that, variable x in this expression is not same as variable x in leftside expression, they are independent. In fact, we can rewrite α as α:(∀x)[Px⇔(∀y)[Qxy⇔¬Qyy]]⇒(∀z)[¬Pz].
Let us consider I1 first. So let us assign some value to x, and see if it satisfies α. We can partition assignments of x into 3 parts : when x is prime, when x is composite, when x is 1.

- When x is prime : Px is true, also Qxy is false for all y except 1, because only 1 divides x. So formula Qxy⇔¬Qyy is true for all y except 1, but due to ∀y outside this, whole formula ∀y[Qxy⇔¬Qyy] becomes false, because it would have been true if Qxy⇔¬Qyy was true for every y. So now [Px⇔(∀y)[Qxy⇔¬Qyy]] becomes false for all x whenever x is prime. Since for some x (where x is prime), [Px⇔(∀y)[Qxy⇔¬Qyy]] is false, so (∀x)[Px⇔(∀y)[Qxy⇔¬Qyy]] is definitely false, since false⇒ false is true, so α is true in I1, and we don't need other cases of x.
- Now consider I2. Here also we can argue in the same way as we did in cases of I1, here case of x being composite leads to false⇒false, and so α is also true in I2, hence
**option (D) is correct**.

Question 25 |

Consider the following logic program P
A(x) <- B(x, y), C(y)
<- B(x,x)
Which of the following first order sentences is equivalent to P?

A | |

B | |

C | |

D |

**Propositional and First Order Logic.**

**GATE-CS-2003**

**Discuss it**

Question 26 |

The following resolution rule is used in logic programming:

Derive clause (P v Q) from clauses (P v R), (Q v ¬ R)Which of the following statements related to this rule is FALSE?

((P v R) ^ (Q v ¬ R)) (P v Q) is logically valid | |

(P v Q) ⇒ ((P v R) ^ (Q v ¬ R)) is logically valid | |

(P v Q) is satisfiable if and only if (P v R) ^ (Q v ¬ R) is satisfiable | |

(P v Q) ⇒ FALSE if and only if both P and Q are unsatisfiable |

**Propositional and First Order Logic.**

**GATE-CS-2003**

**Discuss it**

Question 27 |

"If X, then Y unless Z" is represented by which of the following formulae in propositional logic?
("¬" is negation "^" is conjunction, and "→" is implication)

(X ^ ¬ Z) → Y | |

(X ^ Y) → ¬ Z | |

(X → (Y ^ ¬ Z) | |

(X → Y(^ ¬ Z) |

**Propositional and First Order Logic.**

**GATE-CS-2002**

**Discuss it**

Question 27 Explanation:

The statement "If X then Y unless Z" means, if Z doesn't occur, X implies Y i.e. ¬ Z→ (X→ Y), which is equivalent to Z∨ (X→ Y) (since P→ Q ≡ ¬ P∨ Q), which is then equivalent to Z∨ (¬ X∨ Y). Now we can look into options which one matches with this.

So option∧¬ Z)→ Y = ¬ ((X∧¬ Z))∨ Y = (¬ X∨ Z)∨ Y, which matches our expression. So option A is correct.
Source: http://www.cse.iitd.ac.in/~mittal/gate/gate_math_2002.html

So option

**(a)**is (XQuestion 28 |

Consider two well-formed formulas in prepositional logic.
Which of the following statements is correct?

F1 is satisfiable, F2 is valid | |

F1 unsatisfiable, F2 is satisfiable | |

F1 is unsatisfiable, F2 is valid | |

F1 and F2 are both satisfiable |

**Propositional and First Order Logic.**

**GATE-CS-2001**

**Discuss it**

Question 28 Explanation:

The concept behind this solution is:
a) Satisfiable
If there is an assignment of truth values which makes that expression true.
b) UnSatisfiable
If there is no such assignment which makes the expression true
c) Valid
If the expression is Tautology
Here, P => Q is nothing but –P v Q
F1: P => -P = -P v –P = -P
F1 will be true if P is false and F1 will be false when P is true so F1 is Satisfiable
F2: (P => -P) v (-P => P) which is equals to (-P v-P) v (-(-P) v P) = (-P) v (P) =
Tautology
So, F1 is Satisfiable and F2 is valid
Option (a) is correct.
https://en.wikipedia.org/wiki/Tautology_(logic)
This solution is contributed by

**Anil Saikrishna Devarasetty**.Question 29 |

Let a, b, c, d be propositions. Assume that the equivalences a ↔ (b V-b) and b ↔ c hold. Then the truth value of the formula (a ∧ b) → (a ∧ c) ∨ d) is always

True | |

False | |

Same as the truth value of b | |

Same as the truth value of d |

**Propositional and First Order Logic.**

**GATE-CS-2000**

**Discuss it**

Question 30 |

A | |

B | |

C | |

D |

**Propositional and First Order Logic.**

**GATE-CS-2015 (Set 1)**

**Discuss it**

Question 30 Explanation:

This question is the revision of basics of propositional logic.

**Conjunction**Conjunction of p and q, denoted by p ∨q, is the proposition ‘p or q’.The Conjunction p ∨q is when anyone of p or q is TRUE.**Disjunction**Disjunction of p and q, denoted by p ∧q, is the proposition ‘p and q’. The Disjunction p ∧q is TRUE when both p and q is TRUE.**Logical Implication**It is a type of relationship between two statements or sentence. Denoted by ‘p → q’. The conditional statement p → q is false when p is true and q is false, and true otherwise. i.e. p→ q = ¬p ∨q B**i-Condition**A bi-conditional statement is a compound statement formed by combining two conditionals under “and.” Bi-conditionals are true when both statements have the exact same truth value.**Solution :**p←→q means both p→q and q→p p→q is equivalent to ⌉p ∨ q So A and B are fine. D is a different way of writing A p ↔ q = (p→ q) ∧ (q→p) (⌉p ∨ q) ∧ (q → p) ( As p→ q = ⌉p ∨ q ) (⌉p ∨ q) ∧ (⌉q ∨ p) = (¬p ∧ p )∨ (¬p ∧¬q )∨ (q ∧p ) ∨(q ∧¬q ) (**Distributive law**) As ((¬p∧ p )=0,(q ∧¬q )=0) (**Complementation**) (⌉p ∧ ⌉q) ∨ (p ∧ q) So, answer CQuestion 31 |

Consider the following two statements.

S1: If a candidate is known to be corrupt, then he will not be elected. S2: If a candidate is kind, he will be elected.Which one of the following statements follows from S1 and S2 as per sound inference rules of logic?

If a person is known to be corrupt, he is kind | |

If a person is not known to be corrupt, he is not kind | |

If a person is kind, he is not known to be corrupt | |

If a person is not kind, he is not known to be corrupt |

**Propositional and First Order Logic.**

**GATE-CS-2015 (Set 2)**

**Discuss it**

Question 31 Explanation:

S1: If a candidate is known to be corrupt, then he will not be elected. S2: If a candidate is kind, he will be elected.If p → q, then ¬q → ¬pSo from S1,elected → not corruptand S2 is,kind → electedTherefore,kind → not corrupt

Question 32 |

A | |

B | |

C | |

D |

**Propositional and First Order Logic.**

**GATE-CS-2015 (Set 2)**

**Discuss it**

Question 32 Explanation:

In logic, a tautology is a formula that is true in every possible interpretation.
All options here are based on order of application of quantifier.
So, there are 2 rules:

- The positions of the same type of quantifiers can be switched
- The positions of different types of quantifiers cannot be switched.

**Option (a)**Sign <-> represents "not equivalent".∀x∃y R( x, y ) is not equivalent to ∃Y ∀X R( X, Y )Let R( X, Y ) represent X < Y for the set of numbers as the universe, for example. Then

**∀X ∃Y R( X, Y ) reads**"for every number x, there is a number y that is greater than x", which is true, while**∃Y ∀X R( X, Y )**reads "there is a number that is greater than every (any) number", which is not true. So this option is rejected.**Option (d)**Sign -> represents "euivalent"∀X ∀Y R( X, Y ) is equivalent to ∀X ∀Y R( Y, X )Let R( X, Y ) represent X < Y for the set of numbers as the universe, for example. Then

**∀X ∀Y R( X, Y )**reads "for every number X, there is every Y that is greater than x", while**∀X ∀Y R( Y, X )**reads "for every number Y, there is every X that is greater than Y". And both can’t be equivalent (because at one time, one will be true and other one will be false) So this option is rejected.**Option (b)**is clearly rejected as two predicate can’t be equivalent to one predicate only. So Option (c) is the correct one.**Explanation for Pption (c)**– as position of the quantifier is not changed and since LHS P -> R = ⌐P ᴠ R which is equal to RHS. Option c is tautology and correct answer too.**Note:**For solving proposition logic question, always remember not to try with rules only. Just take an example and see if options are satisfying it or not. Because for a particular example, three options will give same result and one will be different. And different one is your answer.**For basics to this question, you can refer to:**http://www.cs.odu.edu/~cs381/cs381content/logic/pred_logic/quantification/quantification.html This explanation has been contributed by**Nitika Bansal.**Question 33 |

Let # be a binary operator defined as X # Y = X′ + Y′ where X and Y are Boolean variables. Consider the following two statements.

S1: (P # Q) # R = P # (Q # R) S2: Q # R = R # QWhich of the following is/are true for the Boolean variables P, Q and R?

Only S1 is True | |

Only S2 is True | |

Both S1 and S2 are True | |

Neither S1 nor S2 are True |

**Propositional and First Order Logic.**

**GATE-CS-2015 (Set 3)**

**Discuss it**

Question 33 Explanation:

S2 is true, as X' + Y' = Y' + X' S1 is false. Let P = 1, Q = 1, R = 0, we get different results (P # Q) # R = (P' + Q')' + R' = (0 + 0)' + 1 = 1 + 1 = 1 P # (Q # R) = P' + (Q' + R')' = 0 + (0 + 1)' = 0 + 0 = 0

Question 34 |

Suppose U is the power set of the set S = {1,2,3,4,5,6}. For any T ∈ U, let |T| denote the number of elements in T and T′ denote the complement of T. For any T, R ∈ U, let T\R be the set of all elements in T which are not in R.
Which one of the following is true?

A | |

B | |

C | |

D |

**Propositional and First Order Logic.**

**GATE-CS-2015 (Set 3)**

**Discuss it**

Question 34 Explanation:

D is true, it can be seen by drawing Venn Diagram.A is false, Take an example like X = {1, 2, 3, 4}, X' = {5, 6}, |X| is not same as |X'|.B is false, as any two subsets of size 5 of U would definitely have some common elements.C is false,Take an example like X = {1, 2} Y = {3, 4, 5}, X\Y = {1, 2}.

Question 35 |

In a room there are only two types of people, namely Type 1 and Type 2. Type 1 people always tell the truth and Type 2 people always lie. You give a fair coin to a person in that room, without knowing which type he is from and tell him to toss it and hide the result from you till you ask for it. Upon asking, the person replies the following:

“The result of the toss is head if and only if I am telling the truth.”Which of the following options is correct?

The result is head | |

The result is tail | |

If the person is of Type 2, then the result is tail | |

If the person is of Type 1, then the result is tai |

**Propositional and First Order Logic.**

**GATE-CS-2015 (Set 3)**

**Discuss it**

Question 35 Explanation:

“The result of the toss is head if and only if I am telling the truth.” If the person is of Type 1 who always tell truth, then result must be head. If the person is of Type 2 who always tell lie, then result must be head. Negation of a sentence of the form "X is true if and only if Y is true" is "Either X is true and Y is false, or X is false and Y is true." Refer: http://math.stackexchange.com/questions/10435/negation-of-if-and-only-if Which means "Either toss is head and I am not telling truth, or toss is tail and I am telling truth". Since the person always lie, it is "Either toss is head and I am not telling truth"

Question 36 |

P and Q only | |

P and R only | |

P and S only | |

P, Q, R and S |

**Propositional and First Order Logic.**

**GATE-IT-2004**

**Discuss it**

Question 37 |

Let P(x) and Q(x) be arbitrary predicates. Which of the following statements is always TRUE?

((∀x(P(x)∨Q(x))))⟹((∀xP(x))∨(∀xQ(x))) | |

(∀x(P(x)⟹Q(x)))⟹((∀xP(x))⟹(∀xQ(x))) | |

(∀x(P(x))⟹∀x(Q(x)))⟹(∀x(P(x)⟹Q(x))) | |

(∀x(P(x))⇔(∀x(Q(x))))⟹(∀x(P(x)⇔Q(x))) |

**Propositional and First Order Logic.**

**Gate IT 2005**

**Discuss it**

Question 37 Explanation:

Generally, these type of questions can be solved by using two statements and checking the validity of each and every option.
Here, let the statements be P and Q where,
P : Student is a girl
Q : Student is smart
Option B says that, IF for all student x : If x is a girl then the student is smart THEN IF the whole class comprises of girls then the whole class comprises of smart students.
This solution is contributed by

**Anil Saikrishna Devarasetty**.Question 38 |

Consider the following expressions:
(i) false
(ii) Q
(iii) true
(iv) P ∨ Q
(v) ¬Q ∨ P
The number of expressions given above that are logically implied by P ∧ (P ⇒ Q) is ______________
[This Question was originally a Fill-in-the-blanks Question]

2 | |

3 | |

4 | |

5 |

**Propositional and First Order Logic.**

**GATE-CS-2016 (Set 2)**

**Discuss it**

Question 38 Explanation:

This solution is contributed by

**Anil Saikrishna Devarasetty**.**Alternate Explanation :**Answer is 4. Here is the solution If say X is 'Logically Implied' by [ P ∧ (P ⇒ Q) ] then [ P ∧ (P ⇒ Q) ] ⇒ X is always true i.e it is a tautology so if the above expression is a tautology then we can say that X is logically implied by P ∧ (P ⇒ Q) So we need to find X for which [ P ∧ (P ⇒ Q) ] ⇒ X will be always true for all values of P, Q and X. Look at the below tableP....Q...(P ⇒ Q)...[P ∧ (P ⇒ Q)].......X.......[ P ∧ (P ⇒ Q) ] ⇒ X 0....0.....1............0.............1/0............1...... 0....1.....1............0.............1/0.... ......1...... 1....0.....0..... ......0.............1/0............1...... 1....1.....1............1..............1.............1.......notice that value of X doesn't matter if premise of expression i.e Premise of [ P ∧ (P ⇒ Q) ] ⇒ X i.e [ P ∧ (P ⇒ Q) ] is 0 meaning the final expression would be a tautology for all values of X if [ P ∧ (P ⇒ Q) ] is 0 but if premise is 1 (as in last row) then X must be 1 so that the final implication i.e., [ P ∧ (P ⇒ Q) ] ⇒ X is true for all values. if you replace X by all 5 options then you will find that for X = Q, True, P ∨ Q, ¬Q ∨ P the said expression would always be true for X = False the expression would not be a tautology Hence # of expression is 4 ------------------------------------------------------------------

Note:An important inference rule called "modus ponenes" says this [ P ∧ (P ⇒ Q) ] ⇒ Q is a tautology we noted that if we replace X by Q then it is indeed a tautology meaning Q is implied by [ P ∧ (P ⇒ Q) ]

Question 39 |

A | |

B | |

C | |

D |

**Propositional and First Order Logic.**

**GATE-CS-2016 (Set 2)**

**Discuss it**

Question 39 Explanation:

Suppose if there are two statements P and Q, P=>Q = ~PvQ i.e. The only situation where implication fails is (=>) when P is true and Q is false. i.e. A truth statement can't imply a false statement. So, for these type of questions it will be better to take option and check for some arbitrary condition By looking options, we are pretty sure that A,B are correct Suppose X is any number and statement is P(x) = X is a prime number Q(x) = X is a non-prime number If we look at option D, Before Implication :- For all x, x is either prime or non-prime which is true After Implication :- For all x, x is prime or for all x, x is non-prime which is obviously false i.e. here, truth statement implies a false statement which is not valid. If we carefully look at option C, There exists a number x, which is both prime and non-prime which is false and a false statement can imply either true or false. So option (C) is correct So Answer is Option (D)This explanation has been contributed by

**Anil Saikrishna.**

Question 40 |

Which one of these first-order logic formula is valid?

∀x(P(x) => Q(x)) => (∀xP(x) => ∀xQ(x)) | |

∃x(P(x) ∨ Q(x)) => (∃xP(x) => ∃xQ(x)) | |

∃x(P(x) ∧ Q(x)) <=> (∃xP(x) ∧ ∃xQ(x)) | |

∀x∃y P(x, y) => ∃y∀x P(x, y) |

**Propositional and First Order Logic.**

**Gate IT 2007**

**Discuss it**

Question 40 Explanation:

(A) LHS->RHS

LHS: For every x (if P holds then Q holds)

RHS: If P(x) holds for all x, then Q(x) holds for all x.

(B) LHS !->RHS

LHS: An x exist for which either P(x) is true or Q(x) is true.

RHS: If an x exist for which P(x) is true then another x exist for which Q(x) is true.

(C) It is not necessary that on RHS both x are same.

LHS: There exist an x for which both P(x) and Q(x) are true.

RHS: There exist an x for which P(x) is true and there exist an x for which Q(x) is true.

(D) LHS!->RHS

LHS: For every x, there exist a y such that P(x, y) holds.

RHS: There exist a y such that for all x P(x, y) holds.

LHS: For every x (if P holds then Q holds)

RHS: If P(x) holds for all x, then Q(x) holds for all x.

(B) LHS !->RHS

LHS: An x exist for which either P(x) is true or Q(x) is true.

RHS: If an x exist for which P(x) is true then another x exist for which Q(x) is true.

(C) It is not necessary that on RHS both x are same.

LHS: There exist an x for which both P(x) and Q(x) are true.

RHS: There exist an x for which P(x) is true and there exist an x for which Q(x) is true.

(D) LHS!->RHS

LHS: For every x, there exist a y such that P(x, y) holds.

RHS: There exist a y such that for all x P(x, y) holds.

Question 41 |

Which of the following first order formula is logically valid? Here α(x) is a first order formula with x as a free variable, and β is a first order formula with no free variable.

[β→(∃x,α(x))]→[∀x,β→α(x)] | |

[∃x,β→α(x)]→[β→(∀x,α(x))] | |

[(∃x,α(x))→β]→[∀x,α(x)→β] | |

[(∀x,α(x))→β]→[∀x,α(x)→β] |

**Propositional and First Order Logic.**

**Gate IT 2008**

**Discuss it**

Question 41 Explanation:

A formula is logically valid (or simply valid) if it is true in every interpretation. These formulas play a role similar to tautologies in propositional logic. A formula is VALID if no instance of it is false. So, it is enough to give any instance which gives false and prove that our formula is not valid
Choice of this question:

**option (a)**[β→(∃x,α(x))] → [∀x,β→α(x)] LHS: If β is true, then there exists an x for which α(x) is true. RHS: For all x, if β is true then α(x) is true. This is same as saying if β is true then for all x, α(x) is true. (β⟹∀x,α(x)) So, RHS⟹LHS and LHS⟹̸ RHS.**Option (b)**[∃x,β→α(x)] → [β→(∀x,α(x))] LHS: There exists an x such that if β is true then α(x) is true. RHS: If β is true then for all x, α(x) is true. So, RHS⟹LHS and LHS⟹̸ RHS.**Option (c)**[(∃x,α(x))→β] → [∀x,α(x)→β] LHS: If there is an x such that α(x) is true, then β is true. RHS: For all x, if α(x) is true, then β is true. Here, both LHS and RHS are same because β is a formula with no free variable which is independent of x. (if β is true for one x, it is true for every x and vice versa). So, RHS⟹LHS and LHS⟹RHS.**Option (d)**[(∀x,α(x))→β]→[∀x,α(x)→β] RHS: For every x, if α(x) is true then β is true. So, RHS⟹LHS and LHS⟹̸ RHS So, option c is correct one. because for option c, LHS and RHS being equivalent, even if the implication is reversed, it remains valid. This solution is contributed by**Nitika Bansal**.Question 42 |

Which of the following is the negation of [∀ x, α → (∃y, β → (∀ u, ∃v, y))]

[∃ x, α → (∀y, β → (∃u, ∀ v, y))] | |

[∃ x, α → (∀y, β → (∃u, ∀ v, ¬y))] | |

[∀ x, ¬α → (∃y, ¬β → (∀u, ∃ v, ¬y))] | |

[∃ x, α ʌ (∀y, β ʌ (∃u, ∀ v, ¬y))] |

**Propositional and First Order Logic.**

**Gate IT 2008**

**Discuss it**

Question 42 Explanation:

When we negate a quantified statement, we negate all the quantifiers first, from left to right (keeping the same order), then we negative the statement.
We can take examples as:
1. ¬[∀x ∈ A, P(x)] ⇔ ∃x ∈ A, ¬P(x).
2. ¬[∃x ∈ A, P(x)] ⇔ ∀x ∈ A, ¬P(x).
3. ¬[∀x ∈ A, ∃y ∈ B, P(x, y)] ⇔ ∃x ∈ A, ∀y ∈ B, ¬P(x, y).
4. ¬[∃x ∈ A, ∀y ∈ B, P(x, y)] ⇔ ∀x ∈ A, ∃y ∈ B, ¬P(x, y).
important, to negate an implication:
¬[IF P, THEN Q] ⇔ P AND NOT Q
Now question is to negate this qualified statement:
[∀ x, a -> (∃y, B -> (∀u, ∃v,y))]
By negating it:
¬ [∀ x, a -> (∃y, B -> (∀u, ∃v,y))]
∃x, a ^ { ¬(∃y) , ¬[ B -> (∀u, ∃v,y) ] }
∃x, a ^ ( ∀y, B ^ ¬ (∀u, ∃v,y))
∃x, a ^ ( ∀y, B ^ (∃u, ∀v, ¬y))
option D is correct.
This solution is contributed by

**Nitika Bansal**.
There are 42 questions to complete.