Definitioncore
Choice rule
Also called cardinality constraint rule, weight constraint rule.
An ASP rule whose head lets a solver include any subset of a set of atoms, within lower and upper bounds, when the body holds.
A choice rule is the "guess" part of most answer set programs. When its body holds, it lets an answer set contain any subset of its head atoms, and the optional bounds limit the size of that subset. It was introduced with the smodels system and its semantics is due to Simons, Niemelä and Soininen (2002). A choice rule can be rewritten as normal rules with new atoms, so it adds convenience but no expressive power over normal programs.
Definition
Let be a set of atoms. A choice rule is an expression
with atoms and . Write , and . A cardinality rule with bounds is
with integers . A missing means and a missing means .
Let be a finite ground program of normal rules , constraints and choice rules, and let . The reduct is the positive program obtained as follows.
- Delete every rule and constraint whose meets .
- In the other normal rules, delete the negative literals, as in the Gelfond-Lifschitz reduct.
- Replace each remaining choice rule by the rules , one for each .
is an answer set of if is the least model of the positive part of and violates no constraint. For a cardinality rule, must also satisfy whenever and .
Normal translation. The choice rule above has the same answer sets, restricted to , as the normal rules
where the are new atoms and is the body. The upper bound becomes one constraint for each set of head atoms, and the lower bound becomes one constraint for each set of head atoms. This direct translation has constraints, so solvers handle the bounds natively or use counter atoms of polynomial size instead.
Examples and non-examples
- Free choice. The program has answer sets, all subsets of . For , the reduct is , , whose least model is .
- Bounds. The program has answer sets: . The same answer sets come from with the constraints and .
- Conditional choice. The program , has the answer sets and . For , the reduct is , , whose least model is . The atom is never chosen without .
- Choice gives support to a cycle. The program , , has the answer sets and . Without the choice rule, the positive cycle alone gives only , because nothing outside the cycle supports it.
- Non-example: disjunction. The disjunctive rule is not a choice rule. Its answer sets are and , because a disjunctive answer set must be a minimal model, while has the four answer sets , and has and .
- Non-example: a choice is not a fact. The rule does not make true. If no other rule mentions , the answer sets with and without both exist. A program that needs in every answer set uses the fact .
- Non-example: unsupported atoms. An atom in that is in the head of a choice rule whose body is false in is not justified by that rule. For example, with no rule for has only the answer set .
Related definitions
- Weight rule. A weight constraint counts the weights of the true literals instead of their number, and may contain negative literals. A cardinality constraint is the special case with all weights . Simons, Niemelä and Soininen (2002) define the stable models of programs with weight constraints in heads and bodies with one reduct. A weight rule is more general than a choice rule, so the alias "weight constraint rule" names a larger class than this page.
- Cardinality constraint in a body. The literal in a rule body is true in when . Unlike the head form, it only tests and never chooses.
- Constraint. A rule with an empty head removes every candidate in which holds. Choice rules generate and constraints test, which is the generate-and-test pattern of ASP.
- Disjunctive rule. A head asks for a minimal set of true head atoms. It raises the complexity of existence to (Eiter and Gottlob), while choice rules keep it in NP.
References
- Patrik Simons, Ilkka Niemelä and Timo Soininen, Extending and implementing the stable model semantics, Artificial Intelligence 138(1-2), 181 to 234 (2002), the definitions of choice rules, cardinality constraints and weight constraints, and the reduct that defines their stable models
- Ilkka Niemelä, Logic programs with stable model semantics as a constraint programming paradigm, Annals of Mathematics and Artificial Intelligence 25(3-4), 241 to 273 (1999), the use of choice and cardinality constructs to encode NP search problems
- Martin Gebser, Roland Kaminski, Benjamin Kaufmann and Torsten Schaub, Answer Set Solving in Practice, Morgan and Claypool (2012), the introduction of choice rules and cardinality constraints in the input language
Where this leads
About this page
The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H0 no proof |
|
| Lean | L0 no Lean part |
|
| Visual | V0 none |
|
| Writing | W4 complete |
|
Tag S09RSH Edit this page History Report an error Markdown