Computing Label-Constraint Reachability in Graph Databases

Computing Label-Constraint Reachability in Graph Databases

COMPUTING LABEL-CONSTRAINT REACHABILITY IN GRAPH DATABASES A thesis submitted to Kent State University in partial fulfillment of the requirements for the degree of Master of Science by Hui Hong May 2012 Thesis written by Hui Hong B.S., Wuhan University, 2006 M.S., Wuhan University, 2008 M.S., Kent State University, 2012 Approved by Dr. Ruoming Jin , Advisor Dr. Javed I. Khan , Chair, Department of Computer Science Dr. Timothy Moerland , Dean, College of Arts and Sciences ii TABLE OF CONTENTS LISTOFFIGURES..................................... v LISTOFTABLES ..................................... vi Acknowledgements ................................... vii Dedication......................................... ix 1 Introduction ...................................... 1 1.1 OurContributions................................. 3 2 ProblemStatement .................................. 5 2.1 OnlineDFS/BFSSearch ............................. 7 2.2 Generalized Transitive Closure . ..... 8 3 ATree-basedIndexFramework. 12 4 Optimal Index Construction . 18 4.1 Directed Maximal Spanning Tree for Generalized Transitive Closure Compres- sion ........................................ 18 4.2 Scalable Index Construction . 23 5 FastQueryProcessing............................... 34 5.1 Searching Non-Empty Entry of NT . 35 iii 5.2 Computing In-Tree Path-Labels . 37 5.3 LCRQueryProcessing .............................. 38 6 Experiments....................................... 41 6.1 SetuponSyntheticDatasets. 41 6.2 ResultsonSyntheticDatasets. 43 6.3 ResultsonRealDatasets ............................. 49 7 Conclusion........................................ 51 BIBLIOGRAPHY...................................... 52 iv LIST OF FIGURES 1 RunningExample................................. 6 2 (0, 9) Path-Label ................................. 6 3 Spanning Tree and Non-Tree Edges ......................... 14 4 Partial Transitive Closure (NT) (S. for Source and T. for Target) ........... 15 5 Weighted Graph .................................. 21 6 Interval Labeling for Spanning Tree ......................... 36 7 Coordinates in 4-dimensions ............................ 37 8 Expr1.a: Density E / V from 1.5 to 5; ....................... 46 | | | | 9 Expr1.b: A / Σ from 0.15 to 0.85, when V = 5000; ............... 46 | | | | | | 10 Expr1.c: V from 20000 to 100000, when Density E / V = 1.5; .......... 47 | | | | | | 11 Expr1.d: A / Σ from 0.15 to 0.85, when V = 5000 for SF graphs; ........ 47 | | | | | | 12 Expr1.e: V from 20000 to 100000 for SF graphs; ................. 48 | | 13 Varying A in Yeast ................................ 49 | | 14 Varying A in Yago ................................. 50 | | v LIST OF TABLES 1 I-S(Index Size in KB), C-T(Construction Time in s), O-W(Optimal Weight), S-W(Sampling Weight), S-S(Sampling-Size) . ..... 43 2 Expr1.c: V from 20000 to 100000, when Density E / V = 1.5; I-S(Index | | | | | | Size in KB), C-T(Construction Time in s), S-S(Sampling-Size) . 45 vi Acknowledgements First of all, I really want to sincerely thank my advisor, Dr. Ruoming Jin, during three years’ study. I’m very lucky that Dr. Jin has advised me throughout my thesis with his great kindness and rich knowledge. I mean he has devoted himself into supporting and guiding me to reach the goal one step by one step. I will never forget we discuss over the academic problem with full focus, and Dr. Jin even helped me code and debug the program after mid- night and fixed it in the end. My advisor, Dr. Jin, also treated his students as very close friends. Sometimes he invited me to enjoy the most delicious food together and release the pressure, for better studying. I learned a lot from my advisor, like how to discover, formalize, analyze, code and solve the interesting problem, and also how to sell the idea and communicate with people. Without Dr. Jin’s engagement and encouragement, I can never finish my thesis and get my Master’s degree. Without Dr. Jin’s suggestion and help, I can never start my career path after graduation. I also want to thank Professor Hassan Peyravi and Professor Ye Zhao. Both of them have given valuable suggestion over the modification of my thesis. Thanks very much for taking time to review the draft so carefully. The administration staff in Computer Science Department gave me a lot resources and information regarding my graduation. I want to offer Marcy Curtiss with my deep gratitude for she has been with me during every phase of graduation. Without her full patience and help, I can never get my thesis ready and submit it on time. All the friends in the KDDB lab has shown their enthusiasm accross my project. Ning Ruan vii helped me check the format very carefully. Finally I want to say thank you to my friend, Wenzhu Zhou, and thanks for staying together, as well as facing and solving different problems. viii Your dedication here. The thesis is dedicated to my Parents. They have supported me financially and mentally and deserve everything I can get for them. ix CHAPTER 1 Introduction Our world today is generating huge amounts of graph data such as social networks, biolog- ical networks, and the semantic web. How to manage these large graphs in a database system has become an important research issue in the database research community. One of the most fundamental research problems is the reachability query, which asks if one vertex can reach another or not. This is a seemingly simple but very difficult problem due to the sheer size of these large graphs. In recent years, a number of algorithms have been proposed to handle graph reachability queries [1, 2, 3, 4]. However, many real-world graphs are edge-labeled graphs, i.e., edges are associated with labels to denote different types of relationships between vertices. The reachability query for labeled graphs often involves constraints on the path connecting two vertices. Here, we list several such applications: Social Networks: In a social network, each person is represented as a vertex and two per- sons are linked by an edge if they are related. The relationships between two persons are represented through different types of labels. For instance, such relationships may include parent-of, brother-of, sister-of, friend-of, employee-of, etc. Many queries in social networks seek to discover how one person A relates to another person B. These queries in general can be written as if there is a path from A to B where the labels of all edges in the path are either of a specific type or belong to a specified set of labels. For instance, if we want to know whether 1 2 A is a remote relative of B, then we ask if there is a path from A to B where each edge label along the path is one of parent-of, brother-of, sister-of. Bioinformatics: Understanding how metabolic chain reactions take place in cellular systems is one of the most fundamental questions in system biology. To answer these questions, biol- ogists utilize so-called metabolic networks, where each vertex represents a compound, and a directed edge between two compounds indicates that one compound can be transformed into another one through a certain chemical reaction. The edge label records the enzymes which control the reaction. One of the basic questions is whether there is a certain pathway between two compounds which can be active or not under certain conditions. The condition can be described as the availability of a set of enzymes. Here, again, our problem can be described as a reachability query with certain constraints on the labels of the edges along the path. To summarize, these queries ask the following question: Can vertex u reach vertex v through a path whose edge labels must satisfy certain constraints? Typically, the constraint is membership: the path’s edge labels must be in the set of constraint labels. Alternatively, we can ask for a path which avoids any of these labels. These two forms are equivalent. We note that this type of query can also find applications in recommendation search in viral market- ing [5] and reachability computation in RDF graphs, such as Wikipedia and YAGO [6]. The constraint reachability problem is much more complicated than the traditional reach- ability query which does not consider any constraints. Existing work on graph reachability typically constructs a compact index of the graph’s transitive closure matrix. The transitive closure can be used to answer the Yes/No question of reachability, but it cannot tell how the connection is made between any two vertices. Since the index does not include the label- ing information, it cannot be expanded easily to answer our aforementioned label-constraint 3 reachability query. The constraint reachability problem is closely related to the simple path query and the reg- ular expression path query for XML documents and graphs. Typically, these queries describe the desired path as a regular expression and then search the graph to see if such a path exists or not. An XPath query is a simple iteration of alternating axes (/ and //) and tags (or labels), and it can be generalized by using regular expressions to describe the paths between two or a sequence of vertices [7]. We can look at our constraint reachability query as a special case of the regular simple path query. However, the general problem of finding regular simple paths has proven to be NP-complete [8]. The existing methods to handle such queries are based on equivalence classes and refinement to build compact indices and then match the path expres- sion over such indices [9, 10]. On the other hand, a linear algorithm exists for the constraint reachability problem. Thus, the existing work on querying XML and graphs cannot handle our constraint reachability query effciently. 1.1 Our Contributions In this work, we provide a detailed study of the constraint reachability problem and offer an efficient solution. We begin by investigating two simple solutions, representing two extremes in the spectrum of solutions: an online search (DFS/BFS) approach uses the least amount of memory but has high computational cost for query answering, while the precomputation of all pair-wise path information answers the query efficiently, but uses a large amount of memory.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    62 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us