Using the statement "at most one" in propositional logic and in horns clause

2.2k Views Asked by At

I am studying for my exams and I am having some trouble understanding how to write the below statements in:

  1. Propositional logic
  2. Horn clause.

A. Customer chooses Converse shoes
B. Customer chooses Adidas shoes

The customer can choose at most one brand of shoes.

Here is what I have come up with:

$(A \lor B) \land \lnot(A \land B)$

Is the above correct? And how would this be represented in Horn clause?

1

There are 1 best solutions below

1
On

Your logic statement doesn't match the problem statement - you give a formula for exactly one. For at most one, write:

$$\lnot(A \land B)$$

Using de Morgan's laws again, the new statement becomes:

$$\lnot A \lor \lnot B$$

which is a Horn clause (in fact it is a goal - no positive literal).