streaming property testing of visibly pushdown languages
play

Streaming Property Testing of Visibly Pushdown Languages Nathanal - PowerPoint PPT Presentation

Introduction A streaming property tester for VPLs Future directions Streaming Property Testing of Visibly Pushdown Languages Nathanal Franois Frdric Magniez Michel de Rougemont Olivier Serre SUBLINEAR Workshop - January 7, 2016 1 /


  1. Introduction A streaming property tester for VPLs Future directions Streaming Property Testing of Visibly Pushdown Languages Nathanaël François Frédéric Magniez Michel de Rougemont Olivier Serre SUBLINEAR Workshop - January 7, 2016 1 / 11 François, Magniez, Rougemont and Serre Streaming Property Testing of VPLs

  2. Introduction Visibly Push-Down Languages A streaming property tester for VPLs Motivation Future directions Visibly Push-Down Languages Definition A VPL is a language of Σ = Σ + ∪ Σ − ∪ Σ = that is recognized by a stack automaton that pushes when it reads a symbol in Σ + and pops when it reads a symbol of Σ − . In particular, a regular tree language with the tree read in DFS order (such as an XML document) is a VPL. • a • • • c b • • • d • a / b c / d / c / a b d 2 / 11 François, Magniez, Rougemont and Serre Streaming Property Testing of VPLs

  3. Introduction Visibly Push-Down Languages A streaming property tester for VPLs Motivation Future directions Motivation and context Checking the validity of large documents needs to be done efficiently. High stack = ⇒ cannot be done with small memory in streaming. An efficient property tester can pre-reject some documents before a more costly check. VPLs are hard to recongize in streaming and hard to test for in the query model: Recognizing some VPLs in streaming requires memory Ω( n ) . (Disjointness) A query-model property tester for the parenthesis language requires Ω( n 1 / 11 ) queries. [Parnas, Ron, Rubinfeld ’03] 3 / 11 François, Magniez, Rougemont and Serre Streaming Property Testing of VPLs

  4. Introduction Simple case : non-alternating sequences A streaming property tester for VPLs From non-alternating sequences to the general problem Future directions Algorithm for the general case Non-alternating sequences Consider v = v + v − . We still want to know if v ∈ L . • • • • • • • • • • v ℓ v ℓ v = v 1 · · · a + · · · · · · b − · · · v 1 + + − − Known to be hard to decide exactly (encoding of Set Disjointness). Any solution may give insight to general problem. 4 / 11 François, Magniez, Rougemont and Serre Streaming Property Testing of VPLs

  5. Introduction Simple case : non-alternating sequences A streaming property tester for VPLs From non-alternating sequences to the general problem Future directions Algorithm for the general case Non-alternating sequences as elements of regular languages “Slices” of v can be interpreted as a word � v , with � v in some regular language if and only if v ∈ L . p ′ q ′ • • x x p q • • v = v 1 · · · a + · · · v h v h · · · · · · v 1 b − + + − − ( q in , q f ) ( p , q ) ( p ′ , q ′ ) ( r , r ) • • • • � v = ( v 1 ( 1 ) , I ) · · · ( a i , b i ) · · · ( a h , b h ) 5 / 11 François, Magniez, Rougemont and Serre Streaming Property Testing of VPLs

  6. Introduction Simple case : non-alternating sequences A streaming property tester for VPLs From non-alternating sequences to the general problem Future directions Algorithm for the general case Recognizing non-alternating sequences with a tester for regular languages There is an algorithm for testing regular languages in O ( 1 /ε 2 ) non-adaptive queries [Alon, Krievelich, Newman, Szegedy ’00]. To get sampling of � v , remember sampled letters in v + (memory O ( 1 /ε. log n ) for the heights) then read letters of matching height in v − . Can do more than just accept/reject : can test for all pairs of states ( p , q ) if there is a run of A on v from p to q . We now have a black-box streaming tester for non-alternating sequences that outputs some R ⊂ Q × Q indicating the possible beginning and end states for v . From this we build an algorithm for the general problem. 6 / 11 François, Magniez, Rougemont and Serre Streaming Property Testing of VPLs

  7. Introduction Simple case : non-alternating sequences A streaming property tester for VPLs From non-alternating sequences to the general problem Future directions Algorithm for the general case From non-alternating sequences to the general problem: general idea Input x ∈ Σ ∗ . Find v a “peak” in x and use the non-alternating sequence tester on it. Repeat this process • • • • • • • • • • x = a ¯ ¯ c e ¯ ¯ ¯ b d e c a b d 7 / 11 François, Magniez, Rougemont and Serre Streaming Property Testing of VPLs

  8. Introduction Simple case : non-alternating sequences A streaming property tester for VPLs From non-alternating sequences to the general problem Future directions Algorithm for the general case From non-alternating sequences to the general problem: general idea Input x ∈ Σ ∗ . Find v a “peak” in x and use the non-alternating sequence tester on it. Repeat this process • • • • • • • • x = a ¯ R 1 c e ¯ ¯ ¯ d e c a d 7 / 11 François, Magniez, Rougemont and Serre Streaming Property Testing of VPLs

  9. Introduction Simple case : non-alternating sequences A streaming property tester for VPLs From non-alternating sequences to the general problem Future directions Algorithm for the general case From non-alternating sequences to the general problem: general idea Input x ∈ Σ ∗ . Find v a “peak” in x and use the non-alternating sequence tester on it. Repeat this process • • • • • • x = a ¯ R 1 c R 2 ¯ ¯ d c a d 7 / 11 François, Magniez, Rougemont and Serre Streaming Property Testing of VPLs

  10. Introduction Simple case : non-alternating sequences A streaming property tester for VPLs From non-alternating sequences to the general problem Future directions Algorithm for the general case From non-alternating sequences to the general problem: sampling To compute R from a peak v we need 1 /ε 2 samples inside the peak. We do not know in advance how large the peaks will be. Perform ( 1 + ε ) -suffix sampling: reservoir sampling on several suffixes w 1 , . . . , w j v , each ( 1 + ε ) times large than the last. w 3 : 1 /ε 2 samples w j v = v ( i ) w 1 = v ( 1 , i ) : 1 /ε 2 samples • • • • • • w 2 : 1 /ε 2 samples v ( 1 ) w 4 : 1 /ε 2 samples Total amount of samples : log ( | v | ) / ( ε 2 log ( 1 + ε )) ≈ log ( | v | ) /ε 3 . 8 / 11 François, Magniez, Rougemont and Serre Streaming Property Testing of VPLs

  11. Introduction Simple case : non-alternating sequences A streaming property tester for VPLs From non-alternating sequences to the general problem Future directions Algorithm for the general case From non-alternating sequences to the general problem: handling R ’s Each R corresponds to some v ′ potentially ε | v | -far from peak v . If too many R ’s within R ’s, risk of accumulation of error. R 1 R 2 R 3 R 4 Solution: not compute R immediately, wait to see if the next peak is much smaller This has a cost : log n peaks waiting in the stack log n potential nested R ’s mean we have to use ε ′ = ε/ log n for the tester for peaks. 9 / 11 François, Magniez, Rougemont and Serre Streaming Property Testing of VPLs

  12. Introduction Simple case : non-alternating sequences A streaming property tester for VPLs From non-alternating sequences to the general problem Future directions Algorithm for the general case From non-alternating sequences to the general problem: handling R ’s Each R corresponds to some v ′ potentially ε | v | -far from peak v . If too many R ’s within R ’s, risk of accumulation of error. R 1 R 2 R 3 R 4 Solution: not compute R immediately, wait to see if the next peak is much smaller This has a cost : log n peaks waiting in the stack log n potential nested R ’s mean we have to use ε ′ = ε/ log n for the tester for peaks. 9 / 11 François, Magniez, Rougemont and Serre Streaming Property Testing of VPLs

  13. Introduction Simple case : non-alternating sequences A streaming property tester for VPLs From non-alternating sequences to the general problem Future directions Algorithm for the general case Algorithm for the general case Use ε ′ = ε/ log n because of error accumulation. Maintain log 3 n /ε 2 independent and well-distributed sampling of factors of size log n /ε . Because computing R ’s messes with the sampling, we in fact need memory O ( log 6 n /ε 4 ) . Maintain a stack of past peaks not transformed into a R yet. If a peak is finished (i.e. returned to starting height), compute the R , get previous peak out of the stack If current peak has at least half the weight of previous peak (in the stack), remove that peak from the stack and compute the R . Total memory cost: O ( log 7 n /ε 4 ) . R R 10 / 11 François, Magniez, Rougemont and Serre Streaming Property Testing of VPLs

  14. Introduction A streaming property tester for VPLs Future directions Future directions There may still be some hope of reducing the memory cost : Maybe each element of the stack does not need to preserve all the sampling as it grows older. This would remove a log n factor. One of the log n factors is due to the assumption that all R ’s are correct (up to a relative error of ε ) with high probability. Maybe we can afford a few completely wrong R ’s. The high stack, small peaks, and nested R ’s are what makes our algorithm costly. But they mostly occur when the height is low, and we have an exact algorithm for checking VPLs with memory cost height ( x ) (run the automaton). Can we find a compromise? Thank you for your attention 11 / 11 François, Magniez, Rougemont and Serre Streaming Property Testing of VPLs

Recommend


More recommend