A horn clause is ___________ .

2015

A horn clause is ___________ .

  1. A.

    A clause in which no variables occur in the expression

  2. B.

    A clause that has at least one negative literal

  3. C.

    A disjunction of a number of literals

  4. D.

    A clause that has atmost one positive literal

Attempted by 96 students.

Show answer & explanation

Correct answer: D

Definition: A Horn clause is a clause that contains at most one positive literal.

Equivalent statements:

  • As a disjunction: a Horn clause is a disjunction of literals with at most one positive literal.

  • As an implication: it can be written as the conjunction of the negative literals implying the positive literal (if present).

Common special cases and examples:

  • Definite clause (exactly one positive literal): example 'p ∨ ¬q ∨ ¬r', which corresponds to 'q ∧ r → p'.

  • Fact (no negative literals): example 'p' (a Horn clause with one positive literal and no negatives).

  • Goal or constraint (no positive literal): example '¬p ∨ ¬q' (a purely negative Horn clause).

Why this matters: Horn clauses are important because they permit efficient inference algorithms and form the basis of logic programming languages like Prolog.

Explore the full course: Mppsc Assistant Professor