application
Logician Alfred Horn proposed such a concept to facilitate logical reasoning.
concept
An arbitrary clause is defined as follows:
A1, A2, …, An -> B1,B2, …, Bm
Among them: left condition AAA is与
the relationship, the conclusion on the right isBBB is或
the relationship.
It can be seen that a clause can have multiple conclusions. If a clause has at most one conclusion, then this kind of clause is calledhorn clause
.
E.g:
1.parent(X, Z), parent(Z, Y) -> grandparent(X, Y)
2.good(X), bad(X) ->
3.human(X) -> male(X), female(X)
Where 1 and 2 are both horn clause
, 3 is not. Because clause1 has 1 conclusion, clause2 has 0 conclusions, and clause3 has 2 conclusions.
Some related conclusions:
The sentences mentioned below are all horn clause
.
-> B
Of which B Yongzhen
A ->
Of which A is forever
In addition, the one with a conclusion in the horn clause is called headed horn clause
, and the one with no conclusion is called headless horn clause
.
In addition, many of the inference rules you have seen are headed horn clause
in the form:
A1, A2, …, An -> B
Reference: http://www.blogjava.net/Javawind/archive/2007/12/12/167108.html