dynamic complexity from regular languages to regular path
play

Dynamic Complexity: From Regular Languages to Regular Path Queries - PowerPoint PPT Presentation

(20 Years of) Dynamic Complexity: From Regular Languages to Regular Path Queries Thomas Schwentick AutoMathA 2015 Leipzig, May 2015 Lehrstuhl Logik in der Informatik The general setting (1/2) s s s Input t t t Aux. data Reach(s,t)?


  1. (20 Years of) Dynamic Complexity: From Regular Languages to Regular Path Queries Thomas Schwentick AutoMathA 2015 Leipzig, May 2015 Lehrstuhl Logik in der Informatik

  2. The general setting (1/2) s s s Input t t t Aux. data Reach(s,t)? Reach(s,t)? Reach(s,t)? yes yes no ! ( TZ) !

  3. The general setting (2/2) ‚ In this talk, ‚ We will often consider the (Boolean) reachability query: – we consider graph queries and regular lan- guages Definition: R EACH – Graphs can be changed by insertions and Directed Graph G , vertices s, t deletions of edges — one at a time Input: – The auxiliary data usually consists of relations Is there a path from s to t in G ? Question: ∗ There is a particular aux relation Q (the “query relation”) yielding the current query result – The auxiliary relations are updated after each change – These updates are specified by first-order formulas !

  4. Examples (1/2) Example: Reachability under Insertion Definition ‚ A dynamic program P “ p I NIT , Φ q 2 4 2 4 INS (2,4) – updates the auxiliary relations via first-order update formulas from Φ , 1 5 1 5 one for every auxiliary relation and G G 1 possible change, and 3 3 – initializes the auxiliary relations via 2 4 2 4 initialization mapping I NIT ‚ P maintains a query if one of its aux- 1 5 1 5 iliary relations always stores the query T T 1 result 3 3 def ‚ DynFO “ class of maintainable queries ‚ Intention: Binary auxiliary relation T stores the transitive – under insertion and deletion of tu- closure of the edge relation ples, ‚ Update formula φ INS T p a, b ; x, y q : – with empty initialization, – determines the pairs p x, y q in T after insertion of – starting from empty structures p a, b q to E , def “ T p x, y q _ p T p x, a q ^ T p b, y qq – ✎ T does not suffice if edges can also be deleted [Dong, Libkin, Wong 95] !

  5. Examples (2/2) Example: Reachability in acyclic graphs under deletion G 6 4 2 8 u v a b 1 9 x y 3 5 7 ‚ For acyclic graphs, Reachability is in DynFO [Dong, Su 93/95; Patnaik, Immerman 94/97] ‚ Challenge: how to know, whether after deletion of an edge p a, b q there still exists a path p from x to y ? ‚ There are two cases: (1.) ( a not reachable from x ) or ( y not reachable from b ); or (2.) p must have a last edge p u, v q for which a can be reached from u ‚ Update formula φ DEL T p a, b ; x, y q : ` ˘ T p x, y q ^ p� T p x, a q _ � T p b, y qq _ D u, v p T p x, u q ^ E p u, v q ^ T p v, y qq^ p T p u, a q ^ � T p v, a qq ^p u ­“ a _ v ­“ b q

  6. Motivation & related approaches ‚ Why (first-order) logic as update language? ‚ A close relative: First-order incremental evalua- tion systems (FOIES) – Database theory view: ∗ SQL ” FO – FOIES can add elements – set updates · ☞ ignoring counting, grouping, ... · Which recursive queries can be main- – queries tained without recursion? ‚ History: · Which SQL queries can be maintained – FOIES: Dong, Su 1993 which SQL fragments? – DynFO : Patnaik, Immerman 1994 – Complexity theoretic view: ∗ uniform AC 0 ” FO p` , ˆq ‚ A remote relative: dynamic algorithms [Barrington, Immerman, Straubing 90] · AC 0 is the “weakest complexity class” – Logical view: ∗ Gain more insight into · the “dynamics” of descriptive complexity · the power of FO on finite structures

  7. Research goals and questions ‚ Main Goal: Understand Dynamic Complexity ‚ Specific goals: – Which queries are in DynFO ? ∗ Is Reachability on directed graphs in DynFO ? – Which queries are not in DynFO ? ∗ Methods for inexpressibility results? ‚ More generally: – Which queries are in Dyn L ? – Which Dyn L 1 capture which logics L 2 for L 1 ă L 2 ? dynamically? !

  8. Contents Introduction � Settings Dynamic Complexity of Formal Languages Dynamic Complexity of Reachability Dynamic Complexity of Regular Path Queries Conclusion

  9. The setting: some options ‚ Towards an exact setting of dynamic complexity, – Logics: there are many options to choose from: ∗ Many choices, some to be discussed – Universe: throughout the talk b fixed or – Auxiliary data: l changing over time? b Relations – Initialization: b Relations and functions ∗ To be discussed soon l Other – Change operations: – Query types: b Insertions and deletions of single tuples b Boolean ☞ in this talk l Insertions and deletions of sets of tuples l Arbitrary arity ☞ in general l Updates defined by formulas/queries with – Semantics of update formulas: parameters b They define the aux data explicitly l They only define the changes ( δ -semantics) !

  10. Initialization settings: all empty (main setting) ‚ Starts from empty input and empty auxiliary data s s s [Patnaik, Immerman 94/97] ‚ Quite generous: Input – E.g.: a linear order can be de- fined incrementally t t t def ‚ DynFO “ class of queries that can be maintained with first-order logic in the main setting ‚ DynFO contains, e.g. – Reachability on acyclic graphs Aux. data – Reachability on undirected graphs [Patnaik, Immerman 94/97] Reach(s,t)? Reach(s,t)? Reach(s,t)? – Reachability on embedded pla- nar graphs yes no no [Datta, Hesse, Kulkarni 14] – Bipartiteness [Patnaik, Immerman 94/97] – Tree isomorphism [Etessami 98] !

  11. Initialization settings: non-empty aux data ‚ Starts from empty input and pre- s s s computed auxiliary relations – (depending on the size of the Input universe) ‚ It relates to circuit complexity t t t classes ‚ Arbitrary aux data: Non-uniform DynFO ‚ Arithmetic ( ` , ˆ ) as aux data: Aux. data DynFO p` , ˆq ‚ Various other subsettings depend- ing on the power of the precompu- Reach(s,t)? Reach(s,t)? Reach(s,t)? tation yes no no !

  12. Initialization Settings: non-empty input ‚ Starts from non-empty input and precomputed aux data (depend- s s s ing on the actual input) ✎ The combination of non-empty Input input and empty-aux is not meaningful t t t ‚ Emphasizes “maintainability” ‚ With PTIME precomputation, the “non-empty aux” and “non-empty input” settings coincide Aux. data ‚ With “logical aux initialization”, this setting is weaker: – First-order logic can Reach(s,t)? Reach(s,t)? Reach(s,t)? ∗ not build a linear order within yes yes no the aux data (in general) ∗ not maintain Tree Isomor- phism, but ... ∗ ... can (still) maintain Reach- ability on undirected graphs and Bipartiteness [Grädel, Siebertz 12] !

  13. Overview of settings Aux-Initalization Empty initial structure Arbitrary initial structure Arbitrary Non-uniform DynFO ` , ˆ DynFO p` , ˆq FO p` , ˆq Empty DynFO [Patnaik/Immerman 94/97] FO DynFO ` [Patnaik/Immerman 94/97] PTime Logical [Grädel/Siebertz 12] !

  14. Plan ‚ As we want to maintain regular path queries: – How to maintain membership in regular languages? – How to maintain Reachability? – How to combine the two? !

  15. Contents Introduction Settings � Dynamic Complexity of Formal Languages Dynamic Complexity of Reachability Dynamic Complexity of Regular Path Queries Conclusion

  16. Dynamic complexity of formal languages: setting Definition ‚ We allow two kinds of update operations: ‚ A word structure W representing a string w – operation ins σ p i q , inserts i in S σ p i q and consists of deletes it from all S σ 1 p i q , for σ 1 ‰ σ , – a set of positions t 1 , ..., n u , – operation del p i q , setting all S σ p i q to false. – with an ordering ă , ‚ The linear order can not be changed! – and one unary relation S σ for each alpha- bet symbol σ . Example ‚ For every i , there is at most one σ with c c b b i P S σ def – In that case: W i “ σ ‚ ins c p 2 q , del p 4 q , ins b p 6 q def – Otherwise: W i “ ǫ ‚ The word represented by W is W 1 ¨ ¨ ¨ W n Example ‚ The word structures c c – b b and c c – b b both represent the same string bbcc ( MM)

  17. Strings: Results Theorem [Patnaik, Immerman 94/97] Theorem [Gelade, Marquardt, TS 09/12] ‚ With respect to languages: DynProp “ Reg ‚ Reg Ď DynFO ‚ All Dyck languages can be maintained in Theorem [Gelade, Marquardt, TS 09/12] DynFO ‚ CFL Ď DynFO Definition ‚ All Dyck languages can be maintained in DynQF ‚ DynProp: Corollary – Queries that can be maintained in DynFO ‚ DynProp Ĺ DynQF with quantifier-free formulas and aux rela- tions ‚ DynQF: – Queries that can be maintained in DynFO with quantifier-free formulas and aux functions (and relations) Theorem [Hesse 03] ‚ Reg Ď DynQF !

  18. Reg Ď DynProp Proof sketch ‚ Let A “ p Σ , Q, δ, s, F q be a DFA for the regular language L ‚ To maintain membership of a word in L : – we mainly use binary auxiliary relations R p,q , for every pair p, q P Q – Intention: R p,q p i, j q ” δ ˚ p p, w i ` 1 ¨ ¨ ¨ w j ´ 1 q “ q Example w i ` 1 ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ w 1 w i w k ´ 1 w k ` 1 w j ´ 1 w j w n p q p 1 p 1 Proof sketch (cont.) ‚ Update formula for insertions: „  φ R p,q ł def ins σ p k ; i, j q “ p i ă k ă j q^ p R p,p 1 p i, k q^ R q 1 ,q p k, j q _ . . . δ p p 1 ,σ q“ q 1 ‚ Update formula for deletions: „  φ R p,q ł def p k ; i, j q “ p i ă k ă j q ^ p R p,p 1 p i, k q ^ R p 1 ,q p k, j q _ . . . del p 1 ( MM)

Recommend


More recommend