UFDC Home  myUFDC Home  Help 



Full Text  
TOPOLOGICAL REASONING BETWEEN COMPLEX REGIONS IN DATABASES WITH FREQUENT UPDATES By MD ARIFUL HASAN KHAN A THESIS PRESENTED TO THE GRADUATE SCHOOL OF THE UNIVERSITY OF FLORIDA IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE DEGREE OF MASTER OF SCIENCE UNIVERSITY OF FLORIDA 2010 @ 2010 Md Ariful Hasan Khan To my parents ACKNOWLEDGMENTS First of all, I thank Dr. Markus Schneider for his invaluable guidance and encouragement. Without his guidance this thesis would not have been possible. I am also grateful to my supervisory committee members Dr. Jonathan Liu and Dr. Alin Dobra suggestions and feedbacks. I am extremely fortunate for having such a loving and caring parents. Their words and support have been the main motivating factor all through my education. TABLE OF CONTENTS page ACKNOWLEDGMENTS ................... .............. 4 LIST OFTABLES ................... ... ................ 6 LIST OF FIGURES ................... .. ................ 7 ABSTRACT. ...................... .................. 8 CHAPTER 1 INTRODUCTION ................... .. .............. 9 2 BACKGROUND AND RELATED WORK ................ ...... 11 2.1 Background . .. 11 2.1.1 Spatial Objects ................... .......... 11 2.1.2 Spatial Relationships ..... ........ 11 2.1.3 Topological Reasoning with Complex Regions ........... 13 2.2 Related Work .................... .............. 15 3 LOCALINFERENCE ..................... ............ 17 3.1 Set Relationships between the Interiors ................... 17 3.2 Inference Rules . .. 19 3.3 Relationship Identifying Process ..... .... 25 4 GLOBAL INFERENCE ................... ............. 29 4.1 Global Inference in Databases with Frequent Updates ... 29 4.2 An Algorithm for Reasoning between Complex Regions ... 33 4.3 Simulation and Results ................. ......... 34 5 CONCLUSIONS AND FUTURE WORKS ..................... 37 REFERENCES ....................... ................ 38 BIOGRAPHICAL SKETCH .................. ............ 40 LIST OF TABLES Table page 21 Number of Topological Predicates Between Two Complex Spatial Objects. 13 31 33 possible topological relationships between two complex regions. 26 LIST OF FIGURES Figure page 21 Examples of a (a) complex point object, (b) a complex line object, and (c) a com plex region object .. . 12 22 Eight basic topological relationships between two simple regions. ... 12 31 Steps of Local Inference. ................... .......... 17 32 (a) A complex region with its faces and holes, and (b) its interior, boundary, and exterior .................. ................. 18 33 (a) 9Intersection Matrix, (b) complex regions A and B meet, (c) Rmeet(A, B). 18 34 The interiors of A and C: (a) intersects, (b) does not intersect. ... 21 35 Decision tree of the relationship space for complex regions. ... 27 36 The algorithm IdentifyRelationship.. ....................... .28 41 A chain of relationships.. ............................ 31 42 Multiple chains of relationships. ... 32 43 The algorithm ReasoningBetweenComplexRegion. ... 33 44 Performance of the heuristic for different database sizes. ... 35 Abstract of Thesis Presented to the Graduate School of the University of Florida in Partial Fulfillment of the Requirements for the Degree of Master of Science TOPOLOGICAL REASONING BETWEEN COMPLEX REGIONS IN DATABASES WITH FREQUENT UPDATES By Md Ariful Hasan Khan August 2010 Chair: Markus Schneider Major: Computer Engineering Reasoning about space has been a considerable field of study both in Artificial Intelligence and in spatial information theory. Many applications benefit from the inference of new knowledge about the spatial relationships between spatial objects on the basis of already available and explicit spatial relationship knowledge that we call spatial (relationship) facts. Hence, the task is to derive new spatial facts from known spatial facts. A considerable amount of work has focused on reasoning about topological relationships (as a special and important subset of spatial relationships) between simple spatial objects like simple regions. There is a common consensus in the GIS and spatial database communities that simple regions are insufficient to model spatial reality and that complex region objects are needed that allow multiple components and holes. Models for topological relationships between complex regions have already been developed. Hence, as the next logical step, the goal of this thesis is to develop a reasoning model for them. Further no reasoning model considers changes of the spatial fact basis stored in a database in between the queries. We show that conventional modeling suffers performance degradation when the database is frequently changing. Our model does not assume any geometric representation model or data structure for the regions. The model is also backward compatible which means that it is also applicable to simple regions. CHAPTER 1 INTRODUCTION Understanding the topological relationships between objects in space has become a multidisciplinary research issue involving Al, CAD/CAM systems, cognitive science, computer vision, image databases, linguistics, robotics, GIS, and spatial databases. From a spatial database and GIS point of view, topological relationships are necessary as filter conditions for spatial selections and spatial joins as well as for spatial data retrieval and analysis. In spatial databases and GIS, we generally deal with a large number of spatial objects. Hence, it is not uncommon that we do not have all possible relationships available between every pair of spatial objects all the time. This situation can arise either due to a lack of information or since it is impossible to get all the relationships. To deal with this problem of a lack of complete knowledge, we need a process through which we can infer the topological relationship between two spatial objects where the relationship does not currently exist in the knowledge base. This process is called reasoning. Hence, reasoning about topological relationship is a method of inferring new topological relationships, call 2D spatial facts, between two spatial objects using the other existing spatial facts in the knowledge base. For example, given three objects A, B and C, and given two topological relationships Rx(A, B) and Ry(B, C), reasoning helps us to find out the relationship Rz between A and C where Rz does not exist in the knowledge base. This process is also called the composition of relationships which is the most common method of reasoning. So far, the main focus of the available reasoning models is to deal with simple regions. But in the real world we often face the situation where a real objects cannot be represented by simple regions alone. For example, Italy contains the Vatican as a hole, and the Galapagos island does not consist of a single island but rather of a collection of many islands. These spatial phenomena cannot be represented by simple regions. The second problem is that the current reasoning models hardly take the changes of spatial facts into account. It is natural that often the information is added, deleted or updated in the databases. So it is important to understand as well as to consider the effect of such changes while designing a reasoning model. The main goal of this thesis is to develop a reasoning model for complex regions. The main challenge is to deal with a large number of possible topological relationships between two complex regions as well as to deal with a large number of such regions. Our second goal is to derive a set of inference rules by which the inference of relationships is performed. Since the type for simple regions is a subset of the type for complex regions, it is also our goal that the reasoning model is able to handle simple regions without requiring any modification. Finally, we show the effect of the changes of spatial facts on the reasoning process, and we propose an algorithm to handle those changes. We propose a generalized process to infer new relationships between complex regions which is not restricted by the number of regions as well as changes in the database. The process has two basic steps. In the first step, we perform the reasoning process involving three regions, call it Local Inference. In the second step, we extend this local inference to N regions and hence call it Global Inference. The remainder of the thesis is organized as follows: Section 2 discusses background and related work regarding reasoning models. In Sections 3 and 4, we describe the local and global inference respectively. Finally, Section 5 draws some conclusions and discusses future work. CHAPTER 2 BACKGROUND AND RELATED WORK 2.1 Background In this section we discuss about the different types of spatial objects followed by the different types of relationships between spatial objects. Then, We explain the basic steps of the reasoning process and the general algorithms to implement these steps. 2.1.1 Spatial Objects In the past, numerous data models have been proposed with the aim of formulating spatial objects in databases and GIS. Spatial objects embedded in 2Dspace can be of three types: (i) point objects, (ii) line objects, and (iii) region objects. Point objects are 0dimensional spatial objects and only provide positions. Line objects are 1dimensional linear spatial objects that have a length. Region objects are 2dimensional spatial objects with an extent (i.e., both height and width). Each kind of spatial object can be categorized as either a simple spatial object [14] or a complex spatial object [57]. In this thesis we mainly consider complex region objects. The Figure 21 shows the different types of complex spatial objects. A simple region is topologically equivalent to a closed disc; it does not have holes. However, a complex region may have multiple components, call faces and may have multiple holes. One important aspect is that for the reasoning process the spatial objects are only needed as symbolic terms; their geometries are not required. The mathematical basis for formalizing the spatial objects (i.e., both simple and complex) is point set theory and point set topology which assumes that the planar space is comprised of an infinite number of points. 2.1.2 Spatial Relationships There are three kinds of spatial relationships: (i) directional relationships, (ii) topological relationships and (iii) distance relationships. Directional relationships validate the cardinal direction between two spatial objects (e.g., north, southwest). Distance relationships validate the qualitative distance between spatial objects (e.g., far, close). (a) (b) (c) Figure 21. Examples of a (a) complex point object, (b) a complex line object, and (c) a complex region object. X disjoint Y X meet Y X covered by Y X X Y X Y Y X overlap Y X equal Y X inside Y Figure 22. Eight basic topological relationships between Y X X contain Y two simple regions. Our focus is on topological relationships which characterize the relative position of two spatial objects (e.g., overlap, meet). For example, the eight basic topological relationships between two simple regions are shown in the Figure 22 .An important approach for characterizing the topological relationships between spatial objects is known as 9intersection model [8]. By using this model, the authors in [7] have identified the topological relationships between any two complex spatial objects irrespective of their types. Thirty three topological relationships have been found for two complex regions. The following Table 21 shows the number topological relationships possible between every combination of spatial objects. X covers Y Table 21. Number of Topological Predicates Between Two Complex Spatial Objects. Complex Point Complex Line Complex Region Complex Point 5 14 7 Complex Line 14 82 43 Complex Region 7 43 33 2.1.3 Topological Reasoning with Complex Regions As mentioned, reasoning models which can only deal with simple regions are not enough to represent real world scenarios. For example, some biologists who are researching on the Darwin's theory, are looking for a possible evolutionary link between a land species X and an amphibian species Y around the Galapagos islands. The hunting areas of the species X and Y are the regions A and C respectively and the Galapagos islands is the region B. The relationships between the hunting areas of the species X and Y with the Galapagos islands are Rx(A, B) and Ry(B, C) respectively. Having these informations, the biologist may be able to get a possible link between these two species by looking at the relationship Rz(A, C) (i.e., the topological relationship between their hunting areas) through the reasoning process. Now the regions in question are: the Galapagos islands which consists of many islands (i.e., complex region) and the living areas of the species may confined to one island (i.e., simple regions) or may extend to many of these islands (i.e., complex regions) or may have a lake inside it (e.g., region with holes i.e., complex region). Hence, we can see from the example that the regions A, B and C can be all complex regions or any combination of simple and complex regions. Above scenario can easily be extended from three regions to N regions. Therefore, a more generalized and comprehensive reasoning model is required. The first step of the reasoning process is the local inference involving three regions in the form of Rx(A, B) and Ry(B, C). Here, Rx and Ry are the spatial facts between the complex regions A, B and B, C respectively. The goal is to find the relationship Rz(A, C). This local inference is carried out by a process called composition of relation ships by means of a set of inference rules. It is important to note that the composition of relationships does not depend on the extent or the spatial characteristics of the regions in concern. Therefore, the composition of relationships can be denoted as Rx o Ry = Rz. Local inference alone is not enough for inferring relationships between two complex regions. Consider the chain R1(A, B), R2(B, C), R3(C, D), R4(D, E) of topological relationships among the five regions A, B, C, D, and E. In this situation, local inference alone is not sufficient to infer the relationship between A and E. Because an intermediate object is required that is in relationship to both A and E. In this example scenario, such an intermediate region does not exist. Thus, the global inference comes into play which makes use of the composition of relationships to infer relationships between any two regions in the knowledge base. An important observation is that the global inference is orthogonal to the local inference. That is, global inference can employ any algorithm to infer relationships globally as long as the composition of relationships is available. Unsurprisingly, the global inference is a constraint satisfaction problem. A constraint satisfaction problem (CSP) is defined as a triple (X, D, C), where X is a set of variables, D is a domain of values, and C is a set of constraints. Every constraint is in turn a pair (t, R), where t is a tuple of variables and R is a relation. The CSP can be viewed as a directed graph, where the nodes are the variables and the edges between two variables are the relations or the constraints. This directed graph is also called constraint network. In our case, the relations are all binary topological relationships and the variables are spatial objects (i.e., regions); we call this graph representation binary spatial constraint network (BSCN). The class of algorithms for global inferencing by using BSCN is based on a path consistency procedure. A pair of variables is path consistent with a third variable if each consistent evaluation of the pair can be extended to the other variable in such a way that all binary constraints are satisfied. Formally, the variables A and C are path consistent with B if there is a relation R1(A, C) that satisfies the binary constraint between A and C and if there are two relations R2(A, B) and R3(B, C) that satisfy the constraint between A and B and between B and C, respectively. A simple observation tells us that path consistency can be achieved through composition of relationships. The algorithm applies the path consistency procedure over all combinations of nodes in the BSCN until no new relationships can be inferred. An important point is that, given a partially observed knowledge base, the path consistency algorithms derive the complete knowledge, i.e., the relationships between every pair of objects. That is, after running the global inference algorithm the knowledge base becomes complete and it takes 0(1) time to find the relationships) between any pair of the complex regions. 2.2 Related Work Numerous studies have been done on topological relationships as well as topological reasoning. The reasoning process tries to infer the relationships which are defined and derived by the relationship model. Therefore, reasoning models are dependent on the underlying relationships models. Researchers from different domains such as Al, mathematics, GIS and databases, have been contributing to this field of study. The authors of the papers [911] attack this problem with the algebraic logic approaches. The authors of the paper [8] defined spatial objects based on topological set theory and proposed 9Intersection Model as a way to characterize the spatial objects. Based on the topological set theory, the authors proposed the reasoning models about simple regions [1, 1113], simple regions with holes [14, 15]. In [16] the authors propose a reasoning model taking the concavity of the regions into the account along with their convex hulls. Most of the times, the inferred relationship between spatial objects may not be unique, i.e., the inferred relationship can be a disjunction of several basic relationships. Based on this observation, the authors of [17, 18] propose hierarchical models for topological reasoning. All of the above mentioned studies mainly focused on the local inference (i.e., composition of relationships involving three objects by means of inference rules). It is well understood that local inference is an essential and basic step of the reasoning process but without global inference the process is not complete. The reason behind more focus on local inference is because global inference is a constraint satisfaction problem(CSP) [1922] which is an extensively studied topic and is independent of the local inference process. The authors of [10, 23, 24] studied the issues related to constraint satisfaction for spatial objects such as the complexity and the tractability. So far, the lowest complexity O(n3) of CSP algorithms is proposed by the authors in [2022]. All of these CSP algorithms operate on the static knowledge base. That is, given a BSCN, the algorithm runs and able to infer relationships between any pair of complex regions. But over time, the existing facts may change and the CSP algorithms are not designed to handle changes. To best of our knowledge, none of the reasoning models deal with the changes of the spatial facts and our work is motivated by this issue. CHAPTER 3 LOCAL INFERENCE Local inference takes two topological relationships(Rx(A, B) and Ry(B, C)), compose them and infer relationships) Rz(A, C). Since 9intersection matrix can uniquely characterize each topological relationship, the inputs of the local inference can be the two 9intersection matrices and the output is a set of inferred relationships. The Figure 31 shows the three steps of the local inference process. At first step, the corresponding set relationships (i.e., subset relationships, empty/nonempty intersections) between the interiors of the regions are evaluated from the 9intersection matrices. Then the inference rules are being applied to find out the 9intersection predicate values between A and C. At the last step, the inferred relationships are being identified from the predicate values. Set Relationship 9Intersection 91M(A,B) between AO & B Predicates Values Inference between A & C Relationship Inferred RSet Rela p ules Identifying Process Relationship(s) Set Relationship 91M(B,C) between B& C Local Inference Figure 31. Steps of Local Inference. 3.1 Set Relationships between the Interiors According to the point set topology, each spatial object can be characterized by three mutually exclusive point sets in the topological space R2. These sets are the interior (AO), the boundary (OA) and the exterior (A) for any spatial object A (Figure 32b). The 9intersection model uses nine predicates to check the nine intersections of these point sets provided by two spatial objects A and B for nonemptiness. Each topological relationship between any two spatial objects is characterized by a unique combination of nine Boolean values. The 9intersection predicates are arranged in a 9intersection matrix (Figure 33a). faces (component boundary (a) (b) Figure 32. (a) A complex region with its faces and holes, and (b) its interior, boundary, and exterior. On the other hand, the interior, boundary, and exterior of a spatial object are uniquely defined and disjoint from each other [7]. Therefore, according to the regularized definition of complex regions, it is sufficient to specify any of these three sets to uniquely characterize a region object. In this document we consider the interior of a complex region to uniquely characterize it. Hence, for each topological relationships, there is a set relation between the interiors of the two complex regions. That is, either the interior of A is a subset or superset or equal or disjoint or overlaps the interior of B. In [8] the authors showed the way to find out the set relationship between any two components of a region object from the 9intersection matrix by using the topological properties of the spatial regions. We employ that same technique to find out set relation between the interiors of the two participating regions of a topological relationship. A n B 0 AO n 9B 0 A n B 0 __ 0 0 1 B9A n B A n 9B o A n B 1 A n B A n 9B o 0 A n B o 1 (a) (b) (c) Figure 33. (a) 9Intersection Matrix, (b) complex regions A and B meet, (c) Rmeet(A, B). 3.2 Inference Rules From set theory, two nonempty sets X and Y must have one of the following five relations: (i) X is a proper subset of Y, (ii) X is equal to Y, (iii) Y is a proper subset of X, (iv) X and Y have some common and some different elements, and (v) X and Y do not have any common element. The fourth relation, we call it overlap, denotes that two sets have common elements but none of them is the proper subset of the other. We extend these five relations to eight by adding special cases to the relations (i), (iii) and (v) using the spatial properties. Consider X and Y as the interiors of the two regions A and B respectively. Then the relation (i) denotes that the region A is completely inside the region B. There can be two special cases of this scenario and they are: (a) A is inside B and their boundaries touch and (B) A is inside B and their boundaries do not touch. Similarly, these two special cases also hold for relation (iii) and (iv). Let AO and BO denotes the interior sets. The symbols c, A, , and = have their usual meaning. The symbol o denotes the predicate for overlap, i.e., A o BO (AO n BO 0 A A B 0 A BO Ao 0). The predicate for a nonempty intersection, i.e., Ao n BO 0, is denoted by AoB, and the predicate for an empty intersection, i.e., Ao n BO = 0, is denoted by AB. So, the eight relations between the interiors of two region objects are the following: 1. A C Bo A OAOB 2. A c Bo A OAOB 3. AO = Bo 4. AO o B 5. AB A OAOB 6. AB A OAOB 7. BO c Ao A 9AOB 8. B c Ao A iAOB The relations 1 and 2 are two special cases of the original relation (i). Similarly, the relations 5 and 6 as well as the relations 7 and 8 are special cases of the original relations (iii) and (v). Unsurprisingly, these five basic and eight extended relations correspond to the RCC5 and RCC8 [4, 24] respectively. Most importantly, these eight relations hold for any type of region objects (i.e., simple, complex). Because, simple region is nothing but a single component complex region without any hole. On the other hand, since we only consider the interior as a whole which means the interior of a complex region is the union of the interiors of its all faces, it does not matter how many holes and components are in that complex region. Since these eight relations completely characterize the relations between the interiors of two complex regions, any relationship between two complex regions A and B must include exactly one of these relations. Therefore, if we have Rx(A, B) and Ry(B, C) then by the transitivity property, the interiors of A and C must belong to exactly one of the 8 x 8 = 64 configurations of these relations. That is, for each relation between A and B, there are eight possible relations between B and C which gives us 64 configurations. For each of these 64 configurations, we determine the 9intersection predicate values between A and C. As an example, for the configuration AO c B0 A 'A9B and B c Co A i9BOC by applying simple set theory logics we get, AO c B0 A BO c C = A0 c Co = A0 n Co 0. That means for this configuration of A, B and B, C the interiorinterior intersection between A, C is always true. Similarly, for the same configuration we can prove that the interiorexterior intersection between A and C is always false. We know that the three components (i.e., interior, exterior and boundary) of a region object are mutually exclusive (i.e., Co n C = 0). Hence, A c B0 A BO c CO = A c C A (Co n C = 0) = A0 n Co = 0. On the other hand, for the configuration A o B A B o C, we can not say certainly whether the AO n CO is empty or nonempty which means A0 n Co = unknown. We can prove this statement by the two scenarios described in Figure 34 where for this same configuration, we get different interiorinterior intersection values between A and C. (a) (b) Figure 34. The interiors of A and C: (a) intersects, (b) does not intersect. Based on the above observations, for each configuration we can determine the values (i.e., either true or false or unknown) of all 9intersection predicates between A and C. Since, we don't need to determine the exteriorexterior intersection because it is always true. Hence, we define remaining eight of the 9intersection predicates by three sets of rules that specify for which configuration, the predicate is supposed to yield certainly true, certainly false, and unknown. Then by applying some simple propositional logic reduction techniques and set theory notations (e.g., by combining c and = to c), the sets of inference rules for each 9intersection predicates, indexed as P, where 1 < i < 9, are as follows: true A = B A Bo = Co V AOB0 A BO c Co V BOC A Bo c AO V AB A OAOB A BO c Co A ,OBC V P1 : AC= BC A OBOC A BO c A A OAOB false Ao c Bo A BC V AOBO A CO C Bo unknown otherwise P2 : AoC = ( P3 :AC = P4 : OACo= true (C c BO V C o Bo) A Bo C A V Co = Bo A BO c Ao A BA false CO c Bo A BAo V ( CB V B0 C) A Ao C Bo unknown otherwise true Co C Bo A (A C B) V (Co c B V B o C) A Ao = BO V B o Co A (BO c AO v A c Bo) V BCo A AoBo V 0BoCo A aOBOC A A~ABo A OAOB V C c B A ,BBBC A AO c Bo A OAOB V B c Co A OBOC A B C Ao A OAOB false Bo C AO A Co C Bo unknown otherwise true (Ao c Bo V A o Bo) A Bo C C V AO = Bo A BO c C A OBOC false Ao c Bo A BCo V (AoB V Bo C Ao) A Co C Bo unknown otherwise P6 : AC = ( true false A = B A B = C V A = Bo A (Bo c CV Co c Bo v BoCo) A OBOC v B = Co A (Bo c Ao V Ao c B v AB) A OAOB A c B A OABA (BOc C v BoC) v A c Bo A OAB A (BO c Co v BoCo) A OBOBC v C Bo A OBBBCA (B C Ao v AoB) v C c Bo A OBOC A (BO C A V AoB) A OAOB v unknown otherwise true C C Bo A (Ao C Bo) V (Ao c B V A o Bo v (AoB A OAB)) A B = Co V BCo A A c BO V BCo A OBBBC A (AoB V BO c AO) A BOAB V C c B A OBBBC A AO c B A OAOB V B c Co A OBOC A BO c Ao A OAOB false Bo C AO A Co C Bo unknown otherwise A C B A (CoC Bo) V (AO c BO V A o B) A Bo = CO V A0 o Bo A (BO c Co V Co c Bo) V AoBo A BoCo V P7 : AC = < AB A OAB A BC A OBOC V A0 c Bo A OAB A Co c Bo A OBOC V BO c Ao A OAOB A B c C A OBOC false BO C Ao A Co C Bo unknown otherwise true Ao C B A (C C B) V (Ao C Bo V A0 o Bo V (AoB A OAOB)) A Bo = Co V AB A Co C BO V A"Bo A OAOB A (BC V BO c Co) A BBBC V P8 AC = A c Bo A OAB A Co c Bo A BBBC V B C Ao A AB A B c C Co A OBBC false B C AO A Co C Bo unknown otherwise P : A C = true The proof of these rules are done by the simple set theory logic and proof by counterexample and drawing which are shown in the previous paragraph. The proof of all the rules are not given in this document due to space constraints. However, the completeness of this set of rules follows from the formulation of the rules. Two regions must have exactly one of the eight interiorinterior set relations for any true topological relationships and after composing region A and C must hold one of the 64 configurations. Since, the inference rules are formulated considering each configuration into account, these rules never miss any scenario for which it cannot determine the 9intersection predicates. Thus, inference rules are complete by formulation. 3.3 Relationship Identifying Process We evaluate the 9intersection predicates (called evaluated predicates) of the topological relationship to be inferred by applying the inference rules defined in the previous sub section. these evaluated predicates have slightly different characteristics than the usual 9intersection predicates. Because, evaluated predicates may have unknown value where as usual 9intersection predicates always have deterministic values (i.e., either true or false). This slightly different characteristic is obvious. Because, we know that the inferred relationship can be very specific (i.e., a single relationship) or a disjunction of relationships. If the inferred relationship is very specific then all the evaluated predicate values are deterministic. On the other hand, if the inferred relationship is a disjunction of relationships then at least one of the evaluated predicates must have unknown value. In fact, the evaluated predicates have deterministic value only for those predicates which agree for all the relationships in that disjunction. Since we may have indeterministic value, we need one more step to identify the relationships) from the evaluated predicates. A simple brute force approach to find out the inferred relationship is to compare the evaluated matrix against each of the 33 relationship matrices, predicate by predicate. The problem is that it takes too many comparisons. Since the exterior exterior intersection is always true, we have to compare eight of these evaluated predicates for each matching which means 33 x 8 = 264 comparisons are required in the worst case. To reduce the number of comparisons we build a decision tree of these 33 relationships. Table 31 shows all 33 possible relationship matrices [7]. We recursively divide the relationship space based on a predicate value at each level of the Table 31. 33 possible topological relationships between two complex regions. Matrix 1 Matrix 2 Matrix 3 Matrix 4 Matrix 5 Matrix 6 O 0 1 0 0 1 0 0 1 0 0 1 1 0 0 1 0 0 0 0 1 0 1 0 0 1 1 0 1 1 1 0 1 0 0 1 0 1 1 1 1 1 1 01 1 0 1 1 1 Matrix 7 Matrix 8 Matrix 9 Matrix 10 Matrix 11 Matrix 12 1 0 1 0 1 0 0 1 0 0 1 1 0 10 1 1 1 0 0 1 1 0 1 (1 0 I) (1 0 I) (1 1 ) 1 1 1 (0 0 1) (1 0 1) Matrix 14 1 0 1 1 0 1 1 11 Matrix 20 111 0 01 1 11 Matrix 26 111 0 11 1 11 Matrix 32 111 1 1 1 1 11 1 01 Matrix 15 1 0 1 1 1 1 0 Matrix 21 ( 1 1 111 0 10 0 01 Matrix 27 1 1 1 111 1 00 1 11 Matrix 33 111 i 1 1 1 11 111 Matrix 16 1 0 1 1 1 111 010 Matrix 28 0 1 0 Matrix 28 111 1 1 1 1 01 101 Matrix 17 Matrix 18 1 0 1 1 1 1 1 1 1 1 1 0 i/ 1 1 1 Matrix 23 Matrix 24 111 111 0 1 0 0 1 1 F1 1) 1 I1 1 1 1 0 1 Matrix 29 Matrix 30 111 1 11 1 0 1 1 1 0 11 i/ 1 1 0 1 tree until we reach a single relationship. For example, 18 relationships (Matrices 1 to 18 in Table 31) have false as their interiorboundary intersection value. Thus, we divide the relationship space so that the relationships 1 to 18 are on one side and the relationships 19 to 33 are on the other side. Next if we look into the relationships 19 to 33, we find that the relationships 19 to 26 represented by Matrix 19 to 26 has the value false for the boundaryinterior predicate and that the other relationships have the predicate value true. Therefore, we again divide the relationship space where relationship 19 to 26 is on one side and relationships 27 to 33 are on the other side. We continue this process until Matrix 13 1 0 1 0 1 1 S111 Matrix 19 0 01 0 01 Matrix 25 i 1 1 0 11 1 01 Matrix 31 1 10 111 there is only one relationship in a leaf node. At each level, we divide the relationship space into half as close as possible to attain minimum average path length from the root to the leaf nodes. Since, there are 33 relationships a balanced binary tree should have the height [Ig 331 = 6. Our decision tree also has the height six. Though, this tree is not unique but this tree has the minimum average path length. The complete decision tree is shown in Figure 35. Each inner node has two entries. The entry inside a node describes the current relationship space that is being considered, and the entry above the node denotes the predicate that has to be considered to further divide the current relationship space. Figure 35. Decision tree of the relationship space for complex regions. With the help of this tree, we design a recursive algorithm IdentifyRelationship (Figure 36) for identifying the inferred relationship. The inputs of the algorithm are the decision tree (T) and the 9intersection matrix (Mg) which is the evaluated matrix. The output is the inferred relationship (Rt). At each node, starting from the root, the value of the predicate assigned to that node is retrieved from the evaluated matrix and algorithm IdentifyRelationship (1) input: T := (V, E) (2) M9 (3) output: Rt (4) begin (5) Step 1: Start with the root e T (6) Step 2: At each node check the value of the evaluated predicate. (7) Step 2a: If the predicate value is 0, then follow the left subtree. (8) Step 2b: If the value is 1, then follow the right subtree. (9) Step 2c: If the value is unknown, then follow both subtrees. (10) Step 3: Repeat Step 2 until the leaf nodes are reached in all branches. (11) Step 4: If a single leaf is reached (12) then return the corresponding relationship. (13) else return the disjunction of all corresponding relationships. end IdentifyRelationship Figure 36. The algorithm IdentifyRelationship. checked. Depending on the value, we follow either the left, right, or both subtrees. This process recursively follows down to the tree until a leaf node is reached. If all the evaluated predicates have deterministic value (i.e., true or false) then only one leaf node is reached. Otherwise, if any predicate has an indeterministic value (i.e., unknown), more than one leaf node is found. In this case, the inferred relationship is the disjunction of all the corresponding relationships represented by those leaf nodes. The maximum height of this decision tree is 6. Which means if all the evaluated predicates have deterministic values then in the worst case, it would take 6 comparisons instead of 264 comparisons which is a 97% improvement. Since evaluated predicates can have indeterministic values, we may end up searching through the whole tree in the worst case. The required number of comparisons to search through the whole tree is equal to the number of the inner nodes. The decision tree that we show in Figure 35 has 32 inner nodes. Consequently, 32 instead of 264 comparisons are sufficient which is an improvement of 88%. CHAPTER 4 GLOBAL INFERENCE As we have already discussed in subsection 2.1.3 that the well accepted way of carrying out the global inference is by means of the path consistency algorithms. In this chapter we discuss the problem related to constraint satisfaction algorithms in terms of databases with frequent updates. Then, we propose a generalized reasoning algorithm for complex regions. 4.1 Global Inference in Databases with Frequent Updates The first problem of this approach is the high complexity. Since the algorithm generates a complete knowledge base, it is required to run only once at the beginning. Thus, one can argue that the higher running time can be counted as preprocessing time and that it is a one time overhead. This argument holds when the database is static or changes rarely. If the database change is frequent then this running time becomes a big overhead. For example, if a new object is added to the database then the algorithm should run again with this new information. The same argument holds if there is a change in any relationship because that change may cause other relationships to adjust which means the algorithm should run to propagate those updates. In case of the deletion of an object, only the object and the emanating relationships from it have to be deleted. Therefore, the O(n3) overhead is incurred almost every time when there is a change, and this becomes worse when the database is large (i.e., n is large). The second problem arises in order to answer a complex query. For example, there are two regions A and C describing two earthquake affected areas. We want to know if there is any part of state S which was hit by both earthquakes. The answer can be obtained by looking at the topological relationship between the intersection of A and S as well as the intersection of C and S. Let the intersections be denoted by /I and /2 respectively. Our goal is to find the relationship between these two regions. For this purpose, we need to add these two regions as two nodes in the BSCN and run the pathconsistency algorithm. The algorithm gives us not only the relationship between /1 and /2 but also the relationships between /1 and all the other nodes as well as the relationships between /2 and all the other nodes. But we do not need these extra relationships. Hence, the whole procedure becomes quite inefficient. Moreover, /I and /2 are temporary regions only and are thrown out of the BSCN after the query execution. When those temporary regions are thrown out, the BSCN must revert to its previous state. This means we need to save the previous state of the BSCN when any such complex query is being asked. Based on these observations, we can argue that complete knowledge may not be desirable in some cases and path consistency algorithms are not designed to handle database changes. Hence, our goal is to develop a different run time strategy to carry out the global inference. Three scenarios can arise when a query is made to find out the topological relationship between two regions: (i) the relationship is already known which means no reasoning is required, (ii) no relationship is available and there are no intermediate nodes through which we can infer the relationship, and (iii) no relationship is available but there are some intermediate nodes through which we can infer the relationship. In terms of a graph, these three scenarios are equivalent of having (i) a direct edge between the two nodes, (ii) no path between the two nodes, and (iii) at least one path between the nodes respectively. The first scenario is straightforward so that we have only to be concerned about the other two scenarios. It is very important to identify whether it is possible to infer knowledge between two given regions. The reasoning procedure is a costly process. If we could anticipate that the inference of new knowledge between two complex regions is impossible before starting the procedure, it would save us time and resources. But surprisingly the solution is straightforward. Since the BSCN is a graph, a simple path finding algorithm that assumes one of the two regions as the source and the other one as the destination can answer this question. A necessary h f2 Figure 41. A chain of relationships. condition for reasoning is that there is a path between the nodes representing the two regions. Therefore, the first step is to run a path finding algorithm. A path between two target nodes through a set of intermediate nodes corresponds to the chaining example that we described before in the Introduction. Figure 41 describes the scenario where A and E are the target nodes and B, C, and D are the intermediate nodes. The relationships are Ri(A, B), R2(B, C), R3(C, D) and R4(D, E), and our goal is to infer R(A, E). We can solve this long chain of relationships by simplifying it into a series of compositions of relationships involving three nodes. Referring to Figure 41, we first compose R1(A, B) and R2(B, C) to get Rx(A, C). Then we compose Rx(A, C) and R3(C, D) to obtain Ry(A, D). Finally, by composing Ry(A, D) and R4(D, E), we get R(A, E). In the Al domain, this process is known as forward chaining. Intuitively, shortest path algorithms are a good choice for a path finding algorithm because they can give us the path with the minimum number of intermediate nodes; this might ensure a lower processing time. However, let us consider a configuration with two chains (paths). First, we assume that A overlaps B and B overlaps C. Second, we assume that A disjoint D, D contains E, and E contains C (Figure 42). From the first chain the inferred relationship between A and C is the universal relationship, i.e., Figure 42. Multiple chains of relationships. the disjunction of all possible relationships. But from the second chain the inferred relationship between A and C is disjoint. Though both results are correct, the second, longer chain gives us the more specific and thus better answer. A similar example can be shown where the shorter path gives us a more specific and thus better answer. In fact, this shows that there is no relation between the length of the path and the more specific answer. This means that by considering one path, we may not obtain the most specific answer. Hence, we have to consider all possible paths, and the intersections of all inferred relationships obtained through these paths should give us the most specific relationship. The problem is, in the worst case, the number of all simple paths between two nodes in a graph is n! when the graph is complete. Interestingly, this worst case scenario is actually good for the reasoning process because we don't need any inference when the knowledge base is complete. Assuming the BSCN is a sparse graph, an alternative heuristic solution is to consider kshortest simple paths instead of all simple paths. The kshortest path problem is a generalization of the shortest path problem and determines k paths, instead of one, in an increasing order of length. The length is measured as the number of hops from source to destination which means the edges of the BSCN are of unit weight. The worst case complexity for the kshortest simple path algorithm is O(m + n log n + k) [25] where n is the number of nodes and m is the number of edges. If we choose k = n, then the complexity becomes O(n log n) for n log n >= m. Hence for a large database, the number of paths to be considered becomes large (i.e., say k = n = 1000) which is a sufficiently good approximation in a sparse database. 4.2 An Algorithm for Reasoning between Complex Regions algorithm ReasoningBetweenComplexRegion (1) input: G := (V, E) (2) M (3) a,3 e V (4) output: R(a,3) (5) begin (6) if A .l not null then (7) return MI,P (8) k:= 0 (9) repeat (10) pa,, := find the next best path from a to / in G (11) // pa, is a list of nodes e G that starts with a, ends with / and (12) // includes the intermediate nodes (13) for i in intermediate nodes E pa,, (14) S,:=Evaluate the set relations between the interiors of Ma,i, M,,+i (15) Mg:=Evaluate predicates by applying the inference rules(S,) (16) Rt(a, i + 1) := IdentifyRelationship(Mg) (17) endfor (18) R(a, ) := R(a, ) n Rt(a,~ ) (19) k := k + (20) until there are no paths from a to / or k = I V (21) return R(a, 3) end ReasoningBetweenComplexRegion Figure 43. The algorithm ReasoningBetweenComplexRegion. So far, we have described the two basic steps of the reasoning process. In this section, we integrate these steps which give us a generalized conceptual model for reasoning as well as a complete picture of our work. The algorithm is also the starting point of the implementation of this conceptual model. We employ the kshortest simple path algorithm and assume that k is equal to the number of nodes in the BSCN. The inputs of the algorithm ReasoningBetweenComplexRegion (Figure 43) are the BSCN G, a matrix M, which stores the existing relationships, and the two complex regions a and / for which we infer the relationship. The matrix M is indexed by (i,1) which means the topological relationship between the complex objects i and j is stored in the matrix entry Mij. The output of the algorithm is the inferred relationship. There is a simple check (line 7) to find out whether the relationship already exists or not. If the relationship already exists, we simply return this relationship and no reasoning is required. The reasoning procedure has two loops. The outer loop (lines 9 to 20) executes kshortest path algorithm. Each time when we get a new path (i.e., Pa,,), the inner loop (lines 13 to 17) is executed. This inner loop executes the forward chaining process. In this loop, the composition of relationships is performed in three steps. First, the set relations between the interiors of the regions in concern are being evaluated (line 14). Then, the evaluation of the 9intersection predicates by means of the inference rules is performed (line 15) and then the inferred relationship is obtained by passing those evaluated predicates to the relationship identifying process (line 16). In order to find out the most specific result, we take the intersection of all inferred relationships which are obtained through different paths (line 19). The complexity of the inner loop depends on the length of the chain because applying the inference rules and the relationship identifying process requires a constant amount of time. In a graph the maximum path length between any node can be I V1 1. Hence, the time complexity of the inner loop is O(n). Since the complexity of the outer loop is O(n log n), this gives us the total complexity of O(n2 log n). This complexity is lower than the original BSCN pathconsistency algorithm. But the main advantage is that we only need to run this algorithm when a query is fired. Therefore, this approach can save a lot of overhead for large dynamic databases. It also solves the complex query problem because it only computes the relationship of the target objects without modifying any other relationships in the database. 4.3 Simulation and Results The performance of the heuristic depends on the percent of time the heuristic is able to find the most specific relationship between two regions. Since we consider k paths, instead of all paths, between two nodes representing the two regions, it possible that we may miss the path which could give us the most specific relationship. Let assume, the number of paths in a BSCN between any two nodes is E. If k > E, then Performance of the Heuristic 0 0 0 0 0 00 0 60 4n s y sy ( w h p, p ) t t te h c g s us te C0 specific relationship is p k/E since all the edges have equal weights. We generate [:20 10 20 30 40 50 100 150 200 250 300 350 400 500 Sof Nodes Figure 44. Performance of the heuristic for different database sizes. we can surely say (i.e., with probability, p = 1) that the heuristic gives us the most specific result. On the other hand, if k < E then the probability of obtaining the most specific relationship is p = k/E since all the edges have equal weights. We generate a random graph which represents the BSCN. The number of edges of each node is power law distributed between 1 and n, where n is the number of nodes in the graph. The reason is that the edges represents the information available about the nodes. In reality, we have a lot of information for few regions, reasonable amount information for many regions and less information about rest of the regions. This phenomenon is captured by the power law distribution. We run the simulation for different sizes of databases and observe the performance of the heuristic by varying k. At each run, the performance is measured by averaging the p for all possible pairs of nodes. The number of considered paths, k is a constant multiple of the number of nodes, i.e., k = cn to keep the complexity of the kshortest path bounded to O(n log n). The figure 44 shows that the performance of the heuristic decreases with the increase of the database size which is expected. The figure 44 also shows that for a fixed database size, performance increases if we consider more paths, i.e., if we increase the c. For small databases such as 10 < n < 50, the heuristic is able to find the most specific result more than 90% of time which is considered to be good performance by a heuristic. The heuristic performs reasonably well (i.e., above 80%) in case of medium sized databases with 50 < n < 300. As the number of nodes grows beyond 300 nodes, the heuristics does not perform well when c < 10. But we see that significant performance gain can be obtained by considering more paths (e.g., c = 20). Though, increasing c does not hurt the overall complexity as long as n >> c but it slows the algorithm by the factor of c2 log c2/ci log c where c2 > c1. Based on this observation, the value of c can be set by the user based on the size of the database and requirement of the precision. CHAPTER 5 CONCLUSIONS AND FUTURE WORKS From an application point of view, more complex geometric structures than the simple spatial objects are required to represent real world spatial phenomena. It is often the situation that if the database is large and complex, the complete knowledge regarding the participating objects is unavailable. The first contribution of this paper is the design of a complete set of inference rules through which we can infer topological relationship between complex regions. The inference rules are formulated in such a way that it can also be applied to the simple regions. Our second contribution is to define a overall conceptual framework for reasoning process from the database point of view which can handle the typical database issues like updating, adding and deleting information. A main topic for future work is to implement the framework in spatial databases. We plan to apply some algorithmic (e.g., dynamic programming) and Artificial Intelligence (e.g., forward chaining, decision tree) techniques to implement this conceptual reasoning framework. An important topic for future work is to explore other heuristics for global inference such as using different weights for the edges. In this document we consider equal weight for each relationship. But an observation, in case of simple regions, shows that composing any relationship with the overlap relationship always results in a disjunction of relationships. Hence, it is less probable that most specific result can be found if a chain has overlap relationship. We can give higher weight to the edges representing overlap, so that a chain containing overlap is considered later by the kshortest path algorithm. Another important topic for future work is extending the reasoning model to all combinations of complex objects such as lineline and lineregion. REFERENCES [1] M. Egenhofer, A. Frank, J. Jackson, A topological data model for spatial databases, in: 1st Int. Symp. on Large Spatial Databases, 1989, pp. 271286. [2] M. Egenhofer, Spatial SQL: A query and presentation language, IEEE Transactions on Knowledge and Data Engineering 6 (1) (1994) 8695. [3] R. G0ting, Georelational algebra: a model and query language for geometric database systems, in: Int. Workshop on Computational Geometry on Computational Geometry and its Applications, SpringerVerlag New York, Inc., 1988, pp. 9096. [4] Randell, D.A., Z. Cui, A. G. Cohn, A spatial logic based on regions and connection, in: Proceedings 3rd International Conference on Knowledge Representation and Reasoning, 1992. [5] R. G0ting, M. Schneider, Realmbased spatial data types: the ROSE algebra, The VLDB Journal 4 (2) (1995) 243286. [6] M. Schneider, Spatial data types for database systems: finite resolution geometry for geographic information systems, Springer Verlag, 1997. [7] M. Schneider, T. Behr, Topological relationships between complex spatial objects, ACM Transactions on Database Systems 31 (1) (2006) 81. [8] M. Egenhofer, J. Herring, Categorizing binary topological relations between regions, lines, and points in geographic databases, Technical Report, Department of Surveying Engineering, University of Maine, Orono, ME. [9] A. Tarski, On the calculus of relations, The Journal of Symbolic Logic 6 (3) (1941) 7389. [10] R. Maddux, Some algebras and algorithms for reasoning about time and space, Internal paper, Department of Mathematics, Iowa State University, Ames, Iowa. [11] Z. Cui, A. Cohn, D. Randell, Qualitative and Topological Relationships in Spatial Databases, Int. Symposium on Advances in Spatial Databases (1993) 296315. [12] M. Egenhofer, Deriving the composition of binary topological relations, Journal of Visual Languages and Computing 5 (2) (1994) 133149. [13] M. Egenhofer, Reasoning about binary topological relations, in: 2nd Int. Symp. on Advances in Spatial Databases, 1991, pp. 143160. [14] M. Vasardani, M. Egenhofer, Singleholed regions: Their relations and inferences, Geographic Information Science (2008) 337353. [15] M. Vasardani, M. Egenhofer, Comparing Relations with a Multiholed Region, Spatial Information Theory (2009) 159176. [16] A. Abdelmoty, B. EIGeresy, A general method for spatial reasoning in spatial databases, in: 4th Int. Conf. on Information and Knowledge Management, 1995, pp. 312317. [17] M. Grigni, D. Papadias, C. Papadimitriou, Topological inference, in: 14th Int. Joint Conference on Artificial Intelligence, 1995, pp. 901907. [18] V. Haarslev, R. Moller, SBox: A qualitative spatial reasoner's progress report, in: 11th Int. Workshop on Qualitative Reasoning, 1997, pp. 36. [19] R. Dechter, Constraint networks, Encyclopedia of Artificial Intelligence 1 (1992) 276285. [20] A. K. Mackworth, E. C. Freuder, The complexity of some polynomial network consistency algorithms for constraint satisfaction problems, Artificial Intelligence 25 (1) (1985) 6574. [21] A. M. University, A. K. Mackworth, E. C. Freuder, The complexity of constraint satisfaction revisited, Artificial Intelligence 59 (1993) 5762. [22] P. V. Beek, On the minimality and decomposability of constraint networks, in: In Proc. of the 10th National Conference on Artificial Intelligence, 1992, pp. 447452. [23] T. Smith, K. Park, Algebraic approach to spatial reasoning, Int. Journal of Geographical Information Science 6 (3) (1992) 177192. [24] J. Renz, B. Nebel, On the complexity of qualitative spatial reasoning: A maximal tractable fragment of the region connection calculus, Artificial Intelligence 108 (1) (1999) 69123. [25] D. EPPSTEIN, Finding the k shortest paths, SIAM journal on computing 28 (2) (1999) 652673. BIOGRAPHICAL SKETCH Arif is from the city of Tangail, Bangladesh. He did his bachelor's in computer science and engineering from Bangladesh University of Engineering and Technology (BUET) (2006). He worked with GrameenPhone Ltd, the leading telecom company in the country, in Dhaka as a System Engineer in the Research and Development Department for almost two years. He did his master's in computer science from the Computer and Information Science and Engineering Department at the University of Florida (2010). His research interests include Spatial/SpatioTemporal Databases, Spatial Reasoning, Ad hoc Networking and Social Networking. PAGE 1 TOPOLOGICALREASONINGBETWEENCOMPLEXREGIONSINDATABASESWITHFREQUENTUPDATESByMDARIFULHASANKHANATHESISPRESENTEDTOTHEGRADUATESCHOOLOFTHEUNIVERSITYOFFLORIDAINPARTIALFULFILLMENTOFTHEREQUIREMENTSFORTHEDEGREEOFMASTEROFSCIENCEUNIVERSITYOFFLORIDA2010 PAGE 2 c2010MdArifulHasanKhan 2 PAGE 3 Tomyparents 3 PAGE 4 ACKNOWLEDGMENTS Firstofall,IthankDr.MarkusSchneiderforhisinvaluableguidanceandencouragement.Withouthisguidancethisthesiswouldnothavebeenpossible.IamalsogratefultomysupervisorycommitteemembersDr.JonathanLiuandDr.AlinDobrasuggestionsandfeedbacks.Iamextremelyfortunateforhavingsuchalovingandcaringparents.Theirwordsandsupporthavebeenthemainmotivatingfactorallthroughmyeducation. 4 PAGE 5 TABLEOFCONTENTS page ACKNOWLEDGMENTS .................................. 4 LISTOFTABLES ...................................... 6 LISTOFFIGURES ..................................... 7 ABSTRACT ......................................... 8 CHAPTER 1INTRODUCTION ................................... 9 2BACKGROUNDANDRELATEDWORK ...................... 11 2.1Background ................................... 11 2.1.1SpatialObjects ............................. 11 2.1.2SpatialRelationships .......................... 11 2.1.3TopologicalReasoningwithComplexRegions ............ 13 2.2RelatedWork .................................. 15 3LOCALINFERENCE ................................. 17 3.1SetRelationshipsbetweentheInteriors ................... 17 3.2InferenceRules ................................. 19 3.3RelationshipIdentifyingProcess ....................... 25 4GLOBALINFERENCE ................................ 29 4.1GlobalInferenceinDatabaseswithFrequentUpdates ........... 29 4.2AnAlgorithmforReasoningbetweenComplexRegions .......... 33 4.3SimulationandResults ............................ 34 5CONCLUSIONSANDFUTUREWORKS ..................... 37 REFERENCES ....................................... 38 BIOGRAPHICALSKETCH ................................ 40 5 PAGE 6 LISTOFTABLES Table page 21NumberofTopologicalPredicatesBetweenTwoComplexSpatialObjects. ... 13 3133possibletopologicalrelationshipsbetweentwocomplexregions. ...... 26 6 PAGE 7 LISTOFFIGURES Figure page 21Examplesofa(a)complexpointobject,(b)acomplexlineobject,and(c)acomplexregionobject. ................................ 12 22Eightbasictopologicalrelationshipsbetweentwosimpleregions. ........ 12 31StepsofLocalInference. .............................. 17 32(a)Acomplexregionwithitsfacesandholes,and(b)itsinterior,boundary,andexterior. ..................................... 18 33(a)9IntersectionMatrix,(b)complexregionsAandBmeet,(c)Rmeet(A,B). 18 34TheinteriorsofAandC:(a)intersects,(b)doesnotintersect. .......... 21 35Decisiontreeoftherelationshipspaceforcomplexregions. ........... 27 36ThealgorithmIdentifyRelationship. ......................... 28 41Achainofrelationships. ............................... 31 42Multiplechainsofrelationships. ........................... 32 43ThealgorithmReasoningBetweenComplexRegion. ................ 33 44Performanceoftheheuristicfordifferentdatabasesizes. ............ 35 7 PAGE 8 AbstractofThesisPresentedtotheGraduateSchooloftheUniversityofFloridainPartialFulllmentoftheRequirementsfortheDegreeofMasterofScienceTOPOLOGICALREASONINGBETWEENCOMPLEXREGIONSINDATABASESWITHFREQUENTUPDATESByMdArifulHasanKhanAugust2010Chair:MarkusSchneiderMajor:ComputerEngineering ReasoningaboutspacehasbeenaconsiderableeldofstudybothinArticialIntelligenceandinspatialinformationtheory.Manyapplicationsbenetfromtheinferenceofnewknowledgeaboutthespatialrelationshipsbetweenspatialobjectsonthebasisofalreadyavailableandexplicitspatialrelationshipknowledgethatwecallspatial(relationship)facts.Hence,thetaskistoderivenewspatialfactsfromknownspatialfacts.Aconsiderableamountofworkhasfocusedonreasoningabouttopologicalrelationships(asaspecialandimportantsubsetofspatialrelationships)betweensimplespatialobjectslikesimpleregions.ThereisacommonconsensusintheGISandspatialdatabasecommunitiesthatsimpleregionsareinsufcienttomodelspatialrealityandthatcomplexregionobjectsareneededthatallowmultiplecomponentsandholes.Modelsfortopologicalrelationshipsbetweencomplexregionshavealreadybeendeveloped.Hence,asthenextlogicalstep,thegoalofthisthesisistodevelopareasoningmodelforthem.Furthernoreasoningmodelconsiderschangesofthespatialfactbasisstoredinadatabaseinbetweenthequeries.Weshowthatconventionalmodelingsuffersperformancedegradationwhenthedatabaseisfrequentlychanging.Ourmodeldoesnotassumeanygeometricrepresentationmodelordatastructurefortheregions.Themodelisalsobackwardcompatiblewhichmeansthatitisalsoapplicabletosimpleregions. 8 PAGE 9 CHAPTER1INTRODUCTION UnderstandingthetopologicalrelationshipsbetweenobjectsinspacehasbecomeamultidisciplinaryresearchissueinvolvingAI,CAD/CAMsystems,cognitivescience,computervision,imagedatabases,linguistics,robotics,GIS,andspatialdatabases.FromaspatialdatabaseandGISpointofview,topologicalrelationshipsarenecessaryaslterconditionsforspatialselectionsandspatialjoinsaswellasforspatialdataretrievalandanalysis.InspatialdatabasesandGIS,wegenerallydealwithalargenumberofspatialobjects.Hence,itisnotuncommonthatwedonothaveallpossiblerelationshipsavailablebetweeneverypairofspatialobjectsallthetime.Thissituationcanariseeitherduetoalackofinformationorsinceitisimpossibletogetalltherelationships.Todealwiththisproblemofalackofcompleteknowledge,weneedaprocessthroughwhichwecaninferthetopologicalrelationshipbetweentwospatialobjectswheretherelationshipdoesnotcurrentlyexistintheknowledgebase.Thisprocessiscalledreasoning.Hence,reasoningabouttopologicalrelationshipisamethodofinferringnewtopologicalrelationships,call2Dspatialfacts,betweentwospatialobjectsusingtheotherexistingspatialfactsintheknowledgebase.Forexample,giventhreeobjectsA,BandC,andgiventwotopologicalrelationshipsRx(A,B)andRy(B,C),reasoninghelpsustondouttherelationshipRzbetweenAandCwhereRzdoesnotexistintheknowledgebase.Thisprocessisalsocalledthecompositionofrelationshipswhichisthemostcommonmethodofreasoning. Sofar,themainfocusoftheavailablereasoningmodelsistodealwithsimpleregions.Butintherealworldweoftenfacethesituationwherearealobjectscannotberepresentedbysimpleregionsalone.Forexample,ItalycontainstheVaticanasahole,andtheGalapagosislanddoesnotconsistofasingleislandbutratherofacollectionofmanyislands.Thesespatialphenomenacannotberepresentedbysimpleregions.Thesecondproblemisthatthecurrentreasoningmodelshardlytakethechangesofspatial 9 PAGE 10 factsintoaccount.Itisnaturalthatoftentheinformationisadded,deletedorupdatedinthedatabases.Soitisimportanttounderstandaswellastoconsidertheeffectofsuchchangeswhiledesigningareasoningmodel. Themaingoalofthisthesisistodevelopareasoningmodelforcomplexregions.Themainchallengeistodealwithalargenumberofpossibletopologicalrelationshipsbetweentwocomplexregionsaswellastodealwithalargenumberofsuchregions.Oursecondgoalistoderiveasetofinferencerulesbywhichtheinferenceofrelationshipsisperformed.Sincethetypeforsimpleregionsisasubsetofthetypeforcomplexregions,itisalsoourgoalthatthereasoningmodelisabletohandlesimpleregionswithoutrequiringanymodication.Finally,weshowtheeffectofthechangesofspatialfactsonthereasoningprocess,andweproposeanalgorithmtohandlethosechanges. Weproposeageneralizedprocesstoinfernewrelationshipsbetweencomplexregionswhichisnotrestrictedbythenumberofregionsaswellaschangesinthedatabase.Theprocesshastwobasicsteps.Intherststep,weperformthereasoningprocessinvolvingthreeregions,callitLocalInference.Inthesecondstep,weextendthislocalinferencetoNregionsandhencecallitGlobalInference. Theremainderofthethesisisorganizedasfollows:Section 2 discussesbackgroundandrelatedworkregardingreasoningmodels.InSections 3 and 4 ,wedescribethelocalandglobalinferencerespectively.Finally,Section 5 drawssomeconclusionsanddiscussesfuturework. 10 PAGE 11 CHAPTER2BACKGROUNDANDRELATEDWORK 2.1Background Inthissectionwediscussaboutthedifferenttypesofspatialobjectsfollowedbythedifferenttypesofrelationshipsbetweenspatialobjects.Then,Weexplainthebasicstepsofthereasoningprocessandthegeneralalgorithmstoimplementthesesteps. 2.1.1SpatialObjects Inthepast,numerousdatamodelshavebeenproposedwiththeaimofformulatingspatialobjectsindatabasesandGIS.Spatialobjectsembeddedin2Dspacecanbeofthreetypes:(i)pointobjects,(ii)lineobjects,and(iii)regionobjects.Pointobjectsare0dimensionalspatialobjectsandonlyprovidepositions.Lineobjectsare1dimensionallinearspatialobjectsthathavealength.Regionobjectsare2dimensionalspatialobjectswithanextent(i.e.,bothheightandwidth).Eachkindofspatialobjectcanbecategorizedaseitherasimplespatialobject[ 1 4 ]oracomplexspatialobject[ 5 7 ].Inthisthesiswemainlyconsidercomplexregionobjects.TheFigure 21 showsthedifferenttypesofcomplexspatialobjects.Asimpleregionistopologicallyequivalenttoacloseddisc;itdoesnothaveholes.However,acomplexregionmayhavemultiplecomponents,callfacesandmayhavemultipleholes.Oneimportantaspectisthatforthereasoningprocessthespatialobjectsareonlyneededassymbolicterms;theirgeometriesarenotrequired.Themathematicalbasisforformalizingthespatialobjects(i.e.,bothsimpleandcomplex)ispointsettheoryandpointsettopologywhichassumesthattheplanarspaceiscomprisedofaninnitenumberofpoints. 2.1.2SpatialRelationships Therearethreekindsofspatialrelationships:(i)directionalrelationships,(ii)topologicalrelationshipsand(iii)distancerelationships.Directionalrelationshipsvalidatethecardinaldirectionbetweentwospatialobjects(e.g.,north,southwest).Distancerelationshipsvalidatethequalitativedistancebetweenspatialobjects(e.g.,far,close). 11 PAGE 12 Figure21. Examplesofa(a)complexpointobject,(b)acomplexlineobject,and(c)acomplexregionobject. Figure22. Eightbasictopologicalrelationshipsbetweentwosimpleregions. Ourfocusisontopologicalrelationshipswhichcharacterizetherelativepositionoftwospatialobjects(e.g.,overlap,meet).Forexample,theeightbasictopologicalrelationshipsbetweentwosimpleregionsareshownintheFigure 22 .Animportantapproachforcharacterizingthetopologicalrelationshipsbetweenspatialobjectsisknownas9intersectionmodel[ 8 ].Byusingthismodel,theauthorsin[ 7 ]haveidentiedthetopologicalrelationshipsbetweenanytwocomplexspatialobjectsirrespectiveoftheirtypes.Thirtythreetopologicalrelationshipshavebeenfoundfortwocomplexregions.ThefollowingTable 21 showsthenumbertopologicalrelationshipspossiblebetweeneverycombinationofspatialobjects. 12 PAGE 13 Table21. NumberofTopologicalPredicatesBetweenTwoComplexSpatialObjects. ComplexPointComplexLineComplexRegion ComplexPoint 5147 ComplexLine 148243 ComplexRegion 74333 2.1.3TopologicalReasoningwithComplexRegions Asmentioned,reasoningmodelswhichcanonlydealwithsimpleregionsarenotenoughtorepresentrealworldscenarios.Forexample,somebiologistswhoareresearchingontheDarwin'stheory,arelookingforapossibleevolutionarylinkbetweenalandspeciesXandanamphibianspeciesYaroundtheGalapagosislands.ThehuntingareasofthespeciesXandYaretheregionsAandCrespectivelyandtheGalapagosislandsistheregionB.TherelationshipsbetweenthehuntingareasofthespeciesXandYwiththeGalapagosislandsareRx(A,B)andRy(B,C)respectively.Havingtheseinformations,thebiologistmaybeabletogetapossiblelinkbetweenthesetwospeciesbylookingattherelationshipRz(A,C)(i.e.,thetopologicalrelationshipbetweentheirhuntingareas)throughthereasoningprocess.Nowtheregionsinquestionare:theGalapagosislandswhichconsistsofmanyislands(i.e.,complexregion)andthelivingareasofthespeciesmayconnedtooneisland(i.e.,simpleregions)ormayextendtomanyoftheseislands(i.e.,complexregions)ormayhavealakeinsideit(e.g.,regionwithholesi.e.,complexregion).Hence,wecanseefromtheexamplethattheregionsA,BandCcanbeallcomplexregionsoranycombinationofsimpleandcomplexregions.AbovescenariocaneasilybeextendedfromthreeregionstoNregions.Therefore,amoregeneralizedandcomprehensivereasoningmodelisrequired. TherststepofthereasoningprocessisthelocalinferenceinvolvingthreeregionsintheformofRx(A,B)andRy(B,C).Here,RxandRyarethespatialfactsbetweenthecomplexregionsA,BandB,Crespectively.Thegoalistondtherelationship 13 PAGE 14 Rz(A,C).Thislocalinferenceiscarriedoutbyaprocesscalledcompositionofrelationshipsbymeansofasetofinferencerules.Itisimportanttonotethatthecompositionofrelationshipsdoesnotdependontheextentorthespatialcharacteristicsoftheregionsinconcern.Therefore,thecompositionofrelationshipscanbedenotedasRxRy)Rz.Localinferencealoneisnotenoughforinferringrelationshipsbetweentwocomplexregions.ConsiderthechainR1(A,B),R2(B,C),R3(C,D),R4(D,E)oftopologicalrelationshipsamongtheveregionsA,B,C,D,andE.Inthissituation,localinferencealoneisnotsufcienttoinfertherelationshipbetweenAandE.BecauseanintermediateobjectisrequiredthatisinrelationshiptobothAandE.Inthisexamplescenario,suchanintermediateregiondoesnotexist.Thus,theglobalinferencecomesintoplaywhichmakesuseofthecompositionofrelationshipstoinferrelationshipsbetweenanytworegionsintheknowledgebase. Animportantobservationisthattheglobalinferenceisorthogonaltothelocalinference.Thatis,globalinferencecanemployanyalgorithmtoinferrelationshipsgloballyaslongasthecompositionofrelationshipsisavailable.Unsurprisingly,theglobalinferenceisaconstraintsatisfactionproblem.Aconstraintsatisfactionproblem(CSP)isdenedasatriple(X,D,C),whereXisasetofvariables,Disadomainofvalues,andCisasetofconstraints.Everyconstraintisinturnapair(t,R),wheretisatupleofvariablesandRisarelation.TheCSPcanbeviewedasadirectedgraph,wherethenodesarethevariablesandtheedgesbetweentwovariablesaretherelationsortheconstraints.Thisdirectedgraphisalsocalledconstraintnetwork.Inourcase,therelationsareallbinarytopologicalrelationshipsandthevariablesarespatialobjects(i.e.,regions);wecallthisgraphrepresentationbinaryspatialconstraintnetwork(BSCN).TheclassofalgorithmsforglobalinferencingbyusingBSCNisbasedonapathconsistencyprocedure.Apairofvariablesispathconsistentwithathirdvariableifeachconsistentevaluationofthepaircanbeextendedtotheothervariableinsuchawaythatallbinaryconstraintsaresatised.Formally,thevariablesAandCare 14 PAGE 15 pathconsistentwithBifthereisarelationR1(A,C)thatsatisesthebinaryconstraintbetweenAandCandiftherearetworelationsR2(A,B)andR3(B,C)thatsatisfytheconstraintbetweenAandBandbetweenBandC,respectively.Asimpleobservationtellsusthatpathconsistencycanbeachievedthroughcompositionofrelationships.ThealgorithmappliesthepathconsistencyprocedureoverallcombinationsofnodesintheBSCNuntilnonewrelationshipscanbeinferred.Animportantpointisthat,givenapartiallyobservedknowledgebase,thepathconsistencyalgorithmsderivethecompleteknowledge,i.e.,therelationshipsbetweeneverypairofobjects.Thatis,afterrunningtheglobalinferencealgorithmtheknowledgebasebecomescompleteandittakesO(1)timetondtherelationship(s)betweenanypairofthecomplexregions. 2.2RelatedWork Numerousstudieshavebeendoneontopologicalrelationshipsaswellastopologicalreasoning.Thereasoningprocesstriestoinfertherelationshipswhicharedenedandderivedbytherelationshipmodel.Therefore,reasoningmodelsaredependentontheunderlyingrelationshipsmodels.ResearchersfromdifferentdomainssuchasAI,mathematics,GISanddatabases,havebeencontributingtothiseldofstudy.Theauthorsofthepapers[ 9 11 ]attackthisproblemwiththealgebraiclogicapproaches.Theauthorsofthepaper[ 8 ]denedspatialobjectsbasedontopologicalsettheoryandproposed9IntersectionModelasawaytocharacterizethespatialobjects.Basedonthetopologicalsettheory,theauthorsproposedthereasoningmodelsaboutsimpleregions[ 1 11 13 ],simpleregionswithholes[ 14 15 ].In[ 16 ]theauthorsproposeareasoningmodeltakingtheconcavityoftheregionsintotheaccountalongwiththeirconvexhulls.Mostofthetimes,theinferredrelationshipbetweenspatialobjectsmaynotbeunique,i.e.,theinferredrelationshipcanbeadisjunctionofseveralbasicrelationships.Basedonthisobservation,theauthorsof[ 17 18 ]proposehierarchicalmodelsfortopologicalreasoning. 15 PAGE 16 Alloftheabovementionedstudiesmainlyfocusedonthelocalinference(i.e.,compositionofrelationshipsinvolvingthreeobjectsbymeansofinferencerules).Itiswellunderstoodthatlocalinferenceisanessentialandbasicstepofthereasoningprocessbutwithoutglobalinferencetheprocessisnotcomplete.Thereasonbehindmorefocusonlocalinferenceisbecauseglobalinferenceisaconstraintsatisfactionproblem(CSP)[ 19 22 ]whichisanextensivelystudiedtopicandisindependentofthelocalinferenceprocess.Theauthorsof[ 10 23 24 ]studiedtheissuesrelatedtoconstraintsatisfactionforspatialobjectssuchasthecomplexityandthetractability.Sofar,thelowestcomplexityO(n3)ofCSPalgorithmsisproposedbytheauthorsin[ 20 22 ].AlloftheseCSPalgorithmsoperateonthestaticknowledgebase.Thatis,givenaBSCN,thealgorithmrunsandabletoinferrelationshipsbetweenanypairofcomplexregions.Butovertime,theexistingfactsmaychangeandtheCSPalgorithmsarenotdesignedtohandlechanges.Tobestofourknowledge,noneofthereasoningmodelsdealwiththechangesofthespatialfactsandourworkismotivatedbythisissue. 16 PAGE 17 CHAPTER3LOCALINFERENCE Localinferencetakestwotopologicalrelationships(Rx(A,B)andRy(B,C)),composethemandinferrelationship(s)RZ(A,C).Since9intersectionmatrixcanuniquelycharacterizeeachtopologicalrelationship,theinputsofthelocalinferencecanbethetwo9intersectionmatricesandtheoutputisasetofinferredrelationships.TheFigure 31 showsthethreestepsofthelocalinferenceprocess.Atrststep,thecorrespondingsetrelationships(i.e.,subsetrelationships,empty/nonemptyintersections)betweentheinteriorsoftheregionsareevaluatedfromthe9intersectionmatrices.Thentheinferencerulesarebeingappliedtondoutthe9intersectionpredicatevaluesbetweenAandC.Atthelaststep,theinferredrelationshipsarebeingidentiedfromthepredicatevalues. Figure31. StepsofLocalInference. 3.1SetRelationshipsbetweentheInteriors Accordingtothepointsettopology,eachspatialobjectcanbecharacterizedbythreemutuallyexclusivepointsetsinthetopologicalspaceR2.Thesesetsaretheinterior(Ao),theboundary(@A)andtheexterior(A)]TJ /F1 11.955 Tf 7.09 4.34 Td[()foranyspatialobjectA(Figure 32 b).The9intersectionmodelusesninepredicatestocheckthenineintersectionsofthesepointsetsprovidedbytwospatialobjectsAandBfornonemptiness.EachtopologicalrelationshipbetweenanytwospatialobjectsischaracterizedbyauniquecombinationofnineBooleanvalues.The9intersectionpredicatesarearrangedina9intersectionmatrix(Figure 33 a). 17 PAGE 18 Figure32. (a)Acomplexregionwithitsfacesandholes,and(b)itsinterior,boundary,andexterior. Ontheotherhand,theinterior,boundary,andexteriorofaspatialobjectareuniquelydenedanddisjointfromeachother[ 7 ].Therefore,accordingtotheregularizeddenitionofcomplexregions,itissufcienttospecifyanyofthesethreesetstouniquelycharacterizearegionobject.Inthisdocumentweconsidertheinteriorofacomplexregiontouniquelycharacterizeit.Hence,foreachtopologicalrelationships,thereisasetrelationbetweentheinteriorsofthetwocomplexregions.Thatis,eithertheinteriorofAisasubsetorsupersetorequalordisjointoroverlapstheinteriorofB.In[ 8 ]theauthorsshowedthewaytondoutthesetrelationshipbetweenanytwocomponentsofaregionobjectfromthe9intersectionmatrixbyusingthetopologicalpropertiesofthespatialregions.Weemploythatsametechniquetondoutsetrelationbetweentheinteriorsofthetwoparticipatingregionsofatopologicalrelationship. 0@Ao\Bo6=?Ao\@B6=?Ao\B)]TJ /F2 11.955 Tf 10.41 4.34 Td[(6=?@A\Bo6=?@A\@B6=?@A\B)]TJ /F2 11.955 Tf 10.4 4.34 Td[(6=?A)]TJ /F2 11.955 Tf 9.74 4.33 Td[(\Bo6=?A)]TJ /F2 11.955 Tf 9.74 4.33 Td[(\@B6=?A)]TJ /F2 11.955 Tf 9.75 4.33 Td[(\B)]TJ /F2 11.955 Tf 10.4 4.33 Td[(6=?1A 0@0010111111A(a)(b)(c) Figure33. (a)9IntersectionMatrix,(b)complexregionsAandBmeet,(c)Rmeet(A,B). 18 PAGE 19 3.2InferenceRules Fromsettheory,twononemptysetsXandYmusthaveoneofthefollowingverelations:(i)XisapropersubsetofY,(ii)XisequaltoY,(iii)YisapropersubsetofX,(iv)XandYhavesomecommonandsomedifferentelements,and(v)XandYdonothaveanycommonelement.Thefourthrelation,wecallitoverlap,denotesthattwosetshavecommonelementsbutnoneofthemisthepropersubsetoftheother.Weextendtheseverelationstoeightbyaddingspecialcasestotherelations(i),(iii)and(v)usingthespatialproperties.ConsiderXandYastheinteriorsofthetworegionsAandBrespectively.Thentherelation(i)denotesthattheregionAiscompletelyinsidetheregionB.Therecanbetwospecialcasesofthisscenarioandtheyare:(a)AisinsideBandtheirboundariestouchand(B)AisinsideBandtheirboundariesdonottouch.Similarly,thesetwospecialcasesalsoholdforrelation(iii)and(iv). LetAandBdenotestheinteriorsets.Thesymbols,^,:,and=havetheirusualmeaning.Thesymboldenotesthepredicateforoverlap,i.e.,AB,(A\B6=?^A)]TJ /F3 11.955 Tf 12.83 0 Td[(B6=?^B)]TJ /F3 11.955 Tf 12.83 0 Td[(A6=?).Thepredicateforanonemptyintersection,i.e.,A\B6=?,isdenotedbyAB,andthepredicateforanemptyintersection,i.e.,A\B=?,isdenotedby:AB.So,theeightrelationsbetweentheinteriorsoftworegionobjectsarethefollowing: 1. .AB^:@A@B 2. .AB^@A@B 3. .A=B 4. .AB 5. .:AB^@A@B 6. .:AB^:@A@B 7. .BA^@A@B 8. .BA^:@A@B 19 PAGE 20 Therelations1and2aretwospecialcasesoftheoriginalrelation(i).Similarly,therelations5and6aswellastherelations7and8arespecialcasesoftheoriginalrelations(iii)and(v).Unsurprisingly,thesevebasicandeightextendedrelationscorrespondtotheRCC5andRCC8[ 4 24 ]respectively.Mostimportantly,theseeightrelationsholdforanytypeofregionobjects(i.e.,simple,complex).Because,simpleregionisnothingbutasinglecomponentcomplexregionwithoutanyhole.Ontheotherhand,sinceweonlyconsidertheinteriorasawholewhichmeanstheinteriorofacomplexregionistheunionoftheinteriorsofitsallfaces,itdoesnotmatterhowmanyholesandcomponentsareinthatcomplexregion.Sincetheseeightrelationscompletelycharacterizetherelationsbetweentheinteriorsoftwocomplexregions,anyrelationshipbetweentwocomplexregionsAandBmustincludeexactlyoneoftheserelations.Therefore,ifwehaveRx(A,B)andRy(B,C)thenbythetransitivityproperty,theinteriorsofAandCmustbelongtoexactlyoneofthe88=64congurationsoftheserelations.Thatis,foreachrelationbetweenAandB,thereareeightpossiblerelationsbetweenBandCwhichgivesus64congurations. Foreachofthese64congurations,wedeterminethe9intersectionpredicatevaluesbetweenAandC.Asanexample,forthecongurationAB^:@A@BandBC^:@B@Cbyapplyingsimplesettheorylogicsweget,AB^BC)AC)A\C6=?.ThatmeansforthiscongurationofA,BandB,CtheinteriorinteriorintersectionbetweenA,Cisalwaystrue.Similarly,forthesamecongurationwecanprovethattheinteriorexteriorintersectionbetweenAandCisalwaysfalse.Weknowthatthethreecomponents(i.e.,interior,exteriorandboundary)ofaregionobjectaremutuallyexclusive(i.e.,C\C)]TJ /F5 11.955 Tf 13.4 4.34 Td[(=?).Hence,AB^BC)AC^(C\C)]TJ /F5 11.955 Tf 10.6 4.34 Td[(=?))A\C=?.Ontheotherhand,forthecongurationAB^BC,wecannotsaycertainlywhethertheA\CisemptyornonemptywhichmeansA\C=unknown.Wecanprovethisstatementbythetwo 20 PAGE 21 scenariosdescribedinFigure 34 whereforthissameconguration,wegetdifferentinteriorinteriorintersectionvaluesbetweenAandC. Figure34. TheinteriorsofAandC:(a)intersects,(b)doesnotintersect. Basedontheaboveobservations,foreachcongurationwecandeterminethevalues(i.e.,eithertrueorfalseorunknown)ofall9intersectionpredicatesbetweenAandC.Since,wedon'tneedtodeterminetheexteriorexteriorintersectionbecauseitisalwaystrue.Hence,wedeneremainingeightofthe9intersectionpredicatesbythreesetsofrulesthatspecifyforwhichconguration,thepredicateissupposedtoyieldcertainlytrue,certainlyfalse,andunknown.Thenbyapplyingsomesimplepropositionallogicreductiontechniquesandsettheorynotations(e.g.,bycombiningand=to),thesetsofinferencerulesforeach9intersectionpredicates,indexedasPiwhere1i9,areasfollows: P1:AC=8>>>>>>>>>>>>>>>>>>>>>>>>>><>>>>>>>>>>>>>>>>>>>>>>>>>>:trueAo=Bo^Bo=Co_AoBo^BoCo_BoCo^BoAo_:AoBo^@A@B^BC^:@B@C_:BoCo^@B@C^BA^:@A@BfalseAB^:BC_:AB^CBunknownotherwise 21 PAGE 22 P2:A@C=8>>>>>>>>>>>>>><>>>>>>>>>>>>>>:true(CB_CB)^BA_C=B^BA^:@B@AfalseCB^:BA_(:CB_BC)^ABunknownotherwise P3:AC)]TJ /F5 11.955 Tf 10.41 4.34 Td[(=8>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>:trueCB^:(AB)_(CB_BC)^A=B_BC^(BA_AB)_:BC^AB_:BC^:@B@C^:AB^@A@B_CB^:@B@C^AB^@A@B_BC^@B@C^BA^:@A@BfalseBoAo^CBunknownotherwise P4:@AC=8>>>>>>>>>>>>>><>>>>>>>>>>>>>>:true(AB_AB)^BC_A=B^BC^:@B@CfalseAB^:BC_(:AB_BA)^CBunknownotherwise 22 PAGE 23 P5:@A@C=8>>>>>>>>>>>>>>>>>>>>>>>>>><>>>>>>>>>>>>>>>>>>>>>>>>>>:trueA=B^B=C_A=B^(BC_CB_:BC)^@B@C_B=C^(BA_AB_:AB)^@A@BfalseAoBo^:@A@B^(BC_:BoCo)_AoBo^@A@B^(BC_:BoCo)^:@B@C_CoBo^:@B@C^(BA_:AoBo)_CoBo^@B@C^(BA_:AoBo)^:@A@B_unknownotherwise P6:@AC)]TJ /F5 11.955 Tf 10.41 4.34 Td[(=8>>>>>>>>>>>>>>>>>>>>>>>>>><>>>>>>>>>>>>>>>>>>>>>>>>>>:trueCB^:(AB)_(AB_AB_(:AB^:@A@B))^B=C_:BC^AB_:BC^:@B@C^(:AB_BA)^@A@B_CB^:@B@C^AB^@A@B_BC^@B@C^BA^:@A@BfalseBoAo^CBunknownotherwise 23 PAGE 24 P7:A)]TJ /F3 11.955 Tf 7.08 4.34 Td[(C=8>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>:trueAB^:(CB)_(AB_AB)^B=C_AB^(BC_CB)_:AB^BC_:AB^:@A@B^:BC^@B@C_AB^:@A@B^CB^@B@C_BA^@A@B^BC^:@B@CfalseBoAo^CBunknownotherwise P8:A)]TJ /F10 11.955 Tf 7.08 4.34 Td[(@C=8>>>>>>>>>>>>>>>>>>>>>>>>>><>>>>>>>>>>>>>>>>>>>>>>>>>>:trueAB^:(CB)_(AB_AB_(:AB^:@A@B))^B=C_:AB^CB_:AB^:@A@B^(:BC_BC)^@B@C_AB^:@A@B^CB^@B@C_BA^@A@B^BC^:@B@CfalseBoAo^CBunknownotherwise P9:A)]TJ /F3 11.955 Tf 7.08 4.33 Td[(C)]TJ /F5 11.955 Tf 10.4 4.33 Td[(=true Theproofoftheserulesaredonebythesimplesettheorylogicandproofbycounterexampleanddrawingwhichareshowninthepreviousparagraph.Theproofofalltherulesarenotgiveninthisdocumentduetospaceconstraints.However,thecompletenessofthissetofrulesfollowsfromtheformulationoftherules.Tworegionsmusthaveexactlyoneoftheeightinteriorinteriorsetrelationsforany 24 PAGE 25 topologicalrelationshipsandaftercomposingregionAandCmustholdoneofthe64congurations.Since,theinferencerulesareformulatedconsideringeachcongurationintoaccount,theserulesnevermissanyscenarioforwhichitcannotdeterminethe9intersectionpredicates.Thus,inferencerulesarecompletebyformulation. 3.3RelationshipIdentifyingProcess Weevaluatethe9intersectionpredicates(calledevaluatedpredicates)ofthetopologicalrelationshiptobeinferredbyapplyingtheinferencerulesdenedintheprevioussubsection.theseevaluatedpredicateshaveslightlydifferentcharacteristicsthantheusual9intersectionpredicates.Because,evaluatedpredicatesmayhaveunknownvaluewhereasusual9intersectionpredicatesalwayshavedeterministicvalues(i.e.,eithertrueorfalse).Thisslightlydifferentcharacteristicisobvious.Because,weknowthattheinferredrelationshipcanbeveryspecic(i.e.,asinglerelationship)oradisjunctionofrelationships.Iftheinferredrelationshipisveryspecicthenalltheevaluatedpredicatevaluesaredeterministic.Ontheotherhand,iftheinferredrelationshipisadisjunctionofrelationshipsthenatleastoneoftheevaluatedpredicatesmusthaveunknownvalue.Infact,theevaluatedpredicateshavedeterministicvalueonlyforthosepredicateswhichagreeforalltherelationshipsinthatdisjunction.Sincewemayhaveindeterministicvalue,weneedonemoresteptoidentifytherelationship(s)fromtheevaluatedpredicates. Asimplebruteforceapproachtondouttheinferredrelationshipistocomparetheevaluatedmatrixagainsteachofthe33relationshipmatrices,predicatebypredicate.Theproblemisthatittakestoomanycomparisons.Sincetheexteriorexteriorintersectionisalwaystrue,wehavetocompareeightoftheseevaluatedpredicatesforeachmatchingwhichmeans338=264comparisonsarerequiredintheworstcase.Toreducethenumberofcomparisonswebuildadecisiontreeofthese33relationships.Table 31 showsall33possiblerelationshipmatrices[ 7 ].Werecursivelydividetherelationshipspacebasedonapredicatevalueateachlevelofthe 25 PAGE 26 Table31. 33possibletopologicalrelationshipsbetweentwocomplexregions. Matrix1 0@0010011111A Matrix2 0@0010101111A Matrix3 0@0010111011A Matrix4 0@0010111111A Matrix5 0@1000100011A Matrix6 0@1000101111A Matrix7 0@1001001111A Matrix8 0@1001101011A Matrix9 0@1001101111A Matrix10 0@1010101111A Matrix11 0@1010110011A Matrix12 0@1010111011A Matrix13 0@1010111111A Matrix14 0@1011011111A Matrix15 0@1011101011A Matrix16 0@1011101111A Matrix17 0@1011111011A Matrix18 0@1011111111A Matrix19 0@1110010011A Matrix20 0@1110011111A Matrix21 0@1110100011A Matrix22 0@1110101011A Matrix23 0@1110101111A Matrix24 0@1110110011A Matrix25 0@1110111011A Matrix26 0@1110111111A Matrix27 0@1111001111A Matrix28 0@1111011011A Matrix29 0@1111011111A Matrix30 0@1111101011A Matrix31 0@1111101111A Matrix32 0@1111111011A Matrix33 0@1111111111A treeuntilwereachasinglerelationship.Forexample,18relationships(Matrices1to18inTable 31 )havefalseastheirinteriorboundaryintersectionvalue.Thus,wedividetherelationshipspacesothattherelationships1to18areononesideandtherelationships19to33areontheotherside.Nextifwelookintotherelationships19to33,wendthattherelationships19to26representedbyMatrix19to26hasthevaluefalsefortheboundaryinteriorpredicateandthattheotherrelationshipshavethepredicatevaluetrue.Therefore,weagaindividetherelationshipspacewhererelationship19to26isononesideandrelationships27to33areontheotherside.Wecontinuethisprocessuntil 26 PAGE 27 thereisonlyonerelationshipinaleafnode.Ateachlevel,wedividetherelationshipspaceintohalfascloseaspossibletoattainminimumaveragepathlengthfromtheroottotheleafnodes.Since,thereare33relationshipsabalancedbinarytreeshouldhavetheheightdlg33e=6.Ourdecisiontreealsohastheheightsix.Though,thistreeisnotuniquebutthistreehastheminimumaveragepathlength.ThecompletedecisiontreeisshowninFigure 35 .Eachinnernodehastwoentries.Theentryinsideanodedescribesthecurrentrelationshipspacethatisbeingconsidered,andtheentryabovethenodedenotesthepredicatethathastobeconsideredtofurtherdividethecurrentrelationshipspace. Figure35. Decisiontreeoftherelationshipspaceforcomplexregions. Withthehelpofthistree,wedesignarecursivealgorithmIdentifyRelationship(Figure 36 )foridentifyingtheinferredrelationship.Theinputsofthealgorithmarethedecisiontree(T)andthe9intersectionmatrix(M9)whichistheevaluatedmatrix.Theoutputistheinferredrelationship(Rt).Ateachnode,startingfromtheroot,thevalueofthepredicateassignedtothatnodeisretrievedfromtheevaluatedmatrixand 27 PAGE 28 algorithmIdentifyRelationship(1) input:T:=(V,E)(2) M9(3) output:Rt(4) begin(5) Step1:Startwiththeroot2T(6) Step2:Ateachnodecheckthevalueoftheevaluatedpredicate.(7) Step2a:Ifthepredicatevalueis0,thenfollowtheleftsubtree.(8) Step2b:Ifthevalueis1,thenfollowtherightsubtree.(9) Step2c:Ifthevalueisunknown,thenfollowbothsubtrees.(10) Step3:RepeatStep2untiltheleafnodesarereachedinallbranches.(11) Step4:Ifasingleleafisreached(12) thenreturnthecorrespondingrelationship.(13) elsereturnthedisjunctionofallcorrespondingrelationships. endIdentifyRelationship Figure36. ThealgorithmIdentifyRelationship. checked.Dependingonthevalue,wefolloweithertheleft,right,orbothsubtrees.Thisprocessrecursivelyfollowsdowntothetreeuntilaleafnodeisreached.Ifalltheevaluatedpredicateshavedeterministicvalue(i.e.,trueorfalse)thenonlyoneleafnodeisreached.Otherwise,ifanypredicatehasanindeterministicvalue(i.e.,unknown),morethanoneleafnodeisfound.Inthiscase,theinferredrelationshipisthedisjunctionofallthecorrespondingrelationshipsrepresentedbythoseleafnodes.Themaximumheightofthisdecisiontreeis6.Whichmeansifalltheevaluatedpredicateshavedeterministicvaluesthenintheworstcase,itwouldtake6comparisonsinsteadof264comparisonswhichisa97%improvement.Sinceevaluatedpredicatescanhaveindeterministicvalues,wemayendupsearchingthroughthewholetreeintheworstcase.Therequirednumberofcomparisonstosearchthroughthewholetreeisequaltothenumberoftheinnernodes.ThedecisiontreethatweshowinFigure 35 has32innernodes.Consequently,32insteadof264comparisonsaresufcientwhichisanimprovementof88%. 28 PAGE 29 CHAPTER4GLOBALINFERENCE Aswehavealreadydiscussedinsubsection 2.1.3 thatthewellacceptedwayofcarryingouttheglobalinferenceisbymeansofthepathconsistencyalgorithms.Inthischapterwediscusstheproblemrelatedtoconstraintsatisfactionalgorithmsintermsofdatabaseswithfrequentupdates.Then,weproposeageneralizedreasoningalgorithmforcomplexregions. 4.1GlobalInferenceinDatabaseswithFrequentUpdates Therstproblemofthisapproachisthehighcomplexity.Sincethealgorithmgeneratesacompleteknowledgebase,itisrequiredtorunonlyonceatthebeginning.Thus,onecanarguethatthehigherrunningtimecanbecountedaspreprocessingtimeandthatitisaonetimeoverhead.Thisargumentholdswhenthedatabaseisstaticorchangesrarely.Ifthedatabasechangeisfrequentthenthisrunningtimebecomesabigoverhead.Forexample,ifanewobjectisaddedtothedatabasethenthealgorithmshouldrunagainwiththisnewinformation.Thesameargumentholdsifthereisachangeinanyrelationshipbecausethatchangemaycauseotherrelationshipstoadjustwhichmeansthealgorithmshouldruntopropagatethoseupdates.Incaseofthedeletionofanobject,onlytheobjectandtheemanatingrelationshipsfromithavetobedeleted.Therefore,theO(n3)overheadisincurredalmosteverytimewhenthereisachange,andthisbecomesworsewhenthedatabaseislarge(i.e.,nislarge). Thesecondproblemarisesinordertoansweracomplexquery.Forexample,therearetworegionsAandCdescribingtwoearthquakeaffectedareas.WewanttoknowifthereisanypartofstateSwhichwashitbybothearthquakes.TheanswercanbeobtainedbylookingatthetopologicalrelationshipbetweentheintersectionofAandSaswellastheintersectionofCandS.LettheintersectionsbedenotedbyI1andI2respectively.Ourgoalistondtherelationshipbetweenthesetworegions.Forthispurpose,weneedtoaddthesetworegionsastwonodesintheBSCNand 29 PAGE 30 runthepathconsistencyalgorithm.ThealgorithmgivesusnotonlytherelationshipbetweenI1andI2butalsotherelationshipsbetweenI1andalltheothernodesaswellastherelationshipsbetweenI2andalltheothernodes.Butwedonotneedtheseextrarelationships.Hence,thewholeprocedurebecomesquiteinefcient.Moreover,I1andI2aretemporaryregionsonlyandarethrownoutoftheBSCNafterthequeryexecution.Whenthosetemporaryregionsarethrownout,theBSCNmustreverttoitspreviousstate.ThismeansweneedtosavethepreviousstateoftheBSCNwhenanysuchcomplexqueryisbeingasked.Basedontheseobservations,wecanarguethatcompleteknowledgemaynotbedesirableinsomecasesandpathconsistencyalgorithmsarenotdesignedtohandledatabasechanges.Hence,ourgoalistodevelopadifferentruntimestrategytocarryouttheglobalinference. Threescenarioscanarisewhenaqueryismadetondoutthetopologicalrelationshipbetweentworegions:(i)therelationshipisalreadyknownwhichmeansnoreasoningisrequired,(ii)norelationshipisavailableandtherearenointermediatenodesthroughwhichwecaninfertherelationship,and(iii)norelationshipisavailablebuttherearesomeintermediatenodesthroughwhichwecaninfertherelationship.Intermsofagraph,thesethreescenariosareequivalentofhaving(i)adirectedgebetweenthetwonodes,(ii)nopathbetweenthetwonodes,and(iii)atleastonepathbetweenthenodesrespectively.Therstscenarioisstraightforwardsothatwehaveonlytobeconcernedabouttheothertwoscenarios.Itisveryimportanttoidentifywhetheritispossibletoinferknowledgebetweentwogivenregions.Thereasoningprocedureisacostlyprocess.Ifwecouldanticipatethattheinferenceofnewknowledgebetweentwocomplexregionsisimpossiblebeforestartingtheprocedure,itwouldsaveustimeandresources.Butsurprisinglythesolutionisstraightforward.SincetheBSCNisagraph,asimplepathndingalgorithmthatassumesoneofthetworegionsasthesourceandtheotheroneasthedestinationcananswerthisquestion.Anecessary 30 PAGE 31 h Figure41. Achainofrelationships. conditionforreasoningisthatthereisapathbetweenthenodesrepresentingthetworegions. Therefore,therststepistorunapathndingalgorithm.ApathbetweentwotargetnodesthroughasetofintermediatenodescorrespondstothechainingexamplethatwedescribedbeforeintheIntroduction.Figure 41 describesthescenariowhereAandEarethetargetnodesandB,C,andDaretheintermediatenodes.TherelationshipsareR1(A,B),R2(B,C),R3(C,D)andR4(D,E),andourgoalistoinferR(A,E).Wecansolvethislongchainofrelationshipsbysimplifyingitintoaseriesofcompositionsofrelationshipsinvolvingthreenodes.ReferringtoFigure 41 ,werstcomposeR1(A,B)andR2(B,C)togetRx(A,C).ThenwecomposeRx(A,C)andR3(C,D)toobtainRy(A,D).Finally,bycomposingRy(A,D)andR4(D,E),wegetR(A,E).IntheAIdomain,thisprocessisknownasforwardchaining. Intuitively,shortestpathalgorithmsareagoodchoiceforapathndingalgorithmbecausetheycangiveusthepathwiththeminimumnumberofintermediatenodes;thismightensurealowerprocessingtime.However,letusconsideracongurationwithtwochains(paths).First,weassumethatAoverlapsBandBoverlapsC.Second,weassumethatAdisjointD,DcontainsE,andEcontainsC(Figure 42 ).FromtherstchaintheinferredrelationshipbetweenAandCistheuniversalrelationship,i.e., 31 PAGE 32 Figure42. Multiplechainsofrelationships. thedisjunctionofallpossiblerelationships.ButfromthesecondchaintheinferredrelationshipbetweenAandCisdisjoint.Thoughbothresultsarecorrect,thesecond,longerchaingivesusthemorespecicandthusbetteranswer.Asimilarexamplecanbeshownwheretheshorterpathgivesusamorespecicandthusbetteranswer.Infact,thisshowsthatthereisnorelationbetweenthelengthofthepathandthemorespecicanswer.Thismeansthatbyconsideringonepath,wemaynotobtainthemostspecicanswer.Hence,wehavetoconsiderallpossiblepaths,andtheintersectionsofallinferredrelationshipsobtainedthroughthesepathsshouldgiveusthemostspecicrelationship.Theproblemis,intheworstcase,thenumberofallsimplepathsbetweentwonodesinagraphisn!whenthegraphiscomplete.Interestingly,thisworstcasescenarioisactuallygoodforthereasoningprocessbecausewedon'tneedanyinferencewhentheknowledgebaseiscomplete.AssumingtheBSCNisasparsegraph,analternativeheuristicsolutionistoconsiderkshortestsimplepathsinsteadofallsimplepaths.Thekshortestpathproblemisageneralizationoftheshortestpathproblemanddetermineskpaths,insteadofone,inanincreasingorderoflength.ThelengthismeasuredasthenumberofhopsfromsourcetodestinationwhichmeanstheedgesoftheBSCNareofunitweight.TheworstcasecomplexityforthekshortestsimplepathalgorithmisO(m+nlogn+k)[ 25 ]wherenisthenumberofnodesandmisthenumberofedges.Ifwechoosek=n,thenthecomplexitybecomesO(nlogn)fornlogn>=m.Henceforalargedatabase,thenumberofpathstobeconsideredbecomeslarge(i.e.,sayk=n=1000)whichisasufcientlygoodapproximationinasparsedatabase. 32 PAGE 33 4.2AnAlgorithmforReasoningbetweenComplexRegions algorithmReasoningBetweenComplexRegion(1) input:G:=(V,E)(2) M(3) ,2V(4) output:R(,)(5) begin(6) ifM,notnullthen(7) returnM,(8) k:=0(9) repeat(10) p,:=ndthenextbestpathfromtoinG(11) //p,isalistofnodes2Gthatstartswith,endswithand(12) //includestheintermediatenodes(13) foriinintermediatenodes2p,(14) Si:=EvaluatethesetrelationsbetweentheinteriorsofM,i,Mi,i+1(15) M9:=Evaluatepredicatesbyapplyingtheinferencerules(Si)(16) Rt(,i+1):=IdentifyRelationship(M9)(17) endfor(18) R(,):=R(,)\Rt(,)(19) k:=k+1(20) untiltherearenopathsfromtoork=jVj(21) returnR(,) endReasoningBetweenComplexRegion Figure43. ThealgorithmReasoningBetweenComplexRegion. Sofar,wehavedescribedthetwobasicstepsofthereasoningprocess.Inthissection,weintegratethesestepswhichgiveusageneralizedconceptualmodelforreasoningaswellasacompletepictureofourwork.Thealgorithmisalsothestartingpointoftheimplementationofthisconceptualmodel.WeemploythekshortestsimplepathalgorithmandassumethatkisequaltothenumberofnodesintheBSCN.TheinputsofthealgorithmReasoningBetweenComplexRegion(Figure 43 )aretheBSCNG,amatrixM,whichstorestheexistingrelationships,andthetwocomplexregionsandforwhichweinfertherelationship.ThematrixMisindexedby(i,j)whichmeansthetopologicalrelationshipbetweenthecomplexobjectsiandjisstoredinthematrixentryMi,j.Theoutputofthealgorithmistheinferredrelationship.Thereisasimple 33 PAGE 34 check(line7)tondoutwhethertherelationshipalreadyexistsornot.Iftherelationshipalreadyexists,wesimplyreturnthisrelationshipandnoreasoningisrequired.Thereasoningprocedurehastwoloops.Theouterloop(lines9to20)executeskshortestpathalgorithm.Eachtimewhenwegetanewpath(i.e.,P,),theinnerloop(lines13to17)isexecuted.Thisinnerloopexecutestheforwardchainingprocess.Inthisloop,thecompositionofrelationshipsisperformedinthreesteps.First,thesetrelationsbetweentheinteriorsoftheregionsinconcernarebeingevaluated(line14).Then,theevaluationofthe9intersectionpredicatesbymeansoftheinferencerulesisperformed(line15)andthentheinferredrelationshipisobtainedbypassingthoseevaluatedpredicatestotherelationshipidentifyingprocess(line16).Inordertondoutthemostspecicresult,wetaketheintersectionofallinferredrelationshipswhichareobtainedthroughdifferentpaths(line19).Thecomplexityoftheinnerloopdependsonthelengthofthechainbecauseapplyingtheinferencerulesandtherelationshipidentifyingprocessrequiresaconstantamountoftime.InagraphthemaximumpathlengthbetweenanynodecanbejVj)]TJ /F5 11.955 Tf 17.22 0 Td[(1.Hence,thetimecomplexityoftheinnerloopisO(n).SincethecomplexityoftheouterloopisO(nlogn),thisgivesusthetotalcomplexityofO(n2logn).ThiscomplexityislowerthantheoriginalBSCNpathconsistencyalgorithm.Butthemainadvantageisthatweonlyneedtorunthisalgorithmwhenaqueryisred.Therefore,thisapproachcansavealotofoverheadforlargedynamicdatabases.Italsosolvesthecomplexqueryproblembecauseitonlycomputestherelationshipofthetargetobjectswithoutmodifyinganyotherrelationshipsinthedatabase. 4.3SimulationandResults Theperformanceoftheheuristicdependsonthepercentoftimetheheuristicisabletondthemostspecicrelationshipbetweentworegions.Sinceweconsiderkpaths,insteadofallpaths,betweentwonodesrepresentingthetworegions,itpossiblethatwemaymissthepathwhichcouldgiveusthemostspecicrelationship.Letassume,thenumberofpathsinaBSCNbetweenanytwonodesisE.IfkE,then 34 PAGE 35 Figure44. Performanceoftheheuristicfordifferentdatabasesizes. wecansurelysay(i.e.,withprobability,p=1)thattheheuristicgivesusthemostspecicresult.Ontheotherhand,ifk PAGE 36 whichisexpected.Thegure 44 alsoshowsthatforaxeddatabasesize,performanceincreasesifweconsidermorepaths,i.e.,ifweincreasethec.Forsmalldatabasessuchas10n50,theheuristicisabletondthemostspecicresultmorethan90%oftimewhichisconsideredtobegoodperformancebyaheuristic.Theheuristicperformsreasonablywell(i.e.,above80%)incaseofmediumsizeddatabaseswith50n300.Asthenumberofnodesgrowsbeyond300nodes,theheuristicsdoesnotperformwellwhenc10.Butweseethatsignicantperformancegaincanbeobtainedbyconsideringmorepaths(e.g.,c=20).Though,increasingcdoesnothurttheoverallcomplexityaslongasn>>cbutitslowsthealgorithmbythefactorofc2logc2=c1logc1wherec2>c1.Basedonthisobservation,thevalueofccanbesetbytheuserbasedonthesizeofthedatabaseandrequirementoftheprecision. 36 PAGE 37 CHAPTER5CONCLUSIONSANDFUTUREWORKS Fromanapplicationpointofview,morecomplexgeometricstructuresthanthesimplespatialobjectsarerequiredtorepresentrealworldspatialphenomena.Itisoftenthesituationthatifthedatabaseislargeandcomplex,thecompleteknowledgeregardingtheparticipatingobjectsisunavailable.Therstcontributionofthispaperisthedesignofacompletesetofinferencerulesthroughwhichwecaninfertopologicalrelationshipbetweencomplexregions.Theinferencerulesareformulatedinsuchawaythatitcanalsobeappliedtothesimpleregions.Oursecondcontributionistodeneaoverallconceptualframeworkforreasoningprocessfromthedatabasepointofviewwhichcanhandlethetypicaldatabaseissueslikeupdating,addinganddeletinginformation. Amaintopicforfutureworkistoimplementtheframeworkinspatialdatabases.Weplantoapplysomealgorithmic(e.g.,dynamicprogramming)andArticialIntelligence(e.g.,forwardchaining,decisiontree)techniquestoimplementthisconceptualreasoningframework.Animportanttopicforfutureworkistoexploreotherheuristicsforglobalinferencesuchasusingdifferentweightsfortheedges.Inthisdocumentweconsiderequalweightforeachrelationship.Butanobservation,incaseofsimpleregions,showsthatcomposinganyrelationshipwiththeoverlaprelationshipalwaysresultsinadisjunctionofrelationships.Hence,itislessprobablethatmostspecicresultcanbefoundifachainhasoverlaprelationship.Wecangivehigherweighttotheedgesrepresentingoverlap,sothatachaincontainingoverlapisconsideredlaterbythekshortestpathalgorithm.Anotherimportanttopicforfutureworkisextendingthereasoningmodeltoallcombinationsofcomplexobjectssuchaslinelineandlineregion. 37 PAGE 38 REFERENCES [1] M.Egenhofer,A.Frank,J.Jackson,Atopologicaldatamodelforspatialdatabases,in:1stInt.Symp.onLargeSpatialDatabases,1989,pp.271. [2] M.Egenhofer,SpatialSQL:Aqueryandpresentationlanguage,IEEETransactionsonKnowledgeandDataEngineering6(1)(1994)86. [3] R.Guting,Georelationalalgebra:amodelandquerylanguageforgeometricdatabasesystems,in:Int.WorkshoponComputationalGeometryonComputationalGeometryanditsApplications,SpringerVerlagNewYork,Inc.,1988,pp.90. [4] Randell,D.A.,Z.Cui,A.G.Cohn,Aspatiallogicbasedonregionsandconnection,in:Proceedings3rdInternationalConferenceonKnowledgeRepresentationandReasoning,1992. [5] R.Guting,M.Schneider,Realmbasedspatialdatatypes:theROSEalgebra,TheVLDBJournal4(2)(1995)243. [6] M.Schneider,Spatialdatatypesfordatabasesystems:niteresolutiongeometryforgeographicinformationsystems,SpringerVerlag,1997. [7] M.Schneider,T.Behr,Topologicalrelationshipsbetweencomplexspatialobjects,ACMTransactionsonDatabaseSystems31(1)(2006)81. [8] M.Egenhofer,J.Herring,Categorizingbinarytopologicalrelationsbetweenregions,lines,andpointsingeographicdatabases,TechnicalReport,DepartmentofSurveyingEngineering,UniversityofMaine,Orono,ME. [9] A.Tarski,Onthecalculusofrelations,TheJournalofSymbolicLogic6(3)(1941)73. [10] R.Maddux,Somealgebrasandalgorithmsforreasoningabouttimeandspace,Internalpaper,DepartmentofMathematics,IowaStateUniversity,Ames,Iowa. [11] Z.Cui,A.Cohn,D.Randell,QualitativeandTopologicalRelationshipsinSpatialDatabases,Int.SymposiumonAdvancesinSpatialDatabases(1993)296. [12] M.Egenhofer,Derivingthecompositionofbinarytopologicalrelations,JournalofVisualLanguagesandComputing5(2)(1994)133. [13] M.Egenhofer,Reasoningaboutbinarytopologicalrelations,in:2ndInt.Symp.onAdvancesinSpatialDatabases,1991,pp.143. [14] M.Vasardani,M.Egenhofer,Singleholedregions:Theirrelationsandinferences,GeographicInformationScience(2008)337. [15] M.Vasardani,M.Egenhofer,ComparingRelationswithaMultiholedRegion,SpatialInformationTheory(2009)159. 38 PAGE 39 [16] A.Abdelmoty,B.ElGeresy,Ageneralmethodforspatialreasoninginspatialdatabases,in:4thInt.Conf.onInformationandKnowledgeManagement,1995,pp.312. [17] M.Grigni,D.Papadias,C.Papadimitriou,Topologicalinference,in:14thInt.JointConferenceonArticialIntelligence,1995,pp.901. [18] V.Haarslev,R.Moller,SBox:Aqualitativespatialreasoner'sprogressreport,in:11thInt.WorkshoponQualitativeReasoning,1997,pp.3. [19] R.Dechter,Constraintnetworks,EncyclopediaofArticialIntelligence1(1992)276. [20] A.K.Mackworth,E.C.Freuder,Thecomplexityofsomepolynomialnetworkconsistencyalgorithmsforconstraintsatisfactionproblems,ArticialIntelligence25(1)(1985)65. [21] A.M.University,A.K.Mackworth,E.C.Freuder,Thecomplexityofconstraintsatisfactionrevisited,ArticialIntelligence59(1993)57. [22] P.V.Beek,Ontheminimalityanddecomposabilityofconstraintnetworks,in:InProc.ofthe10thNationalConferenceonArticialIntelligence,1992,pp.447. [23] T.Smith,K.Park,Algebraicapproachtospatialreasoning,Int.JournalofGeographicalInformationScience6(3)(1992)177. [24] J.Renz,B.Nebel,Onthecomplexityofqualitativespatialreasoning:Amaximaltractablefragmentoftheregionconnectioncalculus,ArticialIntelligence108(1)(1999)69. [25] D.EPPSTEIN,Findingthekshortestpaths,SIAMjournaloncomputing28(2)(1999)652. 39 PAGE 40 BIOGRAPHICALSKETCH ArifisfromthecityofTangail,Bangladesh.Hedidhisbachelor'sincomputerscienceandengineeringfromBangladeshUniversityofEngineeringandTechnology(BUET)(2006).HeworkedwithGrameenPhoneLtd,theleadingtelecomcompanyinthecountry,inDhakaasaSystemEngineerintheResearchandDevelopmentDepartmentforalmosttwoyears.Hedidhismaster'sincomputersciencefromtheComputerandInformationScienceandEngineeringDepartmentattheUniversityofFlorida(2010).HisresearchinterestsincludeSpatial/SpatioTemporalDatabases,SpatialReasoning,AdhocNetworkingandSocialNetworking. 40 