1 / 62

Büchi Tree Automata

Büchi Tree Automata. Based on “Weakly definable relations and special automata” By Michael Rabin. Reminder. The infinite tree: T={0,1}*. The root: . A subtree T x ={y|y  T, x · y}. T. T 01. 00. 01. 10. 11. 0100. 0101. 0110. 0111. 0. 1. 010. 011. . 01. Reminder.

Download Presentation

Büchi Tree Automata

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Büchi TreeAutomata Based on “Weakly definable relations and special automata” By Michael Rabin

  2. Reminder • The infinite tree: T={0,1}*. • The root: . • A subtree Tx={y|yT, x·y} T T01 00 01 10 11 0100 0101 0110 0111 0 1 010 011  01

  3. Reminder • A -valued tree: • A pair (,Tx) such that : Tx. b a b b 0110 0111 0100 0101 ={a,b} b a 010 011 a 01

  4. Reminder • A Büchi tree automaton (“automata” from now on) is defined as U=(,Q,Q0,,F). • :QP(QQ) • A run of U on a tree t=(,Tx) is a mapping r: TxQ such that: • For each yTx: (r(y0),r(y1))(r(y),(y)) • r()Q0

  5. Definition of Acceptence • In(r|): The set of states that appear  times on a path  during the run r. • U accepts (,Tx) if for every path  of Tx we have In(r|)F (Büchi condition). • T(U) is the set of trees accepted by U. • A set B of trees is definable if there exists U such that T(U)=B.

  6. U U Q0 Q0 q0 Unique Initial State • For every definable set A, we have an automata U such that Q0={q0}, and for every (q1,q2)(q,), q0q1, q0q2.

  7. Union and Intersection • If A,B are definable, so are AB, AB. • Proof: Standard constructions (similar to Büchi word automata). AB AB UA q0A UAUB 1 UAUB 3 q0 UB UAUB 2 q0B

  8. Projection and Cylindrification • For a 12 tree t=(,T) and the projection p0(x,y)=x define p0(t) as the 1 tree (p0,T). • The projection of a set of trees A is p0(A)={p0(t)|tA}. • The 2 cylindrification of a set B of 1 trees is the largest set A of 12 trees such that p0(A)=B.

  9. Projection and Cylindrification (cont.) • Theorem: Definable sets are closed under projection and cylindrification. • Proof (projection): A=T(U) with U=(12,Q,q0,,F) • U1=(1,Q,q0,’,F). • ’(q,1)= 22(q,(1,2)). • Easy to see that T(U1)=p0(A).

  10. Projection and Cylindrification (cont.) • Theorem: Definable sets are closed under projection and cylindrification. • Proof (cylindrification): A=T(U) with U=(1,Q,q0,,F) • U1=(12,Q,q0,’,F) • ’(q,(1,2))=(q,1) for each 22. • It is easy to see that T(U1) is the 2 cylindrification of A.

  11. Complementation Complementation • No long proofs, since we do NOT have closure for complementation.

  12. Complementation • Let ={0,1} and B the set of all -trees (,Tx) such that for some path  we have 1In(|). • We already saw that B is definable (an automaton that “guesses”  and acts like the corresponding Büchi automaton on it).

  13. Complementation (cont.) • A=BC is the set of all trees such that for every  we have 1In(|). • We saw that this set is not definable. • Reminder: A “pumping lemma” for trees.

  14. Complementation (cont.) • “Pumping lemma”: • If there exists nodes x<z<y such that r(x)=r(y)=qF and (z)=1, then there exists a tree t’A such that t’T(U) x (q) z y (q) x (q) z x (q) z y (q)

  15. Complementation • 3 Types of paths: • The one path created by the pumping. • Paths not touching the pumped area. • Paths traversing the pumped area and then leaving (by not going towards “y”). • If y=xu then the paths leave at xunv for some n and v<u. • We get a path similar to the path xv… in the original tree.

  16. Complementation: Building a counterexample. • Let t1=(1,T) such that 1()=1, 1(x)=0 for <x. • t2 is obtained by “pasting” t1 on all the nodes 1k0. • In general, tn is obtained by “pasting” tn-1 on the same nodes.

  17. Complementation: Building a counterexample. • If our automata has n states, we use tn+2: • Go along the path 1k. When you reach an accepting state, turn left, then right again. • On each turn you see a “1” right after being in the accepting state. • After n+1 turns we will reach the same accepting state twice.

  18. Another Closure Result • Theorem: Let U=(,Q,q0,,F) and . • Define D as the set of all trees such that t=(T,)D if and only if for every xt, (x)= implies (Tx,)T(U) • D is definable.

  19. Proof Idea • Simulate many copies of U on the tree at once. • Each time  is encountered, create a new copy of U. • Infinitely many copies, but only a finite number of states they can be in – hence, only a finite memory is needed.

  20. Finite trees • A finite tree is obtained by taking a frontier E in T and all the nodes {x|x·y, yE}. • An automaton on a finite tree is U=(,Q,q0,,f) with fQ and :Q\{f}P(QQ). • A run is accepting if it marks all the nodes in E with f: • r(Ft(E))={f}.

  21. Finite trees - Theorem • Let U be an automaton. • Define B as the set of all infinite trees for which exists a sequence En of frontiers, En<En+1, such that U accepts all the trees defined by those frontiers. • B is definable (in the ordinary sense).

  22. Finite trees - Theorem • Proof idea: Run two copies of U on a tree from B, one avoiding f and one entering it. • The copy that enters f is “stuck” afterwards, so we duplicate the other copy instead (i.e. the second copy moves to the same state as the first copy). • The accepting states are those for which the second copy is in f.

  23. Finite trees - Theorem • Formally: Given U=(,Q,q0,,f) we define B=(,QQ’,(q0,f),’,F) with: • ((s1,s1’),(s2,s2’))’((s,s’),) iff (s1,s2)(s,), (s1’,s2’)(s’,) for s’f (s1’,s2’)(s,) for s’=f. • F=S{f}. • Full proof: Technical… One side is easy, the other is a “build run by limit” method.

  24. “Run build by limit” • Finite number of possible runs on this finite subtree. • Infinite number of runs accepting the finite trees defined by En. • On the finite subtree take a run appearing infinitely many times. • Continue to the next finite subtree…

  25. First step towards S2S: Defining Sets • ={0,1} • A – characteristic function of A • A=(A1,…,An) – tuple of subsets of T • Associate a n tree (A) with A: • A(x)=(A1(x),…, An(x)). • An automaton U represents A if it accepts (A).

  26. Lemma • Let K1 be the set of all (A1,…,An) such that |A1|=1. • Let K2 be the set of all (A1,…,An) such that |A1|<. • K1, K2 are representable. • Note that because of our cylindrification theorem, it suffices to consider the case n=1.

  27. Proof For K1 • Define U1=(,{s0,s1,s2},1,s0,{s1}). • 1(s0,0)={(s0,s1),(s1,s0)} • 1(s0,1)={(s1,s1)} • 1(s1,0)={(s1,s1)} • 1(s1,1)={(s2,s2)} • 1(s2,0)={(s2,s2)} • 1(s2,1)={(s2,s2)}

  28. Proof For K2 • Define U2=(,{s0,s1,s2},2,s0,{s1}). • 2(s0,0)={(s0,s0),(s1,s1)} • 2(s0,1)={(s0,s0),(s1,s1)} • 2(s1,0)={(s1,s1)} • 2(s1,1)={(s2,s2)} • 2(s2,0)={(s2,s2)} • 2(s2,1)={(s2,s2)}

  29. Types • We say that A is of type (m,n,k) if A=(x1,…,xm,1,…,n,A1,…,Ak), with: • xiT • iT,|i|< • AiT • The set K(m,n,k)={A|A of type (m,n,k)} is representable. • Follows from the previous lemma and closure to intersection.

  30. Theorem • R,QP(T)n are representable. • The following sets are also representable: • RQ • RQ • R1={(A1,…,An-1)|An:(A1,…,An)R} • R2={(A1,…,An-1)|n:(A1,…,An-1,n)R}(n finite)

  31. Proof • RQ, RQ, R1 follow from closure properties (union, intersection, projection). • For R2 we will show two representable sets A,B such that R2=AB.

  32. The Set A • Since n is finite, (A1,…,An-1,n) is represented by a valued tree whose last coordinate is 0 everywhere except for a finite subtree. • Let U be the automata for R. • A is defined as a set of ‘=n-1(P(Q)-{}) trees. 1,1,1, {q3} 1,1,0, {q1,q2} 0,1,0, {q0,q2}

  33. The Set A (cont.) • A is the set of all ‘ trees (,T) such that for every xT, U accepts Tx if it starts from one of the states in p1(x), and sees only “0” in the last coordinate. • A is representable by our “another closure result”. 1,1,1, {q3} 1,1,0, {q1,q2} U accepts this subtree if it starts from q3. 0,1,0, {q0,q2}

  34. The Set B • We define B using a set P of finite trees over ‘. • A tree H is in P if for all the possible labelings of the last coordinate, there is a run r of U on H such that r(x)p1(x) for all x in the frontier of H. • A tree is in B if and only if there is a sequence Hn<Hn+1 of subtrees in P.

  35. End of the Proof • It can be shown that R2=p0(AB). • For each finite n, B “handles” the part of the tree marked with elements of n, and A “handles” the rest of the tree. • If n is not finite we can’t do such a “split”.

  36. Last Lemma Before the Main Theorem • w{0,1}* and PP(T)n, such that for every (A1,…,An)P we have Ai={x} and xwAj. (i,j, are fixed). • Let Q be similarly defined with xwAj. • P and Q are representable. • Proof: Trivial. Cylindrification & intersection allow us to consider only the case n=2, and the automatas are straightforward. (Guess x; check if xwAj).

  37. The Main Theorem • Let F(x1,…,xm,1,…,n,A1,…,Ak) be a formula of S2S involving quantifiers over individual variables and finite-set variables only. • Let P the set defined by F, then P is representable.

  38. Proof • Transform F into an equivalent form: • Replace “t1=t2” by “(t1t2)”. • Replace “A=B” by “x(xAxB)” • “Push in” the negations: • Replace ~(FG)by (~F~G). • Replace ~(FG) by (~F ~G). • Replace ~vF by v~F. • Replace ~vF by v~F. • Therefore, F is obtained from atomic formulas tA and ~tA by using ,  and finite-set quantifiers.

  39. Proof (cont.) • The proof is by induction on the structure of F. • If F=tA then t is xw for a variable x and some w{0,1}* (for example, x10 is S0S1(x)). • Therefore, by the previous lemma, F is definable. • Same goes for F=~tA.

  40. Proof (cont.) • The proof is by induction on the structure of F. • If F=tA then t is xw for a variable x and some w{0,1}* (for example, x10 is S0S1(x)). • Therefore, by the previous lemma, F is definable. • Same goes for F=~tA.

  41. Proof (cont.) • If F,G are representable then so are FG and FG, because: • R(FG)=R(F)R(G) • R(FG)=R(F)R(G) • We saw earlier that union and intersections of representable sets are representable.

  42. Proof (cont.) • For F and F we also use the previous theorem: • R1={(A1,…,An-1)|An:(A1,…,An)R} • R2={(A1,…,An-1)|n:(A1,…,An-1,n)R • Here R=R(F), R1=R(F) and R2=R(F). • The proof is finished by induction.

  43. The Emptiness Problem • There is an algorithm to determine for an automaton U if T(U)=, which uses |Q|4 computational steps. • First we transform the problem to an automata on a single letter alphabet {} by “guessing” the input tree: • ’(q)’(q,)=(q,). • It remains to decide if U’ accepts the only possible input tree.

  44. Some Philosophy • What does it mean, to accept a tree? • It means that if we’re scanning the tree with BFS, we’ll reach a frontier of accepting states. • Moving on, we’ll get from this frontier to another one. • And another… • So there’s a subset of the accepting states which is “closed” in a sense.

  45. Getting Down to Earth • For a set HS define R(H) as the set of all sS such that: • There’s a finite tree E{} and a run on E that starts from s and finishes inside H. • If we’ll have a set G of accepting states such that GR(G), AND q0R(G), we are done!

  46. Getting Down to Earth (cont.) • Define the sequence Fk inductively: • F0=F. • Fi+1=FiR(Fi). • The sequence has only finitely many elements. Set the last one as G. • T(U) if and only if q0R(G). • It remains to show how to compute R(H) for a given H.

  47. Computing R(H) • Given H, we define a sequence Hi. • H0=. • Hi+1= Hi{q|q1,q2[(q1,q2)(q)  {q1,q2}HHi]}. • This sequence is also finite. It is easy to see that the last element is R(H).

  48. Complexity Issues • According to Rabin, R(H) can be computed in n3 steps. • I only see the trivial n4 steps algorithm… • When computing G we compute R(Fi) at most n times. • Thus the runtime of the algorithm is n4 steps (n5?)

  49. Müller – Büchi Equivalence for Words • We show that for every Büchi recognizable language there is a corresponding Müller automata. • Reminder: Büchi recognizable language is of the form of unions of VW, with V,W regular languages and WWW. • Müller automata is closed to unions so we only need to prove it for VW.

  50. Müller – Büchi Equivalence for Words • 1st Goal: Show that if W is regular language with WWW then W=WW+, with W+Müller recognizable. • 2nd Goal: Show that if W is regular and L Müller recognizable then WL is Müller recognizable. • Then we’ll have: • VW=V(WW+)=(VW)W+. • VW is regular, W+ is Müller recognizable.

More Related