GATE Previous Year Questions — Predicate Logic
Below are representative GATE-style questions on Predicate Logic with detailed solutions. These questions cover the most commonly tested patterns.
Question 1 — Quantifier Negation (1 mark)
Which of the following is the negation of ∀x ∃y P(x, y)?
- ∃x ∀y P(x, y)
- ∀x ∀y ¬P(x, y)
- ∃x ∀y ¬P(x, y)
- ∀x ∃y ¬P(x, y)
Show Solution
Apply De Morgan’s for quantifiers step by step:
Answer: (C)
Key pattern: ¬∀ → ∃¬, ¬∃ → ∀¬. Apply from outside in.
Question 2 — Translation to FOL (2 marks)
“Not all birds can fly.” Which FOL sentence correctly represents this?
- ∀x (Bird(x) → ¬Fly(x))
- ¬∀x (Bird(x) → Fly(x))
- ∃x (Bird(x) ∧ ¬Fly(x))
- Both (B) and (C)
Show Solution
“Not all birds can fly” = ¬(∀x (Bird(x) → Fly(x)))
This equals: ∃x ¬(Bird(x) → Fly(x)) = ∃x (Bird(x) ∧ ¬Fly(x)).
So (B) and (C) are logically equivalent.
Answer: (D) Both (B) and (C)
(A) says no bird can fly — too strong.
Question 3 — Unification (2 marks)
What is the most general unifier of P(f(x), g(y, a)) and P(f(f(b)), g(f(b), z))?
- {x/f(b), y/f(b), z/a}
- {x/b, y/f(b), z/a}
- {x/f(b), y/b, z/a}
- Unification fails
Show Solution
Match argument by argument:
- f(x) = f(f(b)) ⇒ x = f(b)
- g(y, a) = g(f(b), z) ⇒ y = f(b) and a = z, i.e., z = a
MGU = {x/f(b), y/f(b), z/a}
Answer: (A)
Question 4 — Validity Check (1 mark)
Which of the following is a valid formula (tautology) in FOL?
- ∀x P(x) → ∃x P(x)
- ∃x P(x) → ∀x P(x)
- ∀x (P(x) ∨ ¬P(x)) → ∃x P(x)
- ∀x (P(x) ∧ ¬P(x))
Show Solution
(A) ∀x P(x) → ∃x P(x): If P holds for all, then certainly there exists at least one. Valid! (Assuming non-empty domain, which is standard in FOL.)
(B) is not valid: P could hold for some but not all.
(C) The antecedent is always true (law of excluded middle), but ∃x P(x) could be false. Not valid.
(D) is always false (contradiction).
Answer: (A)
Question 5 — Skolemization (2 marks)
What is the Skolemized form of ∀x ∃y ∀z ∃w R(x, y, z, w)?
- ∀x ∀z R(x, f(x), z, g(z))
- ∀x ∀z R(x, f(x), z, g(x, z))
- ∀x ∀z R(x, a, z, b)
- ∀x ∀z R(x, f(x), z, g(x))
Show Solution
Skolemization replaces each existentially quantified variable with a function of all universally quantified variables that precede it:
- y is preceded by ∀x, so y → f(x)
- w is preceded by ∀x and ∀z, so w → g(x, z)
Result: ∀x ∀z R(x, f(x), z, g(x, z))
Answer: (B)
Common mistake: (A) incorrectly makes g depend only on z, forgetting that x is also in scope.
Question 6 — Resolution Proof (2 marks)
Given the clauses:
- ¬P(x) ∨ Q(x)
- ¬Q(y) ∨ R(y)
- P(a)
How many resolution steps are needed to derive R(a)?
- 1
- 2
- 3
- Cannot be derived
Show Solution
Add negated goal: ¬R(a) [clause 4]
Step 1: Resolve (2) & (4) with {y/a}: ¬Q(a) [clause 5]
Step 2: Resolve (1) & (5) with {x/a}: ¬P(a) [clause 6]
Step 3: Resolve (3) & (6): □
Total = 3 resolution steps.
Answer: (C)
Note: The question asks for steps to derive R(a), which by refutation requires negating R(a) and reaching □, taking 3 steps.
Question 7 — Decidability (1 mark)
Which of the following statements about First-Order Logic is TRUE?
- FOL is decidable.
- FOL validity is semi-decidable but not decidable.
- FOL with only unary predicates and no function symbols is undecidable.
- FOL does not have a complete proof procedure.
Show Solution
(A) False — FOL is undecidable (Church-Turing theorem).
(B) True — By Gödel’s completeness theorem, FOL has a complete proof procedure; valid sentences are enumerable. But non-valid sentences cannot always be detected.
(C) False — Monadic FOL (unary predicates, no functions) is decidable.
(D) False — FOL does have complete proof procedures (e.g., resolution).
Answer: (B)
Question 8 — Free and Bound Variables (1 mark)
In the formula ∀x (P(x,y) → ∃y Q(x,y)), identify the free and bound occurrences of y.
- Both occurrences of y are bound.
- Both are free.
- y in P(x,y) is free; y in Q(x,y) is bound by ∃y.
- y in P(x,y) is bound; y in Q(x,y) is free.
Show Solution
The scope of ∃y is Q(x,y) only. The y in P(x,y) is outside this scope, so it is free.
The y in Q(x,y) is within the scope of ∃y, so it is bound.
Answer: (C)
Tip: In GATE, always check exactly which quantifier binds which occurrence. Different occurrences of the same variable name can have different binding status.
Common GATE Patterns Summary
| Pattern | Frequency | Key Skill |
|---|---|---|
| Quantifier negation / equivalences | Very High | De Morgan’s for quantifiers |
| English ↔ FOL translation | High | Careful scope of quantifiers |
| Unification (find MGU) | High | Systematic decomposition, occur check |
| Skolemization | Medium-High | Track dependency on universal variables |
| Resolution proof steps | Medium | Clausal form + systematic resolution |
| Validity / Satisfiability | Medium | Counterexample construction |
| Decidability | Low-Medium | Know: PL decidable, FOL semi-decidable |