Download presentation

Presentation is loading. Please wait.

Published byEthen Waddingham Modified about 1 year ago

1
GHILA CASTELNUOVO TEL AVIV UNIVERSITY Determinization of Büchi Automata

2
Agenda Brief Review on Definitions: Büchi, Muller and Rabin Automata Deterministic Büchi Automata, Nondeterministic Automata and their unequivalence between them A bad tentative: Power-set construction on Büchi Automata. Determinization of Büchi Automata: Safra Construction

3
Definition of ω-Automaton Let Σ = {a,b,..} a finite alphabet. By Σ ω we denote the set of infinite words over Σ. A ω-automaton over Σ is a quintuple A =, where: Q is a finite set of states, Σ is a finite alphabet. δ : Q×Σ → 2 Q (or δ : Q×Σ → 2 Q for the non-deterministic one), is the state transition function q I ∈ Q is the initial state Acc is the acceptance component.

4
Büchi Acceptance Condition An ω-automaton A = (Q, Σ, δ, q I, F) with acceptance component F ⊆ Q is called Büchi automaton if it is used with the following acceptance condition (Büchi acceptance component): A word α ∈ Σ ω is accepted by A iff there exists a run ρ of A on α satisfying the condition: Inf(ρ) ∩ F ≠ ∅.

5
Muller Acceptance Condition An ω-automaton A = (Q, Σ, δ, q I, F) with acceptance component F ⊆ Q is called Muller automaton if it is used with the following acceptance condition (Muller acceptance component): A word α ∈ Σ ω is accepted by A iff there exists a run ρ of A on α satisfying the condition: Inf(ρ) ∈ F

6
Rabin Acceptance Condition An ω-automaton A = (Q, Σ, δ, q I, Ω) with acceptance component Ω = {(E 1, F 1 ),..., (E k, F k )} with E i, F i ⊆ Q is called Rabin automaton if it is used with the following acceptance condition (Rabin acceptance component): A word α ∈ Σ ω is accepted by A iff there exists a run ρ of A on α satisfying the condition: ∃ (E,F) Ω : (Inf(ρ) ∩ E = ∅ ) ∧ (Inf(ρ) ∩ F ≠ ∅ ).

7
Deterministic versus Nondeterministic Büchi Automata This automaton A accepts the language L := {α ∈ {a, b} ω | b(α) < ∞}, where b(α) denotes the number of ‘b’s occurring in word α. We saw in the first lecture that there does not exist a deterministic Automata which recognizes this language.

8
Deterministic versus Nondeterministic Büchi Automata From this we understand that not for all the nondeterministic Büchi Automata there exists an equivalent deterministic one.

9
Then, how do we determinize? We saw in the first lecture the following equivalence. Therefore what we can do is to determinize a Büchi non deterministic Automaton to a Muller deterministic Automaton or to a Rabin deterministic Automaton

10
Determinization of Büchi Automata: Power Set Construction F = {{p,q}, {p,q,r}}. This automata A’ also recognizes the word (ab) ω L. The reason why the Power set Construction doesn’t work is because there if we look at the accepting run = {p} {p,q} {p,q,r} {p,q,r} {p,q,r} … in A’, we cannot extract a run of A from it, where we visit infinite times f. {p} {p,q} a,b {p,q, r} a,b a b

11
Determinization of Büchi Automata: Power Set Construction The problem is due to the fact that we can’t really simulate the original run since the number of nodes in each level in the tree is unbounded. Therefore what we do is that we approximate it and we represent each level by the states that we visited in the level. In this way we represent much more paths than in the original tree, and especially we represent also a good path that didn’t originally exist.

12
Safra’s Construction By given a Büchi non deterministic Automaton B it creates a Muller deterministic Automaton M or a Rabin deterministic Automaton R, such that L(B) = L(M) = L(R).

13
How do we do that? 1. Safra’s Trees 2. The Construction

14
Safra’s Trees Q is a fixed set of states. A Safra Tree over Q is tree over a vocabulary V, and where each node is labeled by λ ∈ {2 Q \ }x{‘’,‘!’} and which satisfies the following conditions: 1. The union of brother macrostates is a proper subset of their parent macrostate. 2. Brother macrostates are disjoint.

15
Safra’s Trees Example Q = {q I, f, g}, V={1,2,3} 1 {q I, f, g} 2 {f} 3 {g}

16
Safra’s Trees Lemma 1: The number of nodes in a Safra tree is bounded by |Q|. Proof: By induction on the height of Safra trees over Q. 1. Base: If n is 0 or n is 1, then the tree is empty or only a root and then it is trivial.

17
Safra’s Trees Induction’s Step: Each one of the sons of the root are Safra trees over disjoint sets Q i of states. By induction, the number of nodes in each one of the subtree is ≤ |Q i |, then the total number of nodes is ≤ ∑|Q i | + 1. By Condition 1 we also have that ∑|Q i | < |Q|, then we get that the total number ≤ |Q|

18
Safra’s Trees Corollary 1: The height of a Safra trees is at most |Q|. In each level we have at least one node. Corollary 2: Safra trees are finitely branching, and a node has at most |Q|-1 sons. Otherwise we will get more than |Q| nodes.

19
The Construction B = (Q, Σ, q I, δ, F) is non-deterministic Büchi automaton. We will create a new deterministic Muller automaton M = (Q’, Σ’, q I ’, δ’, F) or a new deterministic Rabin automaton R = (Q’, Σ’, q I ’, δ’, Ω) such that: 1. Q’ is a set of Safra trees. 2. q I ’ is a Safra tree. 3. δ’: Q’ x Σ → Q’ is the states’ transition function.

20
The Construction - Running Example Q = {q I,f,g }, F = {f,g}

21
The Construction 1. The vocabulary V = {1,2,…,2|Q|} – This is sufficient because the number of nodes is bounded by |Q| and in the intermediate states we add at most |Q| nodes. 2. The initial state q I ’ is a single node labeled with macrostate {q I }. 1 {q I } q I ’ =

22
The Construction The value of the transition function δ’(T, a) is computed as follows: Step 1: Remove all marks ‘!’ in the Safra tree T. Step 2: For every node v with macrostate M such that M ∩ F ≠ ∅, create a new node v ∈ (V \N), such that v becomes the youngest son of v and carries the macrostate M ∩ F. Step 3: Apply the powerset construction on every node v, i.e. replace its macrostate M by {q ∈ Q| ∃ (m, a, q) ∈ Δ : m ∈ M}.

23
The Construction Step 4 (horizontal merge): For every node v with macrostate M and state q ∈ M, such that q also belongs to an older brother of v, remove q from M. Step 5: Remove all nodes with empty macrostates. Step 6 (vertical merge): For every node whose label is equal to the union of the labels of its sons, remove all the descendants of v and mark v with ‘!’

24
The Construction - Running Example Computing δ(1−{q I }, a) : Step 1: Step 2: Step 3: Remove all marks ‘!’ in the Safra tree T. For every node v with macrostate M such that M ∩ F = ∅, create a new node v ∈ (V \N), such that v becomes the youngest son of v and carries the macrostate M ∩ F. Apply the powerset construction on every node v, i.e. replace its macrostate M by {q ∈ Q| ∃ (m, a, q) ∈ Δ : m ∈ M}. 1 {q I } 1 {q I,f} a 1 {q I } 1 {q I } a 1 {q I } 1 {q I } a

25
The Construction - Running Example Computing δ(1−{q I }, c) : Step 1: Step 2: Step 3: 1 {q I,f } a 1 {q I } 1 {q I } c Remove all marks ‘!’ in the Safra tree T. For every node v with macrostate M such that M ∩ F = ∅, create a new node v ∈ (V \N), such that v becomes the youngest son of v and carries the macrostate M ∩ F. Apply the powerset construction on every node v, i.e. replace its macrostate M by {q ∈ Q| ∃ (m, a, q) ∈ Δ : m ∈ M}. 1 {q I,f } a 1 {q I } 1 {q I } c 1 {q I,f } a 1 {q I } 1∅ 1∅ c

26
The Construction - Running Example Computing δ(1−{q I }, c) : Step 4: Step 5: For every node v with macrostate M and state q ∈ M, such that q also belongs to an older brother of v, remove q from M. Remove all nodes with empty macrostates. 1 {q I,f } a 1 {q I } 1∅ 1∅ c a 1 {q I } c ε 1 {q I,f }

27
The Construction - Running Example Computing δ(1−{q I,f}, c) : Step 1: Step 2: Step 3: Remove all marks ‘!’ in the Safra tree T. For every node v with macrostate M such that M ∩ F = ∅, create a new node v ∈ (V \N), such that v becomes the youngest son of v and carries the macrostate M ∩ F. Apply the powerset construction on every node v, i.e. replace its macrostate M by {q ∈ Q| ∃ (m, a, q) ∈ Δ : m ∈ M}. a 1{qI}1{qI} 1 {q I,f} c ε 1 {q I,f} 2 {f} c a 1 {q I } 1 {q I,f} c ε 1 {f} c 2 {f} a 1 {q I } 1 {q I,f} c ε c 1 {q I,f}

28
The Construction - Running Example Computing δ(1−{q I,f}, c) : Step 4: Step 5: Step 6: a 1 {q I } 1 {q I,f} c ε 1 {f} c 2 {f} a 1 {q I } 1 {q I,f} c ε 1 {f} ! aa 1 {q I } 1 {q I,f} c ε 1 {f} 2 {f} c For every node v with macrostate M and state q ∈ M, such that q also belongs to an older brother of v, remove q from M. Remove all nodes with empty macrostates. For every node whose label is equal to the union of the labels of its sons, remove all the descendants of v and mark v with ‘!’

29
The Construction – Muller Automaton A Muller automaton is obtained by choosing the acceptance component as follows: A set S ⊆ Q of Safra trees is in the system F of final state sets if for some node v ∈ V the following holds: 1. Muller 1: v appears in all Safra trees of S, and 2. Muller 2: v is marked at least once in S.

30
The Construction – Rabin Automaton To obtain a Rabin automaton, one takes all pairs (E v, F v ), v ∈ V, as acceptance component, where 1. Rabin 1: E v consists of all Safra trees without a node v, and 2. Rabin 2: F v consists of all Safra trees with node v marked ‘!’.

31
The Construction - Running Example

32
Q’ consists of Safra Trees Before proving the Algorithm’s correctness, we need to prove that we are indeed getting a Muller/Rabin Automaton. For this, we need to prove that δ’(T, a) ∈ Q’. Step 1 -> Removing all the marks ‘!’ preserves the conditions 1 and 2.

33
Q’ consists of Safra Trees Step 2 may violate Condition 1 because if M ⊆ F, then the son has the same macrostate as the father. Step 3 (PowerSet) can violate even more: 1. Brothers may share a state q ∈ Q’. 2. The new computed macrostate can be an empty set. 3. The Union of brothers macrostates can be equal to the father’s macrostate.

34
Q’ consists of Safra Trees Step 4, Step 5, and Step 6 deal with these problems. 1. Step 4 ensures Condition 2 by horizontal merge of brother macrostates. 2. Step 5 removes nodes with empty macrostates. 3. By vertical merge Step 6 fixes situations where Condition 1 is violated. Thus, we finally obtain after all six steps a Safra tree.

35
Intuition behind Safra’s Construction The Safra’s construction uses three tricks. Trick 1: Initialize new runs of macrostates starting from recurring states. The idea behind this is to look at the paths which comes out from recurring states. This allows the construction of an accepting run of the original Automaton.

36
Intuition behind Safra’s Construction Trick 2: Keep track of joining runs of the nondeterministic Büchi automaton just once. Lets consider two finite runs: q 1 q 2... fq i... q j−1 q j... q n q n+1 and q’ 1 q’ 2... q’ i−1 q’ i... f’q’ j... q’ n q n+1 As we converge at the end into the same state, and we visited a recurring states in both the runs, then we don’t actually care which one of the recurring states states we visited when we get to q n+1, then we can merge the macrostates into one.

37
Intuition behind Safra’s Construction Trick 3: If all states in a macrostate have a recurring state as predecessor, delete the corresponding components. If there is some node where the union of all its sons’s macrostate is equal to its macrostate, it means that all the states in the macrostate have a recurring state as predecessor, which means that in the original run, each time before that we get to any of the states in the macrostate we must visit a recurring state.

38
Algorithm’s Correctness Let B = (Q, Σ, q I, δ, F) be a nondeterministic Büchi automaton. Let M = (Q’, Σ, q I ’, δ’, F’) be the deterministic Muller and R = (Q’, Σ, q I ’, δ’, Ω) be the deterministic Rabin automaton obtained by Safra’s construction. Then L(B) = L(M) = L(R).

39
Part 1 - Completeness We need to prove that L(B) ⊆ L(M) and L(B) ⊆ L(R). Let α ∈ L(B), we need to prove that α ∈ L(M) and α ∈ L(R); the initial state and the run ρ’ are the same on both the Automata. We will first prove there exists some node v in the tree of run ρ’ such that Claim 1: v – from a certain point on – is a node of all Safra trees in ρ’ and Claim 2: v is marked ‘!’ infinitely often.

40
Part 1 – Completeness for Muller If the claims hold then: Inf(ρ’) ∈ F. Indeed the Muller Conditions hold for v. Condition 1: It holds because a Safra tree of ρ’ not including v is not in Inf(ρ’) – because of Claim 1. v is marked ‘!’ infinitely often in ρ’ and Q’ is a finite set, therefore there exists some Safra tree in Inf(ρ’) with with v marked ‘!’. Therefore ρ’ is an accepting run for M which means that α ∈ L(M).

41
Part 1 – Completeness for Rabin Also, if the claims hold then: The Rabin Conditions hold for v. Inf(ρ’) ∩ E v = ∅ because of Claim 1 Inf(ρ’) ∩ Fv ≠ ∅ because of Claim 2 ρ’ is an accepting run of the deterministic Rabin automaton R, and we obtain α ∈ L(R).

42
Part 1 – Prove of the claims We will prove that there exists such a v on which both the claims hold. The root node respects Claim 1: α ∈ L(B), then there exists an accepting run ρ in the nondeterministic Büchi automaton B. Thus the root of all Safra trees occurring in the run is nonempty: the root macrostate of the i-th Safra tree in ρ’ includes ρ (i) and therefore cannot be removed in Step 5 of the Safra construction.

43
Part 1 – Prove of the claims If the root is marked with ‘!’ infinitely often we are done. Otherwise: Since ρ is an accepting run, there exists an state q ∈ Inf(ρ) ∩ F which occurs infinitely often in the root of the Trees of ρ’. Consider the run after the last occurrence ‘!’ on the root. Since q ∈ F, then it will be put in the root’s youngest son macrostate. After some finite eventual steps all the states of the run ρ will appear in some son of the root (it may be possible that it will be some older brother of this son).

44
Part 1 – Prove of the claims This son is the new candidate. It cannot be removed by step 5 because it is not empty as it will always carry the states of ρ. It cannot be removed by step 6 because it the root will not ever be marked by ‘!’ So it will appear in each tree of the run. If the son is marked with ‘!’ infinitely often then we are done – otherwise we will choose again one of its sons.

45
Part 1 – Prove of the claims We will eventually finish because the height of the Safra tree is finite. In addition to this, since α ∈ L(B), it means that the last son that we visited will always carry the states of ρ and in particular its macrostate will include a recurring state infinite times, and since it is the last son it will be marked by ‘!’ infinite times.

46
Part 2 - Soundness Lemma 1: Let R 0 …P 0 …R 1 !...R i ! a subrun of ρ’, such that F i = P i ∩ F. Then for all r ∈ R i, there exists some p ∈ R 0, such that in B moves with input u 1 v 1 … u i v i from p to r and it visits the recurring states at least i times.

47
Part 2 - Soundness Lemma 1: Let R 0 …P 0 …R 1 !...R i ! a subrun of ρ’, such that F i = P i ∩ F. Then for all r ∈ R i, there exists some p ∈ R 0, such that in B moves with input u 1 v 1 … u i v i from p to r and it visits the recurring states at least i times.

48
Part 2 - Soundness Lemma 2 (König’s Lemma): A finitely branching infinite tree contains an infinite path. Proof: We will define the path π inductively as following: for each v in π, v has infinitely many children. The root fulfills this by definition. Then, there must exists a son of the root which also fulfills this, as the tree is finitely branching.

49
Part 2 - Soundness Lemma 3: Let R 0 …R 1 !...R i !... as defined in Lemma 1. Then there is a successful run of B on u 1 v 1 u 2 v 2… beginning with state R 0. Proof: Lets look at the directed tree which has (q I, 0) as root, and where for each node (r, i) r ∈ R i and u 1 v 1 …u i v i leads from q I to R i. By the lemma, we know that for each r ∈ R i there exists some r’ ∈ R i-1 such that there is a path from r’ to r which visits a recurring state from P i. In this way we will chose the parent, among one of those states (and there is at least one).

50
Part 2 - Soundness The word ac(aac) ω leads to the following sequence of macrostates: S 0 = {q I }, S 3i+1 = {f}, i ≥ 0, S 3i+2 = {g}, i ≥ 0, and S 3i+3 = {f, g}, i ≥ 0.

51
Part 2 - Soundness This is a finitely branching infinite tree, and therefore there exists an infinite path π. In addition to this, the run on the path visits the same final state after each prefix u 1 v 1 …u i v i.

52
Part 2 – Soundness’s Proof If α ∈ L(M) or α ∈ L(R), there exists a node v such that from a certain point v appears in all Safra trees and in addition to that it is marked by ‘!’ infinite times. By the claims Therefore there exists some label R such that the label R! occurs infinite times in the run ρ’. By lemma 3 we get that there exists an accepting run ρ in the original automaton which means that α ∈ L(B).

53
Space complexity of Safra’s Costruction The number of possible Safra trees is 2 (nlog(n)) Let Q = {q 1, …, q n } Then in order to describe the Safra tree it is enough to say for each q i who is the node with the lowest level that has this node in its macrostate. Therefore this describes a function {q 1, …, q n } -> {0,1,..,2n}

54
Space complexity of Safra’s Costruction The parent relation is as well a function {0,1,..,2n} -> {0,1,..,2n}. The next older brother is as well a function {0,1,..,2n} -> {0,1,..,2n}. The mark ‘!’ is a function {0,1,..,2n} -> {0,1} = O({0,1,..,2n} -> {0,1,…2n}) Therefore we get that the number of combinations of such maps is bounder by (2n + 1) n+3*2n = (2n + 1) 7n = 2 log (2n + 1) ^ 7n = 2 7n * log (2n + 1) = 2 (nlog(n))

Similar presentations

© 2016 SlidePlayer.com Inc.

All rights reserved.

Ads by Google