Theoremadvanced
NP-completeness of the interval algebra
Also called NP-completeness of interval algebra consistency.
Deciding whether a network of Allen interval relations has a solution is NP-complete, by a reduction from 3-SAT; algebraic closure is therefore not a complete test.
This theorem says that the consistency problem of Allen's interval algebra is NP-complete: given a qualitative constraint network on intervals, with a set of the 13 base relations on each pair, deciding whether some intervals on the real line satisfy every label is as hard as 3-SAT. Vilain and Kautz proved hardness in 1986. The theorem explains why Allen's constraint propagation and algebraic closure can accept a network with no solution, and it is the starting point for the search for tractable subclasses, settled by the Nebel-Bürckert theorem for ORD-Horn and by the classification of tractable subclasses.
Statement
The problem. : the input is a network on intervals with a label on each pair, given as a 13-bit mask, so the input size is . A solution assigns to each interval two reals so that the base relation between and is in for all .
Theorem. is NP-complete. Hardness holds already for networks whose labels are among , , , , and .
The reduction below is from 3-SAT with exactly three distinct literals in every clause, which is NP-complete: a clause with fewer literals can be padded with new variables in the usual way.
In plain words
Intervals on a line can stand for true and false. Put one short interval in the middle. For each yes-or-no variable, place a pair of intervals so that one of them must lie left of the middle and the other right of it; left means false, right means true. For each clause, add a long interval around the middle and one helper interval per literal, each wrapped around its literal. A helper of a false literal must sit at the left end of the long interval, and there is room for at most two helpers there, since helpers may touch but not overlap. So every clause needs a true literal. That turns any satisfiability puzzle into an interval puzzle of about the same size, so no fast method can solve every interval puzzle unless it can solve every such puzzle.
Proof
Membership in NP. A solution can be replaced by one whose endpoints are integers in , since the base relations depend only on the order of the endpoints: map each endpoint to the number of distinct endpoint values below it. So a certificate is a list of such integers. The verifier checks for each and computes the base relation of each pair from 4 comparisons, in time.
Hardness. Let be a 3-CNF formula with variables and clauses , each with exactly 3 distinct literals. Build a network with these intervals and labels, where "" means the label of :
- a middle interval ;
- for each variable : intervals , and with , , and ; the interval of the literal is and that of is ;
- for each clause : an interval with , and for each literal of , with literal interval , a placeholder with , and ; the three placeholders of are pairwise .
All other pairs are universal. There are intervals, so the network is built in polynomial time. Call a literal interval true if it lies after and false if it lies before .
Claim 1 (variables). In every solution, for each exactly one of , is true. Both meet on one side or the other. They cannot both meet it from the same side, because then they would share an endpoint, which forbids. So one ends where starts and the other starts where ends. Since lies strictly inside , the first is before and the second after .
Claim 2 (placeholders). Let with literal interval . If is false, contains and so starts before ; with this gives , and since lies inside , is impossible, so or .
Claim 3 (clauses). At most two placeholders of a clause are in with . Two placeholders with both end at the start of , and two with both start at the start of . In either case they share an endpoint in a way that forbids. So a third one has no place. With Claim 2, every clause has a true literal, and Claim 1 makes the truth values a well-defined assignment. So a solution gives a satisfying assignment.
Converse. Take a satisfying assignment, and order the literal intervals so that all are pairwise disjoint: the false ones in a row left of , the true ones in a row right of , each stretching from the end of its false interval to the start of its true one. Let . For a clause with one false literal , start just after the end of and put around , ending at the start of . With a second false literal further right, start between and instead, and let start with and end between and . End just after , and wrap each true literal in its own disjoint placeholder after ends. The placeholders of one clause meet or are disjoint, every label holds, and the network is consistent.
The construction and both directions were checked by machine on random 3-CNF formulas with up to 3 variables, including the unsatisfiable formula with all 8 clauses on 3 variables, whose network has 42 intervals.
Consequences
- Propagation is incomplete. Unless P = NP, no polynomial algorithm decides all interval networks, so algebraic closure must accept some networks without a solution. The 42-interval network of the unsatisfiable formula above is one: algebraic closure leaves no label empty. A smaller one has 4 intervals: , , , , , is closed and has no solution.
- Search is needed. Complete solvers backtrack over refinements of the labels, with propagation at each node; see Allen's constraint propagation.
- Related problems are hard. Computing the minimal network, or deciding whether a base relation is possible between two intervals, is NP-hard, since either decides consistency. Calculi that contain the interval algebra, such as the rectangle algebra, inherit the hardness.
- Tractable subclasses. The labels used by the reduction, such as and , must be avoided by any tractable subclass. This leads to the ORD-Horn subclass and the classification of tractable subclasses.
Tightness
- Membership is exact. The problem is in NP for all 8192 relations, so the theorem is not about a harder class.
- Small labels are enough, but not single ones. The reduction uses labels of at most 4 base relations. With the 13 base relations alone the problem is in P, since algebraic closure decides atomic networks, so hardness needs some disjunctive labels.
- Dichotomy. Krokhin, Jeavons and Jonsson (2003) proved that every subset of the 8192 relations gives a problem that is either in P or NP-complete, and listed the 18 maximal tractable subclasses. The ORD-Horn subclass, 868 relations, is the only one of them that contains all 13 base relations.
- Three distinct literals. The clause gadget needs them. With two placeholders, both may be false, one meeting and one starting it; and two placeholders around the same literal interval cannot be disjoint.
History
Allen (1983) gave the algebra and noted that his propagation is incomplete. Vilain and Kautz (1986) proved that consistency is NP-hard, and the revised report of Vilain, Kautz and van Beek (1990) gave the reduction from 3-SAT in detail. Nebel and Bürckert (1995) found the maximal tractable ORD-Horn subclass, and Krokhin, Jeavons and Jonsson (2003) completed the classification of all subclasses.
References
- Marc Vilain and Henry Kautz, Constraint propagation algorithms for temporal reasoning, Proceedings of AAAI-86, 1986, pages 377 to 382, the theorem that consistency of interval networks is NP-hard, and the incompleteness of propagation
- Marc Vilain, Henry Kautz and Peter van Beek, Constraint propagation algorithms for temporal reasoning, a revised report, in Readings in Qualitative Reasoning about Physical Systems, Morgan Kaufmann, 1990, pages 373 to 381 (the reduction from 3-SAT with variable and clause gadgets)
- Bernhard Nebel and Hans-Jürgen Bürckert, Reasoning about temporal relations, a maximal tractable subclass of Allen's interval algebra, Journal of the ACM 42(1), 1995, pages 43 to 66 (membership in NP, and the relations that make the problem hard)
- Andrei Krokhin, Peter Jeavons and Peter Jonsson, Reasoning about temporal relations, the tractable subalgebras of Allen's interval algebra, Journal of the ACM 50(5), 2003, pages 591 to 640 (every subclass of the interval algebra is either tractable or NP-complete)
- James F. Allen, Maintaining knowledge about temporal intervals, Communications of the ACM 26(11), 1983, pages 832 to 843 (the interval algebra and its incomplete propagation)
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 HEBZH8 Edit this page History Report an error Markdown