Inferensys

Glossary

Allen's Interval Algebra

A calculus for temporal reasoning that defines thirteen mutually exclusive relations between two time intervals, such as 'before', 'meets', or 'overlaps', to constrain qualitative temporal knowledge.
Knowledge manager reviewing enterprise knowledge management system on laptop, document library visible, casual office.
TEMPORAL REASONING

What is Allen's Interval Algebra?

A calculus for qualitative temporal reasoning that defines thirteen exhaustive and mutually exclusive relations between two time intervals.

Allen's Interval Algebra is a formal calculus for qualitative temporal reasoning that defines thirteen mutually exclusive base relations—such as before, meets, overlaps, during, starts, finishes, and their inverses—that can hold between any two time intervals. Developed by James F. Allen in 1983, it provides a constraint-based framework for representing and reasoning about temporal knowledge without requiring precise numeric timestamps, making it foundational for systems that must infer temporal order from incomplete information.

The algebra operates through a composition table that allows a reasoner to deduce the relationship between interval A and interval C given the relationships between A and B and between B and C. This transitivity enables the propagation of temporal constraints and the detection of inconsistencies in a network of interval relations. In legal AI, it is used to model the complex temporal interactions between contractual obligations, such as determining that a delivery deadline overlaps a payment window, which in turn is met by a warranty activation period.

TEMPORAL REASONING FRAMEWORK

Key Features of Allen's Interval Algebra

A qualitative calculus defining 13 exhaustive and mutually exclusive relations between two time intervals, forming the foundational logic for constraint-based temporal reasoning in legal obligation management systems.

01

The 13 Base Relations

The algebra defines a complete set of jointly exhaustive and pairwise disjoint (JEPD) relations: Before, Meets, Overlaps, Starts, During, Finishes, and their inverses (After, MetBy, OverlappedBy, StartedBy, Contains, FinishedBy), plus Equals. These 13 relations form an atomic relation set where any two definite intervals must satisfy exactly one relation.

02

Composition Table Reasoning

The algebra's deductive power comes from its transitivity table, a 13x13 matrix defining the composition of relations. For example, if interval A is Before interval B, and B Contains interval C, the table infers that A is Before C. This enables constraint propagation across a network of temporal intervals to detect inconsistencies or deduce new, implicit relationships.

03

Disjunctive Relation Networks

When temporal knowledge is incomplete, a constraint between two intervals is expressed as a disjunction of base relations, e.g., {Before, Meets}. The algebra operates on these sets using set-theoretic composition. A path consistency algorithm iteratively refines these disjunctive constraints by intersecting compositions along all paths in the network until a fixed point is reached or an inconsistency (empty set) is found.

04

Point-Interval Reduction

The algebra can be extended to handle points (instants) by treating a point as an interval with zero duration where the start equals the end. This allows reasoning about deadlines and instantaneous events within the same framework. A point can be Before, Meets, or MetBy an interval, but cannot Overlap or Contain it, reducing the applicable relation set for point-interval constraints.

05

Conceptual Neighborhood Structure

The 13 relations are organized into a conceptual neighborhood graph that defines which relations are continuous transformations of one another. For instance, Before can transition to Meets by decreasing the gap between intervals, and Meets can transition to Overlaps by moving the intervals closer. This structure is critical for modeling temporal uncertainty and reasoning about events with imprecise boundaries.

06

Computational Complexity

Determining the consistency of a network of Allen relations is an NP-complete problem in the general case when disjunctions are allowed. However, restricting constraints to the ORD-Horn subclass—a set of 868 tractable relations—enables polynomial-time reasoning using path consistency. This tractable subset is sufficient for most practical legal temporal constraint problems.

TEMPORAL REASONING

Frequently Asked Questions

Clear, technically precise answers to the most common questions about Allen's Interval Algebra and its application in modeling time-bound contractual obligations.

Allen's Interval Algebra is a formal calculus for qualitative temporal reasoning that defines thirteen mutually exclusive and exhaustive base relations between two time intervals, such as before, meets, overlaps, during, and equals. It works by treating a time interval as a convex set of points and classifying the relative positioning of their endpoints. The thirteen relations are: before(i, j), after(i, j), meets(i, j), metBy(i, j), overlaps(i, j), overlappedBy(i, j), starts(i, j), startedBy(i, j), during(i, j), contains(i, j), finishes(i, j), finishedBy(i, j), and equals(i, j). A key property is that these relations form a composition table, allowing a reasoner to infer a transitive relationship between intervals i and k given the relations between i and j and between j and k. For example, if obligation A is before obligation B, and obligation B meets obligation C, the algebra infers that A is before C. This constraint propagation mechanism is the foundation for detecting inconsistencies in a set of temporal statements, making it a powerful tool for analyzing complex contractual timelines where explicit dates may be missing but relative ordering is specified.

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.