property testing of tree regular languages
DESCRIPTION
Property testing of Tree Regular Languages. Frédéric Magniez, LRI, CNRS Michel de Rougemont, LRI , University Paris II. Property testing of Tree Regular Languages. Tester for regular words with the Edit Distance with Moves - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Property testing of Tree Regular Languages](https://reader035.vdocuments.site/reader035/viewer/2022081512/56814d4f550346895dba8238/html5/thumbnails/1.jpg)
Property testing of Tree Regular Languages
Frédéric Magniez, LRI, CNRS
Michel de Rougemont, LRI , University Paris II
![Page 2: Property testing of Tree Regular Languages](https://reader035.vdocuments.site/reader035/viewer/2022081512/56814d4f550346895dba8238/html5/thumbnails/2.jpg)
1. Tester for regular words with the Edit Distance with Moves
2. Tester for ranked regular trees with the Tree-Edit Distance with Moves,
Property testing of Tree Regular Languages
![Page 3: Property testing of Tree Regular Languages](https://reader035.vdocuments.site/reader035/viewer/2022081512/56814d4f550346895dba8238/html5/thumbnails/3.jpg)
Let F be a property on a class K of structures U
An ε -tester for F is a probabilistic algorithm A such that:• If U |= F, A accepts
• If U is ε far from F, A rejects with high probability
• Time(A) independent of n.(Goldreich, Golwasser, Ron 1996 , Rubinfeld, Sudan 1994)
Tester usually implies a linear time corrector.
Testers on a class K
![Page 4: Property testing of Tree Regular Languages](https://reader035.vdocuments.site/reader035/viewer/2022081512/56814d4f550346895dba8238/html5/thumbnails/4.jpg)
History of Testers
Self-testers and correctors for Linear Algebra ,Blum & Kanan 1989
Robust characterizations of polynomials, R. Rubinfeld, M. Sudan, 1994
Testers for graph properties : k-colorability, Goldreich and al. 1996
graph properties have testers, Alon and al. 1999
Regular languages have testers, Alon and al. 2000s
Testers for Regular tree languages , Mdr and Magniez, ICALP 2004
2
![Page 5: Property testing of Tree Regular Languages](https://reader035.vdocuments.site/reader035/viewer/2022081512/56814d4f550346895dba8238/html5/thumbnails/5.jpg)
1. Classical Edit Distance:
Insertions, Deletions, Modifications
2. Edit Distance with moves
0111000011110011001
0111011110000011001
3. Edit Distance with Moves generalizes to Trees
Edit distance on Words
![Page 6: Property testing of Tree Regular Languages](https://reader035.vdocuments.site/reader035/viewer/2022081512/56814d4f550346895dba8238/html5/thumbnails/6.jpg)
Testers on words
Simpler proof which generalizes to regular trees.L is a regular language and A an automaton for L.
0C
1C
2C
3C
4C
Admissible Z=
A word W is Z-feasible if there are two states
4320 ... CCCC
......... Zand ' such that ', W jiji CCqqCqCq
init accept
![Page 7: Property testing of Tree Regular Languages](https://reader035.vdocuments.site/reader035/viewer/2022081512/56814d4f550346895dba8238/html5/thumbnails/7.jpg)
The Tester
)/log(1,...,iFor m
random )/.2( Choose 3 mN ii
For every admissible path Z:
else REJECT.
1i2 size of subwords wij
Theorem: Tester(W,A, ε ) is an ε -tester for L(A).
Tester. Input : W,A, ε
.ACCEPT feasible, Zare W of all If wij
![Page 8: Property testing of Tree Regular Languages](https://reader035.vdocuments.site/reader035/viewer/2022081512/56814d4f550346895dba8238/html5/thumbnails/8.jpg)
Proof schema of the Tester
Theorem: Regular words are testable.
Robustness lemma: If W is ε-far from L, then for every admissible path Z, there exists such that the number
of Z-infeasible subwords
Splitting lemma: if W is far from L there are many disjoint infeasible subwords.
Amplifying lemma: If there are many infeasible words, there are many short ones.
).5
log(2
m
i
...2
least at is 2 2
1i1i n
m
![Page 9: Property testing of Tree Regular Languages](https://reader035.vdocuments.site/reader035/viewer/2022081512/56814d4f550346895dba8238/html5/thumbnails/9.jpg)
Merging
Merging lemma: Let Z be an admissible path, and let F be a Z-feasible cut of size h’ . Then '),( 2hmLFDist
C
C C
C
C
C
Take each word and split it along its connected components, removing single letters. Rearrange all the words of the same component in its Z-order.Add gluing words to obtain W’ in L:
Fwi
............' 222110 wgwgwgW
![Page 10: Property testing of Tree Regular Languages](https://reader035.vdocuments.site/reader035/viewer/2022081512/56814d4f550346895dba8238/html5/thumbnails/10.jpg)
Splitting
Splitting lemma: If Z is an admissible path, W a word s.t. dist(W,L) > h, then W has
Proof by contraposition:
.n)(h subwords.disjoint infeasible Zh/m than more 2
subwords.disjoint and infeasible Zminimal / than less hasW 2 mhh'
'.L)Dis(F, lemma merging By the 2hm'. F)Dist(W, h
'' L)Dist(W, Hence 2hmh
h L)Dist(W, And
F.cut feasible a provides letterslast theRemoving
![Page 11: Property testing of Tree Regular Languages](https://reader035.vdocuments.site/reader035/viewer/2022081512/56814d4f550346895dba8238/html5/thumbnails/11.jpg)
Tree-Edit-Distance
a
e
b
c d
a
e
b
ca
eb
c
df
e
DeletionEdge
InsertionNode andLabel
Tree Edit distance with moves:
a
e
b
c d
a
e
b
c d
1 move
Distance Problem is NP-complete, non-approximable.
![Page 12: Property testing of Tree Regular Languages](https://reader035.vdocuments.site/reader035/viewer/2022081512/56814d4f550346895dba8238/html5/thumbnails/12.jpg)
Binary trees : Distance with moves allows permutations
Tree-Edit-Distance on binary trees
Distance(T1,T2) =4 m-Distance (T1,T2) =2
![Page 13: Property testing of Tree Regular Languages](https://reader035.vdocuments.site/reader035/viewer/2022081512/56814d4f550346895dba8238/html5/thumbnails/13.jpg)
• (q0, q0) q1• (q0,q1) q1
Tree automata
q0 q0
q0
q0q0
q0
q1q1
q1
q1
q1
q0 q0
q0q1
q2
(q1,q1)q2
(q1,q0)q2
(q2,-) q2
(-,q2) q2)1,,0,( qqQA
![Page 14: Property testing of Tree Regular Languages](https://reader035.vdocuments.site/reader035/viewer/2022081512/56814d4f550346895dba8238/html5/thumbnails/14.jpg)
Fact . If then the number of infeasible subtrees of constant size is O(n).
Infeasible subtrees
nLT .),(Distance
![Page 15: Property testing of Tree Regular Languages](https://reader035.vdocuments.site/reader035/viewer/2022081512/56814d4f550346895dba8238/html5/thumbnails/15.jpg)
Tester for regular Trees
12
iFor
mr
random ).
( Choose 2
34
m
irm
N
i size of subtrees and nodes tij
Theorem: Tester(T,A, ε ) is an ε -tester for L(A).
Tester. Input : T,A,
.ACCEPT feasible, Zare T of all If tij
![Page 16: Property testing of Tree Regular Languages](https://reader035.vdocuments.site/reader035/viewer/2022081512/56814d4f550346895dba8238/html5/thumbnails/16.jpg)
Proof schema of the Tester
Theorem: Regular trees are testable.
Robustness lemma: If T is ε-far from L, then for every admissible path Z, there exists such that the number
of Z-infeasible i-subtrees
Splitting lemma: if T is far from L there are many disjoint infeasible subtrees.
Amplifying lemma: If there are many infeasible subtrees, there are many small ones.
)(12
mr
i
...1least at is 234 n
r m
![Page 17: Property testing of Tree Regular Languages](https://reader035.vdocuments.site/reader035/viewer/2022081512/56814d4f550346895dba8238/html5/thumbnails/17.jpg)
Splitting and Merging
C
C C
C
C
C
Splitting and Merging on words:
Splitting and Merging on trees:
![Page 18: Property testing of Tree Regular Languages](https://reader035.vdocuments.site/reader035/viewer/2022081512/56814d4f550346895dba8238/html5/thumbnails/18.jpg)
Splitting and Merging trees
C D D
CC
E
Connected Components
Corrected tree
![Page 19: Property testing of Tree Regular Languages](https://reader035.vdocuments.site/reader035/viewer/2022081512/56814d4f550346895dba8238/html5/thumbnails/19.jpg)
Conclusion• Verification is hard.• Approximate verification can be feasible.
1. Testers and Correcters for regular words2. Tester for regular trees3. Corrector for regular trees4. Unranked trees: XML files5. Applications: Constant algorithm for Edit Distance with
moves(Fischer, Magniez, Mdr)