Allen's interval algebra

From HandWiki
Short description: Calculus for temporal reasoning (relating to time instances) of events


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
[math]\displaystyle{ X \,\mathrel{\mathbf{\lt }}\, Y }[/math]

[math]\displaystyle{ Y \,\mathrel{\mathbf{\gt }}\, X }[/math]

X precedes Y X precedes Y

Y is preceded by X

[math]\displaystyle{ X \,\mathrel{\mathbf{m}}\, Y }[/math]

[math]\displaystyle{ Y \,\mathrel{\mathbf{mi}}\, X }[/math]

X meets Y X meets Y

Y is met by X (i stands for inverse)

[math]\displaystyle{ X \,\mathrel{\mathbf{o}}\, Y }[/math]

[math]\displaystyle{ Y \,\mathrel{\mathbf{oi}}\, X }[/math]

X overlaps with Y X overlaps with Y

Y is overlapped by X

[math]\displaystyle{ X \,\mathrel{\mathbf{s}}\, Y }[/math]

[math]\displaystyle{ Y \,\mathrel{\mathbf{si}}\, X }[/math]

X starts with Y X starts Y

Y is started by X

[math]\displaystyle{ X \,\mathrel{\mathbf{d}}\, Y }[/math]

[math]\displaystyle{ Y \,\mathrel{\mathbf{di}}\, X }[/math]

X during Y X during Y

Y contains X

[math]\displaystyle{ X \,\mathrel{\mathbf{f}}\, Y }[/math]

[math]\displaystyle{ Y \,\mathrel{\mathbf{fi}}\, X }[/math]

X finishes with Y X finishes Y

Y is finished by X

[math]\displaystyle{ X \,\mathrel{\mathbf{=}}\, Y }[/math] X is equal to 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:

[math]\displaystyle{ \mbox{newspaper } \mathbf{\{ \operatorname{d} \}} \mbox{ dinner} }[/math]

[math]\displaystyle{ \mbox{dinner } \mathbf{\{ \operatorname{\lt } \}} \mbox{ bed} }[/math]

In general, the number of different relations between n intervals, starting with n = 0, 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 [math]\displaystyle{ X }[/math] and [math]\displaystyle{ Y }[/math] and the relation between [math]\displaystyle{ Y }[/math] and [math]\displaystyle{ Z }[/math], the composition table allows for concluding about the relation between [math]\displaystyle{ X }[/math] and [math]\displaystyle{ Z }[/math]. Together with a converse operation, this turns Allen's interval algebra into a relation algebra.

For the example, one can infer [math]\displaystyle{ \mbox{newspaper } \mathbf{\{ \operatorname{\lt }, \operatorname{m} \}} \mbox{ bed} }[/math].

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].

Implementations

See also

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