Papers
Topics
Authors
Recent
2000 character limit reached

Allen’s Interval Algebra

Updated 25 November 2025
  • 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 I\mathcal{I} denote the set of all closed intervals on the real or rational line, I={[a,b]a,bQ or R,a<b}\mathcal{I} = \{\, [a, b] \mid a, b \in \mathbb{Q} \text{ or } \mathbb{R},\, a < b \,\}. Each interval XX is represented as a pair (x,x+)(x^-, x^+) with x<x+x^- < x^+.

Between any two intervals X=(x,x+)X = (x^-, x^+) and Y=(y,y+)Y = (y^-, y^+) exactly one of the following 13 base relations holds:

Name Symbol Defining Condition(s)
before << (pp) x+<yx^+ < y^-
after >> (π\pi) y+<xy^+ < x^-
meets mm x+=yx^+ = y^-
met-by mimi y+=xy^+ = x^-
overlaps oo x<y<x+<y+x^- < y^- < x^+ < y^+
overlapped-by oioi y<x<y+<x+y^- < x^- < y^+ < x^+
during dd y<x<x+<y+y^- < x^- < x^+ < y^+
includes didi x<y<y+<x+x^- < y^- < y^+ < x^+
starts ss x=y<x+<y+x^- = y^- < x^+ < y^+
started-by sisi y=x<y+<x+y^- = x^- < y^+ < x^+
finishes ff y<x<x+=y+y^- < x^- < x^+ = y^+
finished-by fifi x<y<x+=y+x^- < y^- < x^+ = y^+
equals == (ee) x=y,x+=y+x^- = y^-,\, x^+ = y^+

Every instance may also specify constraints that are unions of these relation symbols, covering all 2132^{13} possible binary relations. The algebra is closed under converse and composition operations, with a standard 13×1313 \times 13 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 VV of variables (intervals) and a set CC of constraints c(X,Y)Bc(X, Y) \subseteq \mathcal{B} for certain pairs, asking whether the instance is consistent—that is, whether an assignment of intervals to VV exists such that every constraint c(X,Y)c(X, Y) 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 O((2n)!)=O(n2n)O^*((2n)!) = O^*(n^{2n}).
  • Naïve propagation may require up to 2O(n2)2^{O(n^2)} time.
  • Parameterized perspective: The MinCSP(Γ)(\Gamma) for IA, parameterized by the number kk of unsatisfied constraints, admits a dichotomy: FPT for certain fragments, W[1]-hard otherwise (Dabrowski et al., 2023).
  • Best lower bound: Only 2o(n)2^{o(n)} 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 O((1.0615n)n)O^*((1.0615n)^{n}). The latest improvement uses dynamic programming with sublinear partitioning, breaking the “nnn^n” barrier:

O ⁣((cn/lnn)n)O^*\!\left( \left( c\,n/\ln n \right)^{n} \right)

with cc an absolute constant (Eriksson et al., 2023). This approach, as detailed below, yields running times where the per-variable factor n/lnnn/\ln n is o(n)o(n), giving a super-polynomial improvement in nn.

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

r=(S,(S1,B1),(S2,B2),,(Sm,Bm))r = (S,\, (S_1, B_1), (S_2,B_2),\dotsc, (S_m, B_m))

where SS is the set of endpoints already placed, {Si}\{ S_i \} is a partition of SS, and BiB_i is a $0/1$ flag for openness.

Key technical aspects:

  • New interval starts are placed in block 2; ends go to block j2j \geq 2 (if block jj is open).
  • Generalization (merging blocks, adjusting flags) manages combinatorial blow-up.
  • For kk 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 O((cn/lnn)n)O^*((c\,n/\ln n)^{n}) bound. Each record requires only polynomial time per step, and generates O(3m)O^*(3^m) generalizations, where mm 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 (MinCSP(Γ)\operatorname{MinCSP}(\Gamma)) studies whether deleting up to kk constraints can render an instance satisfiable. The results, presented in (Dabrowski et al., 2023), provide the following dichotomy:

  • FPT (fixed-parameter tractable) for Γ{m,p}\Gamma \subseteq \{ m,p \} or Γ{r1,r2,=}\Gamma \subseteq \{r_1, r_2, =\} with r1{s,f}r_1 \in \{s, f\} and r2{p,o,d}r_2 \in \{p,o,d\}.
  • W[1]-hard otherwise, established through reductions from Paired Cut and Simultaneous Feedback Arc Set.

Additionally, although MinCSP(A\mathcal{A}) is NP-hard to approximate within any constant (assuming UGC), it is FPT-approximable within factor 2 in O(2O(k3))O^*(2^{O(k^3)}) time, and within factor 4 in O(2O(k))O^*(2^{O(k)}) 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 XX, integer variables sp(X)sp(X) and ep(X)ep(X) denote its start and end, with basic constraints as rules linking sp(X)sp(X) and ep(Y)ep(Y) according to the semantics of each IA relation (Janhunen et al., 2019).

For example, the precedes relation pp corresponds to ep(X)<sp(Y)ep(X) < sp(Y), 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 n=100n=100 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 n50n \approx 50. 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 nn points in two dimensions consistent with binary constraints on allowed (x,y)(\odot_x, \odot_y) relations, the algorithm achieves O((cn/lnn)2n/3)O^*((c\,n/\ln n)^{2n/3}) 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 kk 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 cc in the current O((cn/lnn)n)O^*((c\,n/\ln n)^{n}) bound.
  • Elimination or relaxation of the left-heaviness restriction in block partitioning.
  • Development of truly single-exponential (O(cn)O^*(c^n)) 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).

Whiteboard

Follow Topic

Get notified by email when new papers are published related to Allen’s Interval Algebra.