Allen’s Interval Algebra
- Allen’s Interval Algebra is a method defining 13 mutually exclusive interval relations used to model all possible temporal orderings.
- It offers a structured framework for representing temporal constraints in planning, scheduling, natural language processing, and other domains.
- Recent advances utilize dynamic programming with sublinear partitioning to reduce complexity, enhancing efficiency in consistency checks.
Allen’s Interval Algebra (IA) is a foundational formalism for qualitative temporal reasoning, offering a principled approach for representing and reasoning about temporal intervals and their possible configurations. Developed by James F. Allen, IA provides a set of 13 mutually exclusive binary relations that capture all possible orderings between two intervals. The algebra serves as a critical substrate for temporal constraint satisfaction, planning, scheduling, natural language understanding, and other domains requiring temporal consistency over infinite domains such as intervals on the rational or real line.
1. Formal Structure and Relations
Let denote the set of all closed intervals on the real or rational line, . Each interval is represented as a pair with .
Between any two intervals and exactly one of the following 13 base relations holds:
| Name | Symbol | Defining Condition(s) |
|---|---|---|
| before | () | |
| after | () | |
| meets | ||
| met-by | ||
| overlaps | ||
| overlapped-by | ||
| during | ||
| includes | ||
| starts | ||
| started-by | ||
| finishes | ||
| finished-by | ||
| equals | () |
Every instance may also specify constraints that are unions of these relation symbols, covering all possible binary relations. The algebra is closed under converse and composition operations, with a standard composition table as defined by Allen (Eriksson et al., 2023, Dabrowski et al., 2023, Janhunen et al., 2019).
A qualitative constraint network (QCN) in IA is a set of variables (intervals) and a set of constraints for certain pairs, asking whether the instance is consistent—that is, whether an assignment of intervals to exists such that every constraint is respected.
2. Complexity and Algorithms
The core decision problem—determining the consistency of an IA network—is NP-complete (Eriksson et al., 2023, Dabrowski et al., 2023). This complexity holds even when only unions of the 13 basic relations are allowed as constraints.
Known Complexity Results
- Brute-force algorithms enumerate all total orderings of the $2n$ endpoints, with complexity .
- Naïve propagation may require up to time.
- Parameterized perspective: The MinCSP for IA, parameterized by the number of unsatisfied constraints, admits a dichotomy: FPT for certain fragments, W[1]-hard otherwise (Dabrowski et al., 2023).
- Best lower bound: Only under ETH, leaving existence of truly single-exponential algorithms open.
Advances in Fine-Grained Algorithms
Eriksson & Lagerkvist (2021) achieved the first fine-grained DP, running in . The latest improvement uses dynamic programming with sublinear partitioning, breaking the “” barrier:
with an absolute constant (Eriksson et al., 2023). This approach, as detailed below, yields running times where the per-variable factor is , giving a super-polynomial improvement in .
3. Dynamic Programming with Sublinear Partitioning
The main conceptual advance is to encode partial orderings not as linear arrangements of all placed endpoints, but as partitions into “blocks”, each augmented with flags indicating if new points may be introduced ("open") or not ("closed”). A record is a tuple
where is the set of endpoints already placed, is a partition of , and is a $0/1$ flag for openness.
Key technical aspects:
- New interval starts are placed in block 2; ends go to block (if block is open).
- Generalization (merging blocks, adjusting flags) manages combinatorial blow-up.
- For interval pairs remaining, at most $4k+1$ blocks are required.
- The DP iterates over possible extensions, closing block-runs as needed, and generates all possible generalizations of updated records efficiently.
The resulting recurrence for the number of records leads to the bound. Each record requires only polynomial time per step, and generates generalizations, where is number of blocks.
Proof sketch of correctness shows that every satisfying model corresponds to a series of record transitions, and vice versa. The block bound ensures tractability throughout the search space (Eriksson et al., 2023).
4. Parameterized and Approximation Complexity
From the parameterized complexity viewpoint, the MinCSP framework for IA () studies whether deleting up to constraints can render an instance satisfiable. The results, presented in (Dabrowski et al., 2023), provide the following dichotomy:
- FPT (fixed-parameter tractable) for or with and .
- W[1]-hard otherwise, established through reductions from Paired Cut and Simultaneous Feedback Arc Set.
Additionally, although MinCSP() is NP-hard to approximate within any constant (assuming UGC), it is FPT-approximable within factor 2 in time, and within factor 4 in time via reduction to Subset Directed Feedback Arc Set (Dabrowski et al., 2023).
5. Practical Encodings and Experiments
Allen’s Interval Algebra is naturally encoded in answer-set programming extended by difference logic (ASP(DL)). For each variable , integer variables and denote its start and end, with basic constraints as rules linking and according to the semantics of each IA relation (Janhunen et al., 2019).
For example, the precedes relation corresponds to , encoded in ASP(DL) as
1 |
&diff { ep(X) - sp(Y) } <= -1 :- chosen(X,Y,p). |
Preliminary experiments show that such ASP(DL) encodings are robust and scalable: for random instances with variables, backbone computation and satisfiability checking were feasible within a few minutes for the majority of cases. Only about 10% of hard instances hit a 300s timeout, a marked improvement over pure-ASP encodings, which timeout at . Equivalent checks with specialized QSTR solvers (e.g., GQR) are faster for satisfiability, though less flexible for backbone or minimum-labeling tasks (Janhunen et al., 2019).
6. Generalizations and Extensions
The sublinear-partitioning technique generalizes to other qualitative calculi. For the Cardinal Direction Point Algebra (CDPA), which seeks two total orderings for points in two dimensions consistent with binary constraints on allowed relations, the algorithm achieves running time (Eriksson et al., 2023). This exploits a geometric lemma bounding the necessary size of partial orderings.
Potential extensions include further qualitative spatial calculi (e.g., RCC-8) and certain CSPs over infinite domains that admit similar partial ordering encodings.
7. Applications and Open Problems
Allen’s algebra pervades applications in AI planning, scheduling, NLP, and bioinformatics, underpinning the consistency and repair of temporal networks. Parameterized and approximation algorithms allow “repairing” up to errors or inconsistencies efficiently, critical in modelling noisy sensor data or resolving conflicts in temporal narratives (Dabrowski et al., 2023).
Significant open questions include:
- Explicit determination of the constant in the current bound.
- Elimination or relaxation of the left-heaviness restriction in block partitioning.
- Development of truly single-exponential () algorithms for general IA or CDPA.
- Applicability of sublinear partitioning to further NP-hard qualitative calculi and infinite-domain CSPs.
Dynamic programming with sublinear partitioning constitutes a major theoretical advance, sharply reducing asymptotic complexity and informing the design of temporal reasoning tools in practice (Eriksson et al., 2023, Dabrowski et al., 2023, Janhunen et al., 2019).