Consider the following logic program Which of the following first order…
2003
Consider the following logic program

Which of the following first order sentences is equivalent to P?

Answer: C. C — Solution: Translate the program rules into first-order sentences and conjoin them. Rule: A(x) ← B(x,y), C(y). Translation: for every x, if there exists a y…
- A.
A
- B.
B
- C.
C
- D.
D
Attempted by 39 students.
Show answer & explanation
Correct answer: C
Solution: Translate the program rules into first-order sentences and conjoin them.
Rule: A(x) ← B(x,y), C(y).
Translation: for every x, if there exists a y such that B(x,y) and C(y), then A(x).
Formula: (∀x)[(∃y)(B(x,y) ∧ C(y)) ⇒ A(x)]
Constraint: ← B(x,x).
Translation: there must be no x with B(x,x).
Formula: ¬(∃x)B(x,x)
Final equivalent first-order sentence:
(∀x)[(∃y)(B(x,y) ∧ C(y)) ⇒ A(x)] ∧ ¬(∃x)B(x,x)
Notes: use an existential quantifier for the variable y that appears only in the rule body (the body requires some y), and translate denial constraints as a negated existential statement. Do not replace the existential by a universal, and do not change the constraint into an existence claim or into a disjunction with the rule translation.
Explore the full course: Iocl Engineers Officers Grade A Paper 2