Napoleon's theorem: Difference between revisions

From formulasearchengine
Jump to navigation Jump to search
en>Monkbot
en>Llightex
m spelling corrections, napoléon to napoleon
Line 1: Line 1:
'''Unit propagation''' ('''UP''') or '''Boolean Constraint propagation''' or the '''one-literal rule''' ('''OLR''') is a [[Algorithm|procedure]] of [[automated theorem proving]] that can simplify a set of (usually [[propositional logic|propositional]]) [[Clause (logic)|clauses]].
Alyson Meagher is the name her mothers and fathers gave her but she doesn't like when individuals use her full title. For a whilst I've been in Alaska but I will have to transfer in a year or two. Since I was eighteen I've  good psychic ([http://ustanford.com/index.php?do=/profile-38218/info/ click through the up coming website]) been operating as a bookkeeper but soon my wife and I will start our own company. What me and my family members adore is best psychic readings - [http://isaworld.pe.kr/?document_srl=392088 isaworld.pe.kr] - performing ballet but I've been taking on new issues recently.<br><br>Review my weblog; best psychic ([http://chungmuroresidence.com/xe/reservation_branch2/152663 chungmuroresidence.com])
 
==Definition==
 
The procedure is based on '''unit clauses''', i.e. clauses that are composed of a single [[literal (mathematical logic)|literal]]. If a set of clauses contains the unit clause <math>l</math>, the other clauses are simplified by the application of the two following rules:
 
# every clause (other than the unit clause itself) containing <math>l</math> is removed;
# in every clause that contains <math>\neg l</math> this literal is deleted.
 
The application of these two rules lead to a new set of clauses that is equivalent to the old one.  
 
For example, the following set of clauses can be simplified by unit propagation because it contains the unit clause <math>a</math>.
 
: <math>\{a \vee b, \neg a \vee c, \neg c \vee d, a\}</math>
 
Since <math>a \vee b</math> contains the literal <math>a</math>, this clause can be removed altogether. Since <math>\neg a \vee c</math> contains the negation of the literal in the unit clause, this literal can be removed from the clause.  The unit clause <math>a</math> is not removed; this would make the resulting set not equivalent to the original one; this clause can be removed if already stored in some other form (see section "Using a partial model"). The effect of unit propagation can be summarized as follows.
   
{| border="0" align="center" cellpadding="5" style="text-align: center;"
| <math>\{</math> || <math>a \vee b,</math> || <math>\neg a \vee c,</math> || <math>\neg c \vee d</math> || <math>a</math> || <math>\}</math>
|-
|  || (removed) || (<math>\neg a</math> deleted) || (unchanged) || (unchanged)
|-
| <math>\{</math> || &nbsp; || <math>c,</math> || <math>\neg c \vee d,</math> || <math>a</math> || <math>\}</math>
|}
 
The resulting set of clauses <math>\{c, \neg c \vee d, a\}</math> is equivalent to the above one. The new unit clause <math>c</math> that results from unit propagation can be used for a further application of unit propagation, which would transform <math>\neg c \vee d</math> into <math>d</math>.
 
==Unit propagation and resolution==
 
The second rule of unit propagation can be seen as a restricted form of [[Resolution (logic)|resolution]], in which one of the two resolvents must always be a unit clause. As for resolution, unit propagation is a correct inference rule, in that it never produces a new clause that was not entailed by the old ones. The difference between unit propagation and resolution are:
 
# resolution is a complete refutation procedure while unit propagation is not; in other words, even if a set of clause is contradictory, unit propagation may not generate an inconsistency;
# the two clauses that are resolved cannot in general be removed after the generated clause is added to the set; on the contrary, the non-unit clause involved in a unit propagation can be removed when its simplification is added to the set;
# resolution does not in general include the first rule used in unit propagation.
 
Resolution calculi that include [[subsumption]] can model rule one by subsumption and rule two by a unit resolution step, followed by subsumption.
 
Unit propagation, applied repeatedly as new unit clauses are generated, is a complete satisfiability algorithm for sets of propositional [[Horn clause]]s; it also generates a minimal model for the set if satisfiable: see [[Horn-satisfiability]].
 
==Using a partial model==
 
The unit clauses that are present in a set of clauses or can be derived from it can be stored in form of a partial model (this partial model may also contain other literals, depending on the application). In this case, unit propagation is performed based on the literals of the partial model, and unit clauses are removed if their literal is in the model. In the example above, the unit clause <math>a</math> would be added to the partial model; the simplification of the set of clause would then proceed as above with the difference that the unit clause <math>a</math> is now removed from the set. The resulting set of clauses is equivalent to the original one under the assumption of validity of the literals in the partial model.
 
==Complexity==
 
The direct implementation of unit propagation takes time [[quadratic growth|quadratic]] in the total size of the set to check, which is defined to be the sum of the size of all clauses, where the size of each clause is the number of literals it contains.
 
Unit propagation can however be done in linear time by storing, for each variable, the list of clauses in which each literal is contained. For example, the set above can be represented by numbering each clause as follows:
 
: <math>\{1: a \vee b, 2: \neg a \vee c, 3: \neg c \vee d, 4: a\}</math>
 
and then storing, for each variable, the list of clauses containing the variable or its negation:
 
: <math>a : 1\ 2\ 4</math>
 
: <math>b : 1\,</math>
 
: <math>c : 2\ 3</math>
 
: <math>d : 3\, </math>
 
This simple data structure can be built in time linear in the size of the set, and allows finding all clauses containing a variable very easily. Unit propagation of a literal can be performed efficiently by scanning only the list of clauses containing the variable of the literal. More precisely, the total running time for doing unit propagation for all unit clauses is linear in the size of the set of clauses.
 
==See also==
 
* [[Horn-satisfiability|Horn satisfiability]]
* [[Horn clause]]
* [[Automated theorem proving]]
* [[DPLL algorithm]]
 
==References==
 
* W. Dowling and J. Gallier (1984). Linear-time algorithms for testing the satisfiability of propositional Horn formulae. ''Journal of Logic Programming'', 1(3):267&ndash;284.
 
* H. Zhang and M. Stickel (1996). An efficient algorithm for unit-propagation. In ''Proceedings of the Fourth International Symposium on Artificial Intelligence and Mathematics''.
 
{{DEFAULTSORT:Unit Propagation}}
[[Category:Automated theorem proving]]

Revision as of 04:39, 21 February 2014

Alyson Meagher is the name her mothers and fathers gave her but she doesn't like when individuals use her full title. For a whilst I've been in Alaska but I will have to transfer in a year or two. Since I was eighteen I've good psychic (click through the up coming website) been operating as a bookkeeper but soon my wife and I will start our own company. What me and my family members adore is best psychic readings - isaworld.pe.kr - performing ballet but I've been taking on new issues recently.

Review my weblog; best psychic (chungmuroresidence.com)