GATE / CS ARCHIVE

GATE CSE 2003 / QUESTION 71

Quantifying a Horn rule and an integrity constraint

Discrete Mathematics · Propositional & Predicate Logic · Full GATE CSE 2003 paper

GATE 2003, Q71 2 marks · MCQ
Report issue

Propositional & Predicate Logic

Question 71, GATE 2003: Logic program P has clauses A(x)←B(x,y),C(y) and ←B(x,x). Which first-order sentence is equivalent? All variables in clauses are universally quantified.
A. [∀x((∃y(B(x,y)∧C(y)))⇒A(x))] ∧ ¬∃x B(x,x)
B. [∀x((∀y(B(x,y)∧C(y)))⇒A(x))] ∧ ¬∃x B(x,x)
C. [∀x((∃y(B(x,y)∧C(y)))⇒A(x))] ∨ ¬∃x B(x,x)
D. [∀x((∀y(B(x,y)∧C(y)))⇒A(x))] ∧ ∃x B(x,x)
Option D above follows GateForum; GFG instead negates its final existential clause: ¬∃x B(x,x). Neither version changes the correct option A.
Tap to enlarge
Your answer
Answer & solution

Answer: A (no official key was published)

1. The first clause means ∀x∀y((B(x,y)∧C(y))⇒A(x)). For each fixed x, a single witness y for the body is enough to force A(x).
2. Since y does not occur in A(x), move the body quantifier to obtain ∀x((∃y(B(x,y)∧C(y)))⇒A(x)). Using ∀y inside the antecedent would require every y to satisfy the body before forcing A, a weaker rule.
3. A headless clause is a constraint: B(x,x) must never hold. Thus the second clause means ∀x¬B(x,x), equivalently ¬∃x B(x,x).
4. Both clauses must hold together, requiring conjunction. These components match A exactly.

Solution: The rule says that for every x,y, B(x,y) and C(y) together imply A(x). Since A(x) does not depend on y, this is equivalent to saying for every x that the existence of such a y implies A(x). The headless clause forbids every instance of B(x,x), hence contributes not-exists x B(x,x). A program containing both clauses requires their conjunction. This is option A. Moving a universal quantifier inside the antecedent would weaken the rule; joining the clauses with OR would not enforce both.

Original paper, page 10