query enumeration and nowhere dense graphs
play

Query enumeration and nowhere dense graphs Alexandre Vigny - PowerPoint PPT Presentation

Introduction Query enumeration Nowhere dense Algorithms Whats next ? Conclusion Query enumeration and nowhere dense graphs Alexandre Vigny February 15, 2019 Introduction Query enumeration Nowhere dense Algorithms Whats next ?


  1. Introduction Query enumeration Nowhere dense Algorithms What’s next ? Conclusion Query enumeration and nowhere dense graphs Alexandre Vigny February 15, 2019

  2. Introduction Query enumeration Nowhere dense Algorithms What’s next ? Conclusion Outline Introduction Databases and queries Beyond query evaluation Query enumeration Definition Examples Existing results On nowhere dense graphs Definition and examples Splitter game The algorithms Results and tools Examples What’s next ? Conclusion

  3. Introduction Query enumeration Nowhere dense Algorithms What’s next ? Conclusion Outline Introduction Databases and queries Beyond query evaluation Query enumeration Definition Examples Existing results On nowhere dense graphs Definition and examples Splitter game The algorithms Results and tools Examples What’s next ? Conclusion

  4. Introduction Query enumeration Nowhere dense Algorithms What’s next ? Conclusion Databases and Queries Input: • Database D (contains informations) • Query q (asks a question) Goal: Compute q ( D )

  5. Introduction Query enumeration Nowhere dense Algorithms What’s next ? Conclusion Formalization part 1: Databases as relational structures � � Schema : σ : = P (1) , R (2) , S (3) A relational structure D : R S P Paris France Alexandre Bourg-la-Reine Poland France Bourg-la-Reine France Sophie Bourg-la-Reine Meudon Poland Warsaw Poland Tim Bourg-la-Reine Bourg-la-Reine Germany Meudon France Jack Warsaw Paris Italy Rome Italy Julie Paris Paris

  6. Introduction Query enumeration Nowhere dense Algorithms What’s next ? Conclusion Formalization part 2: Queries written in first-order logic What are all of the countries? q ( x ) : = P ( x ) Is there someone who works and lives in the same city? q () : = ∃ x ∃ y S ( x , y , y ) What are the pairs of cities that are in the same country? q ( x , y ) : = ∃ z R ( x , z ) ∧ R ( y , z ) Who are the people who do not work where they live? q ( x ) : = ∃ y ∃ z S ( x , y , z ) ∧ y �= z Which cities satisfy: everybody who lives there works there too? q ( x ) : = ∀ y ∀ z S ( y , x , z ) = ⇒ z = x

  7. Introduction Query enumeration Nowhere dense Algorithms What’s next ? Conclusion Formalization part 3: Databases as graphs 1 2 3 4 5 6 7 8 P France Poland Italy France Poland Italy Paris Meudon Warsaw Rome Jack R Paris France Meudon France P ( x ) becomes ∃ w , Blue ( w ) ∧ B ( x , w ) Warsaw Poland R ( x , y ) becomes ∃ w , Red ( w ) ∧ B ( x , w ) ∧ G ( y , w ) Rome Italy S ( x , y , z ) becomes ∃ w , Purple ( w ) ∧ B ( x , w ) ∧ G ( y , w ) ∧ V ( z , w ) S ∃ x ··· becomes ∃ x , Orange ( x ) ∧··· Jack Warsaw Paris ∀ x ··· becomes ∀ x , Orange ( x ) = ⇒ ···

  8. Introduction Query enumeration Nowhere dense Algorithms What’s next ? Conclusion Computing the whole set of solutions? In general: Database: � D � the size of the database. Query: k the arity of the query. Up to � D � k solutions! Solutions: Practical problem: A set of 50 10 solutions is not easy to store / display! Theoretical problem: The time needed to compute the answer does not reflect the hardness of the problem. Can we do anything else instead?

  9. Introduction Query enumeration Nowhere dense Algorithms What’s next ? Conclusion Inspiration from real world Flight Warsaw-Paris

  10. Introduction Query enumeration Nowhere dense Algorithms What’s next ? Conclusion Inspiration from real world Flight Warsaw-Paris around 200.000 results in 0,5 seconds > Here is a first solution > Here is a second one > > > Next !

  11. Introduction Query enumeration Nowhere dense Algorithms What’s next ? Conclusion Other problems Is this true ? Model-Checking : Input: Goal: Ideally: D , q Yes or NO? D | = q ? O ( � D � ) Testing : Is this tuple a solution ? How many solutions ? Counting : Enumerate the solutions Enumeration :

  12. Introduction Query enumeration Nowhere dense Algorithms What’s next ? Conclusion Other problems Is this true ? Model-Checking : Testing : Is this tuple a solution ? Input: Goal: Ideally: D , q , a Test whether a ∈ q ( D ). O (1) ◦ O ( � D � ) How many solutions ? Counting : Enumerate the solutions Enumeration :

  13. Introduction Query enumeration Nowhere dense Algorithms What’s next ? Conclusion Other problems Is this true ? Model-Checking : Testing : Is this tuple a solution ? Counting : How many solutions ? Input: Goal: Ideally: � � D , q Compute � q ( D ) O ( � D � ) � Enumerate the solutions Enumeration :

  14. Introduction Query enumeration Nowhere dense Algorithms What’s next ? Conclusion Other problems Model-Checking : Is this true ? Testing : Is this tuple a solution ? Counting : How many solutions ? Enumerate the solutions Enumeration : Input: Goal : Ideally: Compute 1 st sol, 2 nd sol, ... D , q O (1) ◦ O ( � D � )

  15. Introduction Query enumeration Nowhere dense Algorithms What’s next ? Conclusion Comparing the problems For FO queries over a class C of databases. Ideal running time Model-Checking : Is this true ? O ( n ) Enumeration : Enumerate the solutions O (1) ◦ O ( n ) Evaluation : Compute the entire set O ( n + m ) Counting : How many solutions ? O ( n ) Testing : Is this tuple a solution ? O (1) ◦ O ( n ) Testing Enumeration Counting O (1) ◦ O ( n ) O (1) ◦ O ( n ) O ( n ) Evaluation O ( n + m ) Model-Checking O ( n )

  16. Introduction Query enumeration Nowhere dense Algorithms What’s next ? Conclusion Outline Introduction Databases and queries Beyond query evaluation Query enumeration Definition Examples Existing results On nowhere dense graphs Definition and examples Splitter game The algorithms Results and tools Examples What’s next ? Conclusion

  17. Introduction Query enumeration Nowhere dense Algorithms What’s next ? Conclusion Query enumeration Input : � D � : = n & | q | : = k (computation with RAM) Goal : output solutions one by one (no repetition) STEP 1: Preprocessing Prepare the enumeration : Database D − → Index I Preprocessing time : f ( k ) · n ❀ O ( n ) STEP 2 : Enumeration The enumerate : Index I − → x 1 , x 2 , x 3 , x 4 , ··· Delay : O ( f ( k )) ❀ O (1) Constant delay enumeration after linear preprocessing O (1) ◦ O ( n )

  18. Introduction Query enumeration Nowhere dense Algorithms What’s next ? Conclusion Properties of efficient enumeration algorithms Mandatory: → First solution computed in time O � � . � D � � � � � → Last solution computed in time O � D �+ � q ( D ) . � → No repetition! Optional: → Enumeration in lexicographical order. → Use a constant amount of memory.

  19. Introduction Query enumeration Nowhere dense Algorithms What’s next ? Conclusion Example 1 → Database D : = 〈 { 1 , ··· , n } ; E 〉 � D � = | E | → Query q 1 ( x , y ) : = E ( x , y ) E (1,1) (1,2) (1,6) . . . (4,5) (4,7) (4,8) . . . (n,n)

  20. Introduction Query enumeration Nowhere dense Algorithms What’s next ? Conclusion Example 1 → Database D : = 〈 { 1 , ··· , n } ; E 〉 � D � = | E | → Query q 1 ( x , y ) : = E ( x , y ) E For the enumeration problem (1,1) Preprocessing: nothing (1,2) Enumeration: read the list. (1,6) For the counting problem . . . Computation: go through the list (4,5) Answering: output the result. (4,7) For the testing problem (4,8) Harder than it looks! . . . Dichotomous research? O (log( � D � )). (n,n)

  21. Introduction Query enumeration Nowhere dense Algorithms What’s next ? Conclusion Example 2 → Database D : = 〈 { 1 , ··· , n } ; E 〉 � D � = | E | → Query q 2 ( x , y ) : = ¬ E ( x , y ) E (1,1) (1,2) (1,6) . . . (2,3) . . . (i,j) (i,j+1) (i,j+3) . . . (n,n)

  22. Introduction Query enumeration Nowhere dense Algorithms What’s next ? Conclusion Example 2 → Database D : = 〈 { 1 , ··· , n } ; E 〉 � D � = | E | → Query q 2 ( x , y ) : = ¬ E ( x , y ) E (1,1) For counting problem (1,2) Computation: Do the same algorithm! (1,6) � = n 2 − � � � � Answering: � q 2 ( D ) � q 1 ( D ) . � . . (2,3) For the testing problem . . Same difficulty! . a ∈ q 2 ( D ) ⇐ ⇒ a �∈ q 1 ( D ) (i,j) (i,j+1) For the enumeration problem (i,j+3) We need something else! . . . (n,n)

  23. Introduction Query enumeration Nowhere dense Algorithms What’s next ? Conclusion Example 2 → Database D : = 〈 { 1 , ··· , n } ; E 〉 � D � = | E | → Query q 2 ( x , y ) : = ¬ E ( x , y ) E (1,1) (1,2) (1,6) . . . (2,3) . . . (i,j) (i,j+1) (i,j+3) . . . (n,n)

  24. Introduction Query enumeration Nowhere dense Algorithms What’s next ? Conclusion Example 2 → Database D : = 〈 { 1 , ··· , n } ; E 〉 � D � = | E | → Query q 2 ( x , y ) : = ¬ E ( x , y ) E Index (1,1) (1,1) (1,2) (1,2) (1,3) (1,6) (1,6) . . . . . . (2,3) (2,3) (2,4) . . . . . . (i,j) (i,j) (i,j+1) (i,j+1) (i,j+2) (i,j+3) (i,j+3) (k,l) . . . . . . (n,n) (n,n) NULL

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend