On the Complexity of the Realisability Problem for Visit Events in Trajectory Sample Databases
Abstract
Trajectory sample databases store finite sequences of measured space-time locations of moving objects, along with a speed bound for each object. These databases can be seen as uncertain databases. We propose a language that allows the formulation of queries about the uncertainty in trajectory sample databases. As part of that language, we introduce the notion of visit events, which are used to describe certain constraints on the movement of an object. In our language, an atomic query asks whether a moving object can, given its limitations, realise such an event. We give complexity results for this realisability problem, in various settings.
Keywords and phrases:
Trajectory sample databases, uncertain databases, query languages, complexityFunding:
Arthur Jansen: Bijzonder Onderzoeksfonds (BOF22OWB06) from UHasseltCopyright and License:
2012 ACM Subject Classification:
Information systems Spatial-temporal systems ; Information systems Query languagesEditors:
Thierry Vidal and Przemysław Andrzej WałęgaSeries and Publisher:
Leibniz International Proceedings in Informatics, Schloss Dagstuhl – Leibniz-Zentrum für Informatik
1 Introduction
Due to the proliferation of location-aware devices (such as GPS receivers) in the past two decades, one of the use-cases of moving object databases [8] is the storage of time-stamped measured locations of moving objects [7]. Such a sequence of spatio-temporal measurements of a single moving object is called a trajectory sample. Given this type of partial information on a moving object, we do not know the precise space-time path (or trajectory) which the object has followed, but we do know that the trajectory must have passed these measured spatio-temporal locations. However, without making further assumptions, there are no theoretical limits to the movement of the object in between two measurements. An assumption that originates from the area of time geography, where the moving object’s accessibility to an environment is studied, is that we know a bound on the speed of the moving object [5, 9, 13]. Therefore, it is common to associate a maximal speed to each moving object, alongside a trajectory sample. With this additional knowledge, the actual trajectory of a moving object is guaranteed to be contained in a spatio-temporal region known as a “lifeline necklace” in spatio-temporal and moving object databases [6, 10, 18], or simply as a “chain of space-time prisms” in the fields of time geography [9] and Geographical Information Systems (GIS) [15, 12, 14].
We refer to a moving object database with the specific purpose of storing trajectory samples and speed bounds as a trajectory sample database. A trajectory sample database can be seen as an uncertain (or incomplete) database [1, 11]. In general, an uncertain database represents a set of “possible worlds”, where each possible world is a concrete instantiation of the data. In our setting, a possible world corresponds to an assignment of a trajectory to every object, satisfying the known limitations of that object. In this paper, we propose a query language for trajectory sample databases that is based on events that are possibly semantically interesting for some application and that may occur during a trajectory of a moving object. We introduce visit events as part of our language, which are used to describe constraints on trajectories. The most basic visit event expresses that a trajectory visits a particular region during a particular period of time. To allow for composition, the class of visit events is closed under Boolean combinations (using negation, conjunction and disjunction). For example, we could express the complex event that states that an object has visited a museum in the morning, some restaurant at lunch and has not been in a particular church in the afternoon. For a dataset of tourists visiting some city, this event may have occurred during the movement of some of the tourists. This example shows that our proposed query language is related to the field of semantic trajectories and places of interest (POIs) in such trajectories and could be used to match trajectories with event patterns [4, 17, 21]. The queries appearing in [20], where a cylinder model of uncertainty is used, are similar to what our languages can express.
The atomic query in our language asks whether a given visit event is realisable by the trajectory of some moving object, that is, whether there exists a trajectory that satisfies the constraints described by that event. We call the evaluation of this atomic query the realisability problem. To allow for composition on the query level, the query expressions are also closed under Boolean combinations. An important detail is that our query language is defined relative to two parameters: , denoting the class of spatial regions that can occur in visit events, and , denoting the periods of time that can occur in visit events. We study the complexity of the realisability problem for different choices of and . For , we consider the class of singleton points () and of semi-algebraic sets (). For , on the other hand, we consider the class of singleton moments () and intervals of time (). Because the realisability problem already becomes NP-hard for very restrictive classes of events, and because we believe it is of interest to measure the influence that the size of the database has on the complexity of query evaluation, we distinguish between combined complexity, data complexity and query complexity [1]. A summary of our complexity results is displayed in Table 1.
| Class of events | Data | Query | Combined |
|---|---|---|---|
| -event in DNF | linear | polynomial | polynomial |
| Positive -events | linear | NP-hard | NP-hard |
| -events | linear | NP-hard | NP-hard |
| Conjunctive -events | polynomial | NP-hard | NP-hard |
| Positive -events | polynomial | NP-hard | NP-hard |
The paper is organised as follows. In Section 2, we give the definitions that are necessary to formalize the notion of a trajectory sample database. In Section 3, we define the syntax and the semantics of our query languages. In Section 4, we study the complexity of the realisability problem in different settings. Finally, we conclude the paper with Section 5.
2 Definitions and preliminaries on trajectory sample databases
In this section, we give definitions of the concepts needed to introduce the notion of a trajectory sample database.
We consider the space in which objects move to be the plane , and we use the letters (with or without indices) to denote locations in space. Time is modelled as the real line , and we use (with or without indices) to refer to the temporal points (or moments). We also use and to refer to the real coordinates of spatial locations. A spatio-temporal point is then an element of and if , we also write for the spatio-temporal point . Furthermore, we use to denote the Euclidean distance in .
The movement of an object is captured by the notion of “trajectory” and it corresponds to a function mapping (all possible) moments in time to locations in space, as is expressed by the following definition.
Definition 1.
A trajectory is a continuous function from to .
We use the Greek letter (with or without indices) to refer to trajectories. In practice trajectories are only observed or measured at discrete moments in time and we call these partial views on trajectories “trajectory samples”.
Definition 2.
A trajectory sample (or sample, for short) is a finite sequence of space-time points that is ordered by the temporal component (that is, ).
We use the letter (with or without indices) to refer to trajectory samples. The following definition captures the notion of trajectories matching trajectory samples.
Definition 3.
We say a trajectory visits a space-time point when and we say that a trajectory visits a subset of space-time if visits one of its elements.
A trajectory sample matches the trajectory if visits all the space-time points , for .
Trajectory sample databases do not only store a trajectory sample for each moving object, but also a maximal speed for each moving object. Because we assume that every moving object has such speed bound, these bounds further restrict trajectories (as trajectory samples do). This is capured in the following definition.
Definition 4.
A trajectory is called -bounded when for all we have .
We use to denote the set of all -bounded trajectories matching the sample . Obviously, some trajectory samples have no -bounded trajectories that match them. The consistency of a sample with a speed bound is expressed in the following definition.
Definition 5.
A trajectory sample is called -consistent when , for .
In the remainder of this paper, we assume, when given a trajectory sample and a speed bound , that is -consistent.
Definition 6.
The linear interpolation trajectory of a trajectory sample , denoted by , is defined as the trajectory , with
We note that if is -consistent, then is a -bounded trajectory.
In trajectory sample databases, we use natural numbers as identifiers for moving objects. Therefore, such database is defined relative to a finite subset of , called the object identifiers.
Definition 7.
A trajectory sample database over object identifiers is a function mapping each identifier to a pair , where is a trajectory sample and is a speed bound.
This means that, given a database , the set contains all trajectories that the object with identifier may have followed (given the sample and the speed bound).
3 Syntax, semantics and evaluation of -queries
In this section, we describe a family of query languages for trajectory sample databases. Our languages consists of two “tiers”: in the inner tier, we have the events, which are used as subexpressions in the outer tier, where we have the query expressions. We define the language relative to two parameters, and , where is a collection of spatial regions (or subsets of ), and is a collection of temporal periods (or subsets of ).
In the following subsections, we define the syntax of the query languages, their semantics, and we end with a remark on the evaluation of query expressions.
3.1 The syntax of -queries
We start by defining the inner tier of our language, which is a calculus of events. These events occur as subexpressions in the query expressions defined later on. Events express visits that may occur during the movement of an object.
Definition 8.
We define the -events as follows:
-
1.
, with and , is an atomic -event;
-
2.
If and are -events, then so are , and .
In other words, -events can be considered as propositional formulas over the propositional symbols , for every and . Now, we are ready to define -queries. Their expression is given in the following definition.
Definition 9.
Let be a set of object identifier variables (or variables, for short). The -query expressions are defined as follows:
-
1.
If is an -event, a natural number and , then and are atomic -query expressions;
-
2.
If and are -query expression, then so are , and .
3.2 The semantics of -queries
To define the semantics of query expressions, we first define what it means for an event to be realised by a trajectory.
Definition 10.
Let be an -event and let be a trajectory.
-
1.
If is the atomic event , then is realised by if for some (that is, visits ).
-
2.
If is of the form , then is realised by when is not realised by .
-
3.
If is of the form , then is realised by when and are realised by .
-
4.
If is of the form , then is realised by when or is realised by .
In our definition of the semantics of -queries, we distinguish between Boolean and non-Boolean queries. The first type of queries contain no variables and they evaluate to true or false. The second type of queries contain variables and they define a relations over .
Definition 11.
Let be a trajectory sample database over object identifiers . We write to express that a variable-free -query expression evaluates to true on . This relation is defined as follows:
-
1.
if and there exists a trajectory in that realises .
-
2.
if does not hold.
-
3.
if and .
-
4.
if or .
Definition 12.
Let be a trajectory sample database over object identifiers . If is an -query expression containing variables , then the result of evaluated in is
where is obtained from by instantiating the variable in by , for .
3.3 Evaluation of -queries
Having defined the semantics of our -query languages, there is a “standard” way of evaluating query expressions with variables: given a query expression with variables, we enumerate all -tuples of object identifiers, consider all the instantiations associated with them and then evaluate the variable-free expression obtained by substituting the variable occurrences by the concrete object identifiers from this tuple.
However, it is not immediately clear from the definition of the semantics how an atomic query of the form can be evaluated. In what follows, we restrict our attention to this decision problem.
Definition 13.
We define the -realisability problem to be the following decision problem: given -event , sample and speed bound , does there exist a trajectory in that realises ?
From now on, we use the notation to express that there exists a trajectory in that realises the event .
4 The complexity of the -realisability problem
In this section, we give a number of complexity results on the above realisability problem. We recall that the input to this problem is a trajectory sample, a speed bound and an -event. In order for the realisability problem to be a proper computational decision problem, these inputs must have finite representations. This means, for example, that we cannot take arbitrary real numbers as input and that we need to assume some finite encoding of our inputs. Here, we assume that the spatio-temporal points occurring in the trajectory sample have rational coordinates, and that the speed bound is rational. As for the -event, its representation depends on the choice for and and the representation of their elements. The choices for that we consider are , the collection of all singletons in ; and , the collection of all semi-algebraic sets in the plane. A semi-algebraic set in the plane is a subset of that can be defined using a Boolean combination of polynomial (in)equalities over two real variables (where the polynomials have integer coefficients) [3]. Elements of are simply represented by the coordinates of the point in question, while an element of is represented by some encoding of its defining formula. The choices for we consider are , containing all singletons in , and , containing all closed intervals of with rational endpoints.
For notational convenience, the atomic -event will be written as . And similarly, we will write for the atomic -event .
As we show below, the realisability problem is already NP-hard for quite restricted classes of events. Similar to the evaluation of queries in relational databases, the hardness of the realisability problem is caused by the size of the event, and not by the size of the trajectory sample. Therefore, we study the complexity of the realisability problem in three different settings [1], being:
-
the data complexity, where we measure the complexity in terms of the size of the sample, and consider the event to be fixed,
-
the query complexity, where we measure the complexity in terms of the size of event, and consider the sample to be fixed, and
-
the combined complexity, where we measure the complexity in terms of both the size of the sample, and the size of the event.
We also consider several restrictions to the class of input events, such as positive events, containing no negations, conjunctive events, being conjunctions of atoms (or, not containing disjunctions and negations), and events in disjunctive normal form (DNF).
In the remainder of this section, we give various results on the complexity of the -realisability problem, for different choices of and and in the three different settings.
For the complexity results mentioned below, we use a computational model in which operations (addition, multiplication, …) and comparison relations (, , …) on rational numbers are assumed to take unit time. That is, we measure the time complexity in terms of the number of spatio-temporal points in a trajectory sample and in terms of number of atoms (and their length) in an event-expression.
4.1 The query complexity of the -realisability problem
Our first result shows that the realisability problem is already NP-hard for a relatively restricted class of events, namely the positive -events.
Theorem 14.
In terms of query complexity, the -realisability problem for positive events is NP-hard.
Proof.
To prove NP-hardness, we describe a reduction from SAT, the satisfiability problem of propositional formulas. Because the statement concerns query complexity, we reduce SAT to the -realisability problem with fixed sample and speed bound. In this case, we choose the sample and the speed bound . The input of the reduction is a propositional formula . We can assume that is in negation normal form333A formula is said to be in negation normal form if negation operators are only applied to atoms., because the satisfiability problem remains NP-hard under this restriction. The output is a positive -event such that the formula is satisfiable iff there exists a trajectory in that realises the event .
Let be the propositional symbols occuring in . For , we define , and . Now, we take to be the result of substituting occurences of by and non-negated occurrences of by in . Clearly, is a -event, not containing negations.
Finally, we show that is satisfiable if and only if there exists a in that realises . The “if”-direction is straightforward. If there is some that realises , then must certainly be satisfiable. To be precise, the assignment that assigns to true if and only if satisfies . For the “only if”-direction, assume that is satisfiable. Then there exists a truth assignment that makes true. Now, we extend the sample to a sample such that it contains if is assigned true by , and otherwise contains . It is easily verified that is -consistent, which means is a -bounded trajectory. Now, we have that realises if is true under , and realises if is true under . It follows from the way we constructed the event, that realises .
While the above result shows that the -realisability problem is NP-hard for positive events (not containing negations), the problem for -events already becomes NP-hard for conjunctions of atoms, as shown below.
Theorem 15.
In terms of query complexity, the -realisability problem for conjunctive events is NP-hard.
Proof.
We give a reduction from the Euclidean travelling saleman problem (E-TSP for short), shown to be NP-hard in [16] (the problem we refer to here is called the Euclidean tour-TSP there). The Euclidean travelling saleman problem asks, given a finite set of locations and a positive number , whether there is a cycle through all locations of whose length is at most . Formally, this means there is a permutation of the locations in such that . Without loss of generality, we assume that always contains the origin .
Again, we work with a fixed sample and speed bound . From an instance of E-TSP, we give a conjunction of -atoms , such that if and only if there is cycle through of length at most . We define as
To prove that this reduction is correct, we first show that if , then there is cycle through of length at most . Let be a -bounded trajectory matching and realising . Because matches , we have . And, because realises , it reaches every location in at some moment in , and . This induces an order of the locations in , where first reaches , then , and so on (we note that is always ). Thus, if we let be the first moment where for , then . We claim the cycle has length at most . The length of this cycle is . For every , visits , and because is -bounded, we have . Similarly, visits and , thus . It follows that the length of the cycle is at most .
Finally, we show that if there is cycle through of length at most , then . Let be such cycle, where we choose to be . Now, let and for , take . Then, , which, by assumption, is at most . Define the trajectory sample . It is clear from the definition of that the part of excluding is -consistent. We have seen that , and thus , which implies that is -consistent. From this follows that is -bounded, and it clearly matches and realises .
4.2 The data complexity of the -realisability problem
In this section, we show that the -realisability problem has linear-time data complexity, and the -realisability problem has polynomial-time data complexity
We start with the result on -queries, but first we introduce some notation and we give two lemmas. Every region in is of the form , where is a quantifier-free formula over the vocabulary , with and as free variables. The set is called the region defined by , and we denote it by .
Definition 16.
If is a conjunction of atomic -events, and is an interval, the formula is the conjunction of those , with , for which .
Lemma 17.
Let be a conjunction of atomic -events, let be a trajectory sample and let be a speed bound. Then, if and only if all of the following are true:
-
(1)
,
-
(2)
for , we have , and
-
(3)
.
Proof.
The “only if”-direction is obvious. We prove the “if”-direction. Assume (1), (2) and (3) are true. By (1), there exists a -bounded trajectory matching that realises . By (2), for , there exists a -bounded trajectory matching that realises . And by (3), there exists a -bounded trajectory matching that realises . We define the trajectory as follows:
We note that the intervals and both contain . However, this does not pose a problem for the definition of , because both and visit , which means . It only requires a simple application of the triangle inequality (of Euclidean distance) to show that is a -bounded trajectory. For , we have , thus matches . The only thing left to prove is that realises . Let be an arbitrary conjunct of . Depending on , there are three cases to be considered. First, if , then is a conjunct of . This implies realises , so , which means realises . The other two cases, when is contained in or in , are similar. Because realises all the conjuncts of , it also realises itself.
Lemma 18.
If is a conjunction of atomic -events, is a trajectory sample and a speed bound, then if and only if there exist spatial locations such that
-
(1)
for we have , and
-
(2)
the sample containing the points , as well as the ones in , is -consistent.
We remark that we consider condition (2) from the lemma to be false when some space-time point among shares its temporal component with a point in , while their spatial component differs.
Proof.
The “only if”-direction is obvious. We prove the “if”-direction. Assume there are locations satisfying (1) and (2). Now take the trajectory to be the linear interpolation trajectory of the sample containing the points , as well as the ones in . It is clear that matches and assumption (2) implies it is a -bounded trajectory. Finally, assumption (1) implies that realises .
Definition 19.
We say two -events and are equivalent if for every sample and speed bound , we have if and only if .
The following proposition follows directly from the fact that, for , we have if and only if .
Proposition 20.
A -event of the form is equivalent to the event .
Given an arbitrary -event, we can convert it into negation normal form and use Proposition 20 to remove all negations. The result of this process is a positive -event that is equivalent to the original. Because this process can be performed in linear time (with respect to the length of the event), we can assume that any given -event is positive, without loss of generality.
Theorem 21.
In terms of data complexity, the -realisability problem is decidable in linear time.
Proof.
We describe an algorithm to decide the realisability problem of a -event for input sample , where , and speed bound . Noting the remark made above, we assume that is positive. The first step is to convert into its disjunctive normal form . Since we are dealing with data complexity, the possibly increased size of , compared to , has no impact on the running time of our method. In fact, because the number of disjuncts of is constant, it is sufficient to show that the realisability problem for a single disjunct can be decided in linear time.
Consider a disjunct of . Because is positive and in DNF, the event must be a conjunction of atomic events. This means we can apply Lemma 17, and we can determine whether by testing whether each of the following conditions are met:
-
(1)
,
-
(2)
for , we have , and
-
(3)
.
We focus our attention to condition (2). For every value of , we want to decide whether is realisable for sample and speed bound . Let us write the conjunction as , with . We remark that this implies . From Lemma 18, we know that if and only if there exist locations , with , such that
-
(a)
for we have , and
-
(b)
the sample is -consistent.
In other words, we have if and only if the formula is true, where is , expressing condition (a), and to express condition (b), we take to be the conjunction of distance inequalities.
Because is a first-order logic sentence over the ordered field of real numbers, its truth can be determined by a decision procedure for the theory of real closed fields (first described by Tarski [19], we refer to Basu et al. [2] for a modern exposition). We note that the size of is independent of , and thus has constant size in the data complexity setting ( is bounded by the length of ). The time needed to determine the truth of is thus also constant. To test for condition (2), we have to perform the above steps for values of . Conditions (1) and (3) can both be tested in constant time, in a manner similar to the above, the only difference is that the constructed sentence requires one less inequality for expressing -consistency. We have thus shown that the realisability problem for a single disjunct of can be answered in time. This concludes the proof.
Our next result concerns the data complexity of the -realisability problem for positive events.
Lemma 22.
If is a positive -event containing distinct atoms , where , then if and only if there exist space-time points such that
-
(1)
the sample containing the points , as well as the ones in , is -consistent, and
-
(2)
the Boolean expression obtained by replacing in by true if , and by false otherwise, evaluates to true.
Proof.
We first prove the “if”-direction. Assume that there exist satisfying (1) and (2). Let be the sample containing the points , as well as the ones in . Assumption (1) says is -consistent, which means is -bounded. Because is an extension of , and matches , it must also match . The trajectory realises all the atoms for which , and potentially others. Because of assumption (2) and the fact that is positive, realises , and thus .
For the “only if”-direction, we assume that . That means that there exists a -bounded realising and matching . We choose as follows. For every atom which realises, we know that visits some point in , and take to be such point. For an atom not realised by , we take (quite arbitrarily) to be the first anchor point of . Then, , since otherwise would realise . All points of and are visited by , so the sample containing all those points must be -consistent, satisfying condition (1). Because realises if and only if and realises , condition (2) is also satisfied.
The following proposition follows directly from the definition of -consistency and the fact that the distance function obeys the triangle inequality.
Proposition 23.
If is an (unordered) finite set of space-time points, then the sample containing all points in is -consistent if and only if for every pair of points and from , we have .
It will be of interest later that the condition from the above proposition is equivalent to , which, if and , is a polynomial inequality with variables .
Theorem 24.
In terms of data complexity, the -realisability problem for positive events can be decided in polynomial time.
Proof.
We describe an algorithm to decide the realisability of a positive -event for input sample , of length , and speed bound . Lemma 22 gives a condition equivalent to . We can express this condition using a first-order logic sentence over the ordered field of real numbers , where expresses part (1) of Lemma 22, and expresses part (2). To express part (1), stating that the sample containing as well as the points from is -consistent, we can take to be a conjunction of distance inequalities, as per Proposition 23. To express the second part, we construct by taking and replacing every atom by the formula .
We have now constructed a formula which is true if and only if . Thus, if there is a method to determine the truth , we can decide the realisability problem for positive -events. Because is an existantial sentence, we can apply known decision procedures for the existential theory of the reals. Of course, the time complexity required to decide the realisability of positive -events in the described manner, depends on the time complexity of the existential theory of the reals. In [2] (see theorem 13.14), an upper bound of is given, where is the number of polynomials occuring in the formula, the number of variables, and the maximum degree of the polynomials. Because we are considering data complexity, the number of polynomials in the ’s, as well as their maximum degree, is constant, and so is . This implies that contains polynomials of constant degree, and variables. Thus, by Theorem 13.14 from [2], the truth of can be decided in time, which is polynomial in . It is also clear that can be constructed in polynomial time.
4.3 A class of events for which the realisability problem has polynomial time combined complexity
Until now, we have only seen hardness results in the query (and thus, combined) complexity setting. In this section, we give an example of a class of events for which the realisability problem has polynomial-time combined complexity.
An -literal is either an atomic -event, or the negation of an atomic -event. Conjunctions of -literals provide a class of events for which the realisability problem has an efficient solution in terms of combined complexity. Before giving our result, we first prove a lemma.
Lemma 25.
If and are trajectory samples, then there exists a -bounded trajectory matching and not visiting any point in if and only if
-
(1)
does not contain a point in ,
-
(2)
is -consistent, and
-
(3)
if visits a point from , on the line segment between points and from , then .
Proof.
It is obvious that the conditions (1), (2) and (3) are necessary for the existence of a -bounded trajectory matching and not visiting points in . To show that they are also sufficient, we assume that all three conditions are met. Consider the trajectory . By condition (2), it is -bounded. In case visits one or more points from , we show that we can extend (by adding points) to a sample , such that is -bounded, matches and does not visit points from . Because is obtained by adding points to , it is obvious that matches . Let us say that visits a point from on the line segment between and . From (1) we know that , and from (3) we have . Together, these observations imply there must be a small disk around , such that for every in this disk, the extension of with the point remains -consistent. Informally, this means we can deviate slightly between and , while the trajectory remains -bounded. Now, for every point of with , there is at most one choice for inside the disk that makes the linear interpolation trajectory of the extended sample visit . Because there are infinitely many points in the disks, we can choose such that, between and , none of the points from are visited. We can repeat this process for each line segment of that visits a point from . The linear interpolation trajectory of the resulting sample then matches , is -bounded and does not visit points from , as desired.
Theorem 26.
In terms of combined complexity, the -realisability problem for a conjunction of literals and a trajectory sample of length is decidable in time.
Proof.
We assume that we are given a conjunction of -literals, a sample of length and a speed bound as input. Let be the positive atoms occuring in and let be the atoms occuring negated in . First we compute the sample , containing both the points in and the ones occuring in the atoms . Computing this sample requires ordering the points occuring in by time, and merging these with those from (which are already ordered by time). This can be done in time. We also compute a sample , containing the points from , in time. Now we have if and only if there exists a -bounded trajectory matching and not visiting any point in . This can be determined by testing for the conditions of Lemma 25 in time, where . Thus, the total time required by the described procedure is .
Corollary 27.
In terms of combined complexity, the -realisability problem for an event in disjunctive normal form, of length , and a trajectory sample of length is decidable in time.
Proof.
We assume that we are given a -event in disjunctive normal form, of length , a sample of length and a speed bound as input. Then, is of the form , where every disjunct is a conjunction of literals. Let us say that the event contains literals. Because is realisable if and only if one of the ’s is realisable, we can use Theorem 26 to determine the realisability of , by determining it for each of the disjuncts. This takes time, which is .
5 Conclusion
We have proposed a family of query languages for trajectory sample databases. Query expressions in these languages contain events, which are used to describe constraints on trajectories. When performing query evaluation, an essential problem required to be solved is that of the realisability of an event. We studied the complexity of this realisability problem in terms of data, query and combined complexity. These results are summarised in Table 1. These complexity results are given in a computational model wherein (arithmetic and comparison) operations on rational numbers take unit time. It is not clear whether our results remain true in a model in which we measure the cost of these operations in terms of the length of the bit-representation of rational numbers. Also, we did not give much attention to the evaluation of query expressions outside of the realisability problem. We assumed that query expressions are evaluated in some standard way, but more efficient strategies might exist.
References
- [1] Serge Abiteboul, Richard Hull, and Victor Vianu. Foundations of Databases. Addison-Wesley, 1995. URL: http://webdam.inria.fr/Alice/.
- [2] S. Basu, R. Pollack, and M.-F. Roy. Algorithms in real algebraic geometry. Algorithms and Computation in Mathematics 10. Springer, Berlin, 2003.
- [3] Jacek Bochnak, Michel Coste, and Marie-Françoise Roy. Real Algebraic Geometry, volume 36 of Ergebnisse der Mathematik und ihrer Grenzgebiete. Springer-Verlag, 1998.
- [4] Vania Bogorny, Bart Kuijpers, and Luis Otávio Alvares. ST-DMQL: A semantic trajectory data mining query language. Int. J. Geogr. Inf. Sci., 23(10):1245–1276, 2009. URL: http://www.informaworld.com/smpp/content%7Edb=all%7Econtent=a915093101%7Efrm=abslink.
- [5] L. Burns. Transportation, Temporal, and Spatial Components of Accessibility. Lexington Books, Lexington, MA, 1979.
- [6] Max J. Egenhofer. Approximation of geospatial lifelines. In Elisa Bertino and Leila De Floriani, editors, SpadaGIS, Workshop on Spatial Data and Geographic Information Systems. University of Genova, 2003.
- [7] Fosca Giannotti and Dino Pedreschi, editors. Mobility, Data Mining and Privacy - Geographic Knowledge Discovery. Springer, 2008. doi:10.1007/978-3-540-75177-9.
- [8] R. Güting and M. Schneider. Moving Object Databases. Morgan Kaufmann, 2005.
- [9] T. Hägerstrand. What about people in regional science? Papers of the Regional Science Association, 24:7–21, 1970.
- [10] Kathleen Hornsby and Max J. Egenhofer. Modeling moving objects over multiple granularities. Ann. Math. Artif. Intell., 36(1-2):177–194, 2002. doi:10.1023/A:1015812206586.
- [11] Tomasz Imieliński and Witold Lipski. Incomplete information in relational databases. J. ACM, 31(4):761–791, September 1984. doi:10.1145/1634.1886.
- [12] Donald Janelle and Michael Goodchild. Diurnal patterns of social group distributions in a canadian city. Economic Geography, 59(4):403–425, 1983. URL: http://www.jstor.org/stable/144166.
- [13] B. Lenntorp. Paths in Space-Time Environments: A Time-Geographic Study of the Movement Possibilities of Individuals. Number 44 in Series B. Lund Studies in Geography, 1976.
- [14] H.J. Miller. Modeling accessibility using space-time prism concepts within geographical information systems. International Journal of Geographical Information Systems, 5:287–301, 1991. doi:10.1080/02693799108927856.
- [15] H.J. Miller. A measurement theory for time geography. Geographical Analysis, 2005. doi:10.1111/j.1538-4632.2005.00575.x.
- [16] Christos H. Papadimitriou. The Euclidean travelling salesman problem is NP-complete. Theoretical Computer Science, 4(3):237–244, 1977. doi:10.1016/0304-3975(77)90012-3.
- [17] Christine Parent, Stefano Spaccapietra, Chiara Renso, Gennady L. Andrienko, Natalia V. Andrienko, Vania Bogorny, Maria Luisa Damiani, Aris Gkoulalas-Divanis, José Antônio Fernandes de Macêdo, Nikos Pelekis, Yannis Theodoridis, and Zhixian Yan. Semantic trajectories modeling and analysis. ACM Comput. Surv., 45(4):42:1–42:32, 2013. doi:10.1145/2501654.2501656.
- [18] Dieter Pfoser and Christian S. Jensen. Capturing the uncertainty of moving-object representations. In Ralf Hartmut Güting, Dimitris Papadias, and Frederick H. Lochovsky, editors, Advances in Spatial Databases, 6th International Symposium, SSD’99, Proceedings, volume 1651 of Lecture Notes in Computer Science, pages 111–132. Springer, 1999. doi:10.1007/3-540-48482-5_9.
- [19] Alfred Tarski and J. C. C. McKinsey. A Decision Method for Elementary Algebra and Geometry. University of California Press, 1951.
- [20] G. Trajcevski, O. Wolfson, K. Hinrichs, and S. Chamberlain. Managing uncertainty in moving objects databases. ACM Trans. Database Syst., 29(3):463–507, 2004. doi:10.1145/1016028.1016030.
- [21] Zhixian Yan, Dipanjan Chakraborty, Christine Parent, Stefano Spaccapietra, and Karl Aberer. Semantic trajectories: Mobility data computation and annotation. ACM Trans. Intell. Syst. Technol., 4(3):49:1–49:38, 2013. doi:10.1145/2483669.2483682.
