Allen's interval algebra
   HOME

TheInfoList



OR:

Allen's interval algebra is a
calculus Calculus is the mathematics, mathematical study of continuous change, in the same way that geometry is the study of shape, and algebra is the study of generalizations of arithmetic operations. Originally called infinitesimal calculus or "the ...
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. To see that the 13 relations are exhaustive, note that each point of X can be at 5 possible locations relative to Y: before, at the start, within, at the end, after. These give 5 + 4 + 3 + 2 + 1 = 15 possible relative positions for the start and the end of X. Of these, we cannot have X_0 = X_1 = Y_0 since X_0 < X_1, and similarly we cannot have X_0 = X_1 = Y_1, thus giving us 13 possible relations. 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 Composition or Compositions may refer to: Arts and literature *Composition (dance), practice and teaching of choreography * Composition (language), in literature and rhetoric, producing a work in spoken tradition and written discourse, to include ...
table. Given the relation between X and Y and the relation between Y and Z, the composition table allows for concluding about the relation between X and Z. Together with a converse operation, this turns Allen's interval algebra into a
relation algebra In mathematics and abstract algebra, a relation algebra is a residuated Boolean algebra expanded with an involution called converse, a unary operation. The motivating example of a relation algebra is the algebra 2''X'' 2 of all binary re ...
. 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 sentences : ''During dinner, Peter reads the newspaper. Afterwards, he goes to bed.'' are formalized in Allen's Interval Algebra as follows: \mbox \mathbf \mbox \mbox \mathbf \mbox For the example, one can infer \mbox \mathbf \mbox.


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 In markup languages and the digital humanities, overlap occurs when a document has two or more structures that interact in a non-hierarchical manner. A document with overlapping markup cannot be represented as a tree. This is also known as concurre ...
uses a similar algebra (see ). Its models have more variations depending on whether endpoints of document structures are permitted to be truly co-located, or merely angent


Temporal primitives

In the cultural heritage ontology CIDOC CRM, Allen relations are replaced by so-called ''temporal primitives'', which facilitate the formulation of attestable statements as well as reasoning about these statements.CIDOC CRM Version 7.3: https://cidoc-crm.org/versions-of-the-cidoc-crm, section ''Temporal Relation Primitives based on fuzzy boundaries'' Temporal primitives split up the Allen relations into individual statements about the start or end of the intervals. For example, ''X overlaps with Y'' (X \mathbf Y) can be split as follows: * X \mathbf Y ⇔ ''starts before the start of'' (X,Y) ∧ ''ends after the start of'' (X,Y) ∧ ''ends before the end of'' (X,Y) In addition, the ''equal to'' of the Allen relations is replaced by ''before or with'' and ''after or with''. A simple example: * The reign of King
Harold II Harold Godwinson ( – 14 October 1066), also called Harold II, was the last crowned Anglo-Saxon King of England. Harold reigned from 6 January 1066 until his death at the Battle of Hastings on 14 October 1066, the decisive battle of the Norman ...
''starts before the start of'' the
Battle of Hastings The Battle of Hastings was fought on 14 October 1066 between the Norman-French army of William, Duke of Normandy, and an English army under the Anglo-Saxon King Harold Godwinson, beginning the Norman Conquest of England. It took place appr ...
* The reign/life of Harold II ''ends after or with the start of'' the Battle of Hastings * The reign/life of Harold II ''ends before or with the end of'' the Battle of Hastings In the example, it is not necessary to specify whether Harold II was killed at the beginning or during or at the end of the battle, i.e. whether X \mathbf Y, X \mathbf Y or X \mathbf Y applies (disjunctions such as \mathbf cannot be expressed in CIDOC CRM, except in queries). If it is relevant for a particular historical question, it can be specified later by adding e.g. ''ends after the start of''. CIDOC CRM distinguishes between events and their corresponding time intervals. Allen relations and temporal primitives are statements between events and only as a consequence between their time intervals. Another difference is that temporal, spatial and spatiotemporal entities in CIDOC CRM are seen as having fuzzy borders. Especially statements about exact simultaneity are otherwise extremely rare.


Implementations


A simple java library implementing the concept of Allen's temporal relations and the path consistency algorithm

Java library implementing Allen's Interval Algebra
(incl. data and index structures, e.g.,
interval tree In computer science, an interval tree is a tree data structure to hold intervals. Specifically, it allows one to efficiently find all intervals that overlap with any given interval or point. It is often used for windowing queries, for instance, t ...
)
OWL-Time Time Ontology in OWL
an
OWL Owls are birds from the order Strigiformes (), which includes over 200 species of mostly solitary and nocturnal birds of prey typified by an upright stance, a large, broad head, binocular vision, binaural hearing, sharp talons, and feathers a ...
-2 DL ontology of temporal concepts, for describing the temporal properties of resources in the world or described in Web pages.
GQR
is a
reasoner A semantic reasoner, reasoning engine, rules engine, or simply a reasoner, is a piece of software able to infer logical consequences from a set of asserted facts or axioms. The notion of a semantic reasoner generalizes that of an inference engine ...
for Allen's interval algebra (and many others)
qualreas
is a Python framework for qualitative reasoning over networks of relation algebras, such as RCC-8, Allen's interval algebra, and Allen's algebra integrated with Time Points and situated in either Left- or Right-Branching Time.
SparQ
is a reasoner for Allen's interval algebra (and many others)
EveXL
is a small domain-specific language for the detection of events that implements the Interval Algebra's operators via ASCII art patterns.


See also

*
Temporal logic In logic, temporal logic is any system of rules and symbolism for representing, and reasoning about, propositions qualified in terms of time (for example, "I am ''always'' hungry", "I will ''eventually'' be hungry", or "I will be hungry ''until'' I ...
*
Logic Logic is the study of correct reasoning. It includes both formal and informal logic. Formal logic is the study of deductively valid inferences or logical truths. It examines how conclusions follow from premises based on the structure o ...
* Region connection calculus *
Spatial relation A spatial relationD. M. Mark and M. J. Egenhofer (1994), "Modeling Spatial Relations Between Lines and Regions: Combining Formal Mathematical Models and Human Subjects Testing"PDF/ref> specifies how some object is located in space in relation to s ...
(analog) *
Commonsense reasoning In artificial intelligence (AI), commonsense reasoning is a human-like ability to make presumptions about the type and essence of ordinary situations humans encounter every day. These assumptions include judgments about the nature of physical objec ...


References


Sources

* * * {{cite journal , first1=Peter , last1=van Beek , first2=Dennis W. , last2=Manchak , title=The design and experimental analysis of algorithms for temporal reasoning , url=https://www.jair.org/media/232/live-232-1507-jair.pdf , journal=Journal of Artificial Intelligence Research , volume=4 , issue=1996 , pages=1–18 , date=1996 , bibcode=1996cs........1101V , arxiv=cs/9601101 , doi=10.1613/jair.232 , s2cid=3204600 , access-date=6 May 2017 , archive-date=6 July 2017 , archive-url=https://web.archive.org/web/20170706031711/http://jair.org/media/232/live-232-1507-jair.pdf , url-status=dead Knowledge representation Constraint programming