Horn-satisfiability
In formal logic, Horn-satisfiability, or HORNSAT, is the problem of deciding whether a given set of propositional Horn clauses is satisfiable or not.
A Horn clause is a clause with at most one positive literal, called the head of the clause, and any number of negative literals, forming the body of the clause. A Horn formula is a propositional formula formed by conjunction of Horn clauses.
The problem of Horn satisfiability is solvable in linear time.[1] A polynomial-time algorithm for Horn satisfiability is based on the rule of unit propagation: if the formula contains a clause composed of a single literal (a unit clause), then all clauses containing (except the unit clause itself) are removed, and all clauses containing have this literal removed. The result of the second rule may itself be a unit clause, which is propagated in the same manner. If there are no unit clauses, the formula can be satisfied by simply setting all remaining variables negative. The formula is unsatisfiable if this transformation generates a pair of opposite unit clauses and . Horn satisfiability is actually one of the "hardest" or "most expressive" problems which is known to be computable in polynomial time, in the sense that it is a P-complete problem.[2]
This algorithm also allows determining a truth assignment of satisfiable Horn formulae: all variables contained in a unit clause are set to the value satisfying that unit clause; all other literals are set to false. The resulting assignment is the minimal model of the Horn formula, that is, the assignment having a minimal set of variables assigned to true, where comparison is made using set containment.
Using a linear algorithm for unit propagation, the algorithm is linear in the size of the formula.
A generalization of the class of Horn formulae is that of renamable-Horn formulae, which is the set of formulae that can be placed in Horn form by replacing some variables with their respective negation. Checking the existence of such a replacement can be done in linear time; therefore, the satisfiability of such formulae is in P as it can be solved by first performing this replacement and then checking the satisfiability of the resulting Horn formula.[3]
The Horn satisfiability problem can also be asked for propositional many-valued logics. The algorithms are not usually linear, but some are polynomial; see Hähnle (2001 or 2003) for a survey.[4][5]
See also
References
- ↑ Dowling, W., and Gallier, J., (1984) "Linear-time algorithms for testing the satisfiability of propositional Horn formulae". Journal of Logic Programming, 3, 267-284
- ↑ Stephen Cook; Phuong Nguyen (2010). Logical foundations of proof complexity. Cambridge University Press. p. 224. ISBN 978-0-521-51729-4.
- ↑ Chandru, Vijaya; Collette R. Coullard, Peter L. Hammer, Miguel Montañez, and Xiaorong Sun (2005). "On renamable Horn and generalized Horn functions". Annals of Mathematics and Artificial Intelligence 1 (1–4): 33–47. doi:10.1007/BF01531069.
- ↑ Reiner Hähnle (2001). "Advanced many-valued logics". In Dov M. Gabbay, Franz Günthner. Handbook of philosophical logic 2 (2nd ed.). Springer. p. 373. ISBN 978-0-7923-7126-7.
- ↑ Reiner Hähnle (2003). "Complexity of Many-valued Logics". In Melvin Fitting, Ewa Orlowska. Beyond two: theory and applications of multiple-valued logic. Springer. ISBN 978-3-7908-1541-2.