enumeration on trees with tractable combined complexity
play

Enumeration on Trees with Tractable Combined Complexity and - PowerPoint PPT Presentation

Enumeration on Trees with Tractable Combined Complexity and Efficient Updates Antoine Amarilli 1 , Pierre Bourhis 2 , Stefan Mengel 3 , Matthias Niewerth 4 May 20th, 2019 1 Tlcom ParisTech 2 CNRS, CRIStAL, Lille 3 CNRS, CRIL, Lens 4 University


  1. Compiling Trees in Set Circuits • Constructions are bottom-up • Updates can be done in O ( depth ( T )) • Problem: depth ( T ) can be linear in T • Solution: Depict trees by forest algebra terms 10/16

  2. Free Forest Algebra in a Nutshell concatenation = ‘ 11/16

  3. Free Forest Algebra in a Nutshell concatenation = ‘ context = d application 11/16

  4. Free Forest Algebra in a Nutshell concatenation = ‘ context = d application context = d application 11/16

  5. Free Forest Algebra in a Nutshell tree 12/16

  6. Free Forest Algebra in a Nutshell tree term d ‘ d ‘ 12/16

  7. Free Forest Algebra in a Nutshell tree term d ‘ d ‘ 12/16

  8. Free Forest Algebra in a Nutshell tree term d ‘ d ‘ 12/16

  9. Free Forest Algebra in a Nutshell tree term d ‘ d ‘ 12/16

  10. Free Forest Algebra in a Nutshell tree term alternative term d d ‘ d ‘ d ‘ ‘ 12/16

  11. Free Forest Algebra in a Nutshell tree term alternative term d d ‘ d ‘ d ‘ ‘ 12/16

  12. Free Forest Algebra in a Nutshell tree term alternative term d d ‘ d ‘ d ‘ ‘ 12/16

  13. Free Forest Algebra in a Nutshell tree term alternative term d d ‘ d ‘ d ‘ ‘ The leaves of the formula correspond to the nodes of the tree 12/16

  14. Rebalancing Forest Algebra Terms ‘ 3 ‘ 1 2 13/16

  15. Rebalancing Forest Algebra Terms ‘ ‘ 3 1 ‘ ‘ 3 1 2 2 13/16

  16. Rebalancing Forest Algebra Terms ‘ ‘ 3 1 ‘ ‘ 3 1 2 2 13/16

  17. Rebalancing Forest Algebra Terms d d 3 1 d d 3 1 2 2 13/16

  18. Rebalancing Forest Algebra Terms d d 3 1 d d 3 1 2 2 ‘ ‘ ‘ 4 1 ‘ ‘ ‘ ‘ 3 4 4 1 1 2 ‘ ‘ 3 3 2 2 13/16

  19. Rebalancing Forest Algebra Terms d d 3 1 d d 3 1 2 2 d d d 4 1 d d d d 3 4 4 1 1 2 d d 3 3 2 2 13/16

  20. Rebalancing Forest Algebra Terms d d 3 1 d d 3 1 2 2 d d d 4 1 d d d d 3 4 4 1 1 2 d d 3 3 2 2 13/16

  21. Rebalancing Forest Algebra Terms d d 3 1 d d 3 1 2 2 d d d 4 1 d d d d 3 4 4 1 1 2 d d 3 3 2 2 ‘ d 3 2 d ‘ 3 1 1 2 1 contains the hole 13/16

  22. Rebalancing Forest Algebra Terms d d 3 1 d d 3 1 2 2 d d d 4 1 d d d d 3 4 4 1 1 2 d d 3 3 2 2 ‘ d ‘ 3 2 1 d ‘ d 3 3 1 1 2 2 1 contains the hole 2 contains the hole 13/16

  23. Main Result Theorem Enumertion of MSO formulas on trees can be done in time: O ( | T | × | Q | 4 ω + 1 ) Preprocessing O ( | Q | 4 ω × | S | ) Delay O ( log ( | T | ) × | Q | 4 ω + 1 ) Updates | T | size of tree | Q | number of states of a nondeterministic tree automaton | S | size of result exponent for Boolean matrix multiplication ω 14/16

  24. Lower Bound

  25. Lower Bound Existencial Marked Ancestor Queries Input : Tree t with some marked nodes Query : Does node v have a marked ancestor? Updates : Mark or unmark a node 15/16

  26. Lower Bound Existencial Marked Ancestor Queries Input : Tree t with some marked nodes Query : Does node v have a marked ancestor? Updates : Mark or unmark a node log ( n ) � � Theorem: t query ∈ Ω log ( t update log ( n )) 15/16

  27. Lower Bound Existencial Marked Ancestor Queries Input : Tree t with some marked nodes Query : Does node v have a marked ancestor? Updates : Mark or unmark a node log ( n ) � � Theorem: t query ∈ Ω log ( t update log ( n )) Reduction to Query Enumeration with Updates Fixed Query Q : Return all special nodes with a marked ancestor For every marked ancestor query v : 1. Mark node v special 2. Enumerate Q and return “yes”, iff Q produces some result 3. Mark v as non-special again 15/16

  28. Lower Bound Existencial Marked Ancestor Queries Input : Tree t with some marked nodes Query : Does node v have a marked ancestor? Updates : Mark or unmark a node log ( n ) � � Theorem: t query ∈ Ω log ( t update log ( n )) Reduction to Query Enumeration with Updates Fixed Query Q : Return all special nodes with a marked ancestor For every marked ancestor query v : 1. Mark node v special 2. Enumerate Q and return “yes”, iff Q produces some result 3. Mark v as non-special again log ( n ) � � Theorem: max ( t delay , t update ) ∈ Ω log log ( n ) 15/16

  29. Results Theorem Enumertion of MSO formulas on trees can be done in time: O ( | T | × | Q | 4 ω + 1 ) Preprocessing O ( | Q | 4 ω × | S | ) Delay O ( log ( | T | ) × | Q | 4 ω + 1 ) Updates | T | size of tree | Q | number of states of a nondeterministic tree automaton | S | size of result exponent for Boolean matrix multiplication ω Theorem log ( n ) � � max ( t delay , t update ) ∈ Ω log log ( n ) 16/16

  30. Results Theorem Enumertion of MSO formulas on trees can be done in time: O ( | T | × | Q | 4 ω + 1 ) Preprocessing O ( | Q | 4 ω × | S | ) Delay O ( log ( | T | ) × | Q | 4 ω + 1 ) Updates | T | size of tree | Q | number of states of a nondeterministic tree automaton | S | size of result exponent for Boolean matrix multiplication ω Theorem Thank You log ( n ) � � max ( t delay , t update ) ∈ Ω log log ( n ) 16/16

  31. References i Bagan, G. (2006). MSO queries on tree decomposable structures are computable with linear delay. In CSL . Kazana, W. and Segoufin, L. (2013). Enumeration of monadic second-order queries on trees. TOCL , 14(4). Losemann, K. and Martens, W. (2014). MSO queries on trees: Enumerating answers under updates. In CSL-LICS .

  32. References ii Niewerth, M. (2018). Mso queries on trees: Enumerating answers under updates using forest algebras. In LICS . Niewerth, M. and Segoufin, L. (2018). Enumeration of MSO queries on strings with constant delay and logarithmic updates. In PODS .

  33. Normalization: handling ∅ × y × x ⊥

  34. Normalization: handling ∅ × y × {{ x }} ∅ x ⊥

  35. Normalization: handling ∅ × {{ y }} ∅ y × {{ x }} ∅ x ⊥

  36. Normalization: handling ∅ ∅ × {{ y }} ∅ y × {{ x }} ∅ x ⊥

  37. Normalization: handling ∅ ∅ • Problem: if S ( g ) = ∅ we waste time × {{ y }} ∅ y × {{ x }} ∅ x ⊥

  38. Normalization: handling ∅ ∅ • Problem: if S ( g ) = ∅ we waste time × {{ y }} • Solution: in preprocessing ∅ y × • compute bottom-up if S ( g ) = ∅ {{ x }} ∅ x ⊥

  39. Normalization: handling ∅ ∅ • Problem: if S ( g ) = ∅ we waste time × {{ y }} • Solution: in preprocessing ∅ y × • compute bottom-up if S ( g ) = ∅ {{ x }} ∅ • then get rid of the gate x ⊥

  40. Normalization: handling empty sets × × × × × x ×

  41. Normalization: handling empty sets × {{}} × × {{}} × × {{ x }} {{}} x ×

  42. Normalization: handling empty sets × {{}} × × {{ x }} {{}} × × {{ x }} {{}} x ×

  43. Normalization: handling empty sets × {{ x }} {{}} × × {{ x }} {{}} × × {{ x }} {{}} x ×

  44. Normalization: handling empty sets {{ x }} × {{ x }} {{}} × × {{ x }} {{}} × × {{ x }} {{}} x ×

  45. Normalization: handling empty sets {{ x }} × • Problem: if S ( g ) contains {} we waste time {{ x }} {{}} in chains of × -gates × × {{ x }} {{}} × × {{ x }} {{}} x ×

  46. Normalization: handling empty sets {{ x }} × • Problem: if S ( g ) contains {} we waste time {{ x }} {{}} in chains of × -gates × × • Solution: {{ x }} {{}} × × {{ x }} {{}} x ×

  47. Normalization: handling empty sets {{ x }} × • Problem: if S ( g ) contains {} we waste time {{ x }} {{}} in chains of × -gates × × • Solution: {{ x }} {{}} • remove inputs with S ( g ) = {{}} for × -gates × × {{ x }} {{}} x ×

  48. Normalization: handling empty sets {{ x }} × • Problem: if S ( g ) contains {} we waste time {{ x }} {{}} in chains of × -gates × × • Solution: {{ x }} {{}} • remove inputs with S ( g ) = {{}} for × -gates × × {{ x }} {{}} x ×

  49. Normalization: handling empty sets {{ x }} × • Problem: if S ( g ) contains {} we waste time {{ x }} in chains of × -gates × • Solution: {{ x }} • remove inputs with S ( g ) = {{}} for × -gates × {{ x }} • collapse × -chains with fan-in 1 x

  50. Normalization: handling empty sets {{ x }} × • Problem: if S ( g ) contains {} we waste time {{ x }} in chains of × -gates × • Solution: {{ x }} • remove inputs with S ( g ) = {{}} for × -gates × {{ x }} • collapse × -chains with fan-in 1 x

  51. Normalization: handling empty sets {{ x }} × • Problem: if S ( g ) contains {} we waste time {{ x }} in chains of × -gates × • Solution: {{ x }} • remove inputs with S ( g ) = {{}} for × -gates × {{ x }} • collapse × -chains with fan-in 1 x → Now, traversing a × -gate ensures that we make progress: it splits the sets non-trivially

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