GATE Previous Year Questions — Predicate Logic

GATE Relevance: High

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)

GATE CS-style

Which of the following is the negation of ∀x ∃y P(x, y)?

  1. ∃x ∀y P(x, y)
  2. ∀x ∀y ¬P(x, y)
  3. ∃x ∀y ¬P(x, y)
  4. ∀x ∃y ¬P(x, y)
Show Solution

Apply De Morgan’s for quantifiers step by step:

¬(∀x ∃y P(x,y)) ≡ ∃x ¬(∃y P(x,y)) ≡ ∃x ∀y ¬P(x,y)

Answer: (C)

Key pattern: ¬∀ → ∃¬, ¬∃ → ∀¬. Apply from outside in.

Question 2 — Translation to FOL (2 marks)

GATE CS 2015-style

“Not all birds can fly.” Which FOL sentence correctly represents this?

  1. ∀x (Bird(x) → ¬Fly(x))
  2. ¬∀x (Bird(x) → Fly(x))
  3. ∃x (Bird(x) ∧ ¬Fly(x))
  4. 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)

GATE CS 2017-style

What is the most general unifier of P(f(x), g(y, a)) and P(f(f(b)), g(f(b), z))?

  1. {x/f(b), y/f(b), z/a}
  2. {x/b, y/f(b), z/a}
  3. {x/f(b), y/b, z/a}
  4. 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)

GATE CS-style

Which of the following is a valid formula (tautology) in FOL?

  1. ∀x P(x) → ∃x P(x)
  2. ∃x P(x) → ∀x P(x)
  3. ∀x (P(x) ∨ ¬P(x)) → ∃x P(x)
  4. ∀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)

GATE CS 2019-style

What is the Skolemized form of ∀x ∃y ∀z ∃w R(x, y, z, w)?

  1. ∀x ∀z R(x, f(x), z, g(z))
  2. ∀x ∀z R(x, f(x), z, g(x, z))
  3. ∀x ∀z R(x, a, z, b)
  4. ∀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)

GATE CS-style

Given the clauses:

  1. ¬P(x) ∨ Q(x)
  2. ¬Q(y) ∨ R(y)
  3. P(a)

How many resolution steps are needed to derive R(a)?

  1. 1
  2. 2
  3. 3
  4. 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)

GATE CS-style

Which of the following statements about First-Order Logic is TRUE?

  1. FOL is decidable.
  2. FOL validity is semi-decidable but not decidable.
  3. FOL with only unary predicates and no function symbols is undecidable.
  4. 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)

GATE CS-style

In the formula ∀x (P(x,y) → ∃y Q(x,y)), identify the free and bound occurrences of y.

  1. Both occurrences of y are bound.
  2. Both are free.
  3. y in P(x,y) is free; y in Q(x,y) is bound by ∃y.
  4. 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

PatternFrequencyKey Skill
Quantifier negation / equivalencesVery HighDe Morgan’s for quantifiers
English ↔ FOL translationHighCareful scope of quantifiers
Unification (find MGU)HighSystematic decomposition, occur check
SkolemizationMedium-HighTrack dependency on universal variables
Resolution proof stepsMediumClausal form + systematic resolution
Validity / SatisfiabilityMediumCounterexample construction
DecidabilityLow-MediumKnow: PL decidable, FOL semi-decidable