# Allen's interval algebra

Jump to navigation Jump to search

For the type of boolean algebra called interval algebra, see Boolean algebra (structure)

Allen's interval algebra is a calculus for temporal reasoning that was introduced by James F. Allen in 1983.

The calculus defines possible relations between time intervals and provides a composition table that can be used as a basis for reasoning about temporal descriptions of events.

## Formal description

### Relations

The following 13 base relations capture the possible relations between two intervals.

Relation Illustration Interpretation
${\displaystyle X\,{\mathrel {\mathbf {<} }}\,Y}$

${\displaystyle Y\,{\mathrel {\mathbf {>} }}\,X}$

X takes place before Y
${\displaystyle X\,{\mathrel {\mathbf {m} }}\,Y}$

${\displaystyle Y\,{\mathrel {\mathbf {mi} }}\,X}$

X meets Y (i stands for inverse)
${\displaystyle X\,{\mathrel {\mathbf {o} }}\,Y}$

${\displaystyle Y\,{\mathrel {\mathbf {oi} }}\,X}$

X overlaps with Y
${\displaystyle X\,{\mathrel {\mathbf {s} }}\,Y}$

${\displaystyle Y\,{\mathrel {\mathbf {si} }}\,X}$

X starts Y
${\displaystyle X\,{\mathrel {\mathbf {d} }}\,Y}$

${\displaystyle Y\,{\mathrel {\mathbf {di} }}\,X}$

X during Y
${\displaystyle X\,{\mathrel {\mathbf {f} }}\,Y}$

${\displaystyle Y\,{\mathrel {\mathbf {fi} }}\,X}$

X finishes Y
${\displaystyle X\,{\mathrel {\mathbf {=} }}\,Y}$ X is equal to Y

Using this calculus, given facts can be formalized and then used for automatic reasoning. Relations between intervals are formalized as sets of base relations.

The sentence

During dinner, Peter reads the newspaper. Afterwards, he goes to bed.

is formalized in Allen's Interval Algebra as follows:

${\displaystyle {\mbox{newspaper }}\mathbf {\{\operatorname {d} ,\operatorname {s} ,\operatorname {f} \}} {\mbox{ dinner}}}$

${\displaystyle {\mbox{dinner }}\mathbf {\{\operatorname {<} ,\operatorname {m} \}} {\mbox{ bed}}}$

In general, the number of different relations between n intervals is 1, 1, 13, 409, 23917, 2244361... OEIS A055203. The special case shown above is for n=2.

### Composition of relations between intervals

For reasoning about the relations between temporal intervals, Allen's Interval Algebra provides a composition table. Given the relation between ${\displaystyle X}$ and ${\displaystyle Y}$ and the relation between ${\displaystyle Y}$ and ${\displaystyle Z}$, the composition table allows for concluding about the relation between ${\displaystyle X}$ and ${\displaystyle Z}$. Together with a converse operation, this turns Allen's Interval Algebra into a relation algebra.

For the example, one can infer ${\displaystyle {\mbox{newspaper }}\mathbf {\{\operatorname {<} ,\operatorname {m} \}} {\mbox{ bed}}}$.

## Extensions

Allen's Interval Algebra can be used for the description of both temporal intervals and spatial configurations. For the latter use, the relations are interpreted as describing the relative position of spatial objects. This also works for three-dimensional objects by listing the relation for each coordinate separately.

The study of Overlapping markup uses a similar algebra (see [1]). Its models have more variations depending on whether endpoints of document structures are permitted to be truly co-located, or merely [tangent].

## References

1. ^ Steven DeRose. Markup Overlap: A Review and a Horse. In Proceedings of Extreme Markup Languages 2004, Montréal, Québec, August 2-6, 2004. http://xml.coverpages.org/DeRoseEML2004.pdf

## Sources

• Allen, James F. (26 November 1983). "Maintaining knowledge about temporal intervals" (PDF). Communications of the ACM. ACM Press: 832–843. doi:10.1145/182.358434. ISSN 0001-0782.
• Nebel, Bernhard; Bürckert, Hans-Jürgen (1995). "Reasoning about Temporal Relations: A Maximal Tractable Subclass of Allen's Interval Algebra". Journal of the ACM. 42: 43–66. doi:10.1145/200836.200848.
• van Beek, Peter; Manchak, Dennis W. (1996). "The design and experimental analysis of algorithms for temporal reasoning" (PDF). Journal of Artificial Intelligence Research. 4 (1996): 1–18. arXiv:cs/9601101. Bibcode:1996cs........1101V.