Safra's Büchi determinization algorithm

Similar documents
Parallel Model Checking of ω-automata

Finite automata. We have looked at using Lex to build a scanner on the basis of regular expressions.

lec3:nondeterministic finite state automata

Implementation of Lexical Analysis

Model checking pushdown systems

Implementation of Lexical Analysis

Lecture 10: Nested Depth First Search, Counter- Example Generation Revisited, Bit-State Hashing, On-The-Fly Model Checking

Forms of Determinism for Automata

Formal Languages and Compilers Lecture IV: Regular Languages and Finite. Finite Automata

Implementation of Lexical Analysis

1. (10 points) Draw the state diagram of the DFA that recognizes the language over Σ = {0, 1}

Implementation of Lexical Analysis

Lexical Analysis - 2

Implementation of Lexical Analysis

Implementation of Lexical Analysis

Monitoring Interfaces for Faults

CS 310: State Transition Diagrams

Equivalence of NTMs and TMs

CSE450. Translation of Programming Languages. Lecture 20: Automata and Regular Expressions

T Reactive Systems: Kripke Structures and Automata

Compiler Construction

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2016

Symbolic Automata Library for Fast Prototyping

Timo Latvala. January 28, 2004

Automating Construction of Lexers

Lexical Analysis. Implementation: Finite Automata

CSE450. Translation of Programming Languages. Automata, Simple Language Design Principles

Theory of Computation Dr. Weiss Extra Practice Exam Solutions

Computer Sciences Department

CSE 105 THEORY OF COMPUTATION

CT32 COMPUTER NETWORKS DEC 2015

CS2 Language Processing note 3

Implementation of Lexical Analysis. Lecture 4

Lexical Analysis. Chapter 2

Regular Expression Constrained Sequence Alignment

Regular Languages and Regular Expressions

Variants of Turing Machines

(Refer Slide Time: 0:19)

Administrivia. Lexical Analysis. Lecture 2-4. Outline. The Structure of a Compiler. Informal sketch of lexical analysis. Issues in lexical analysis

Lexical Analysis. Lecture 3-4

Assignment 4 CSE 517: Natural Language Processing

Finite Automata Part Three

Last lecture CMSC330. This lecture. Finite Automata: States. Finite Automata. Implementing Regular Expressions. Languages. Regular expressions

Automata for XML A survey

Converting a DFA to a Regular Expression JP

A fuzzy subset of a set A is any mapping f : A [0, 1], where [0, 1] is the real unit closed interval. the degree of membership of x to f

Lexical Analysis. Lecture 2-4

Theory of Languages and Automata

Decidable Problems. We examine the problems for which there is an algorithm.

Communication Complexity and Parallel Computing

Finite Automata Part Three

Lexical Analysis. Finite Automata. (Part 2 of 2)

NFAs and Myhill-Nerode. CS154 Chris Pollett Feb. 22, 2006.

1 On the role of DFA and NFA, IMPORTANT TERMINOLOGY

CS21 Decidability and Tractability

ECS 120 Lesson 7 Regular Expressions, Pt. 1

Automatic synthesis of switching controllers for linear hybrid systems: Reachability control

Formal Methods for Software Development

Kinder, Gentler Nation

CS5371 Theory of Computation. Lecture 8: Automata Theory VI (PDA, PDA = CFG)


ALASKA Antichains for Logic, Automata and Symbolic Kripke structures Analysis

Foundations of Computer Science Spring Mathematical Preliminaries

Th(N, +) is decidable

Lecture 9: Reachability

FAdo: Interactive Tools for Learning Formal Computational Models

UNION-FREE DECOMPOSITION OF REGULAR LANGUAGES

6c Lecture 3 & 4: April 8 & 10, 2014

CS308 Compiler Principles Lexical Analyzer Li Jiang

LOGIC SYNTHESIS AND VERIFICATION ALGORITHMS. Gary D. Hachtel University of Colorado. Fabio Somenzi University of Colorado.

Finite Automata. Dr. Nadeem Akhtar. Assistant Professor Department of Computer Science & IT The Islamia University of Bahawalpur

G52LAC Languages and Computation Lecture 6

Introduction to Lexical Analysis

CMPSCI 250: Introduction to Computation. Lecture 20: Deterministic and Nondeterministic Finite Automata David Mix Barrington 16 April 2013

Compiler Construction

Lexical Analysis. Prof. James L. Frankel Harvard University

Module 6 Lexical Phase - RE to DFA

Tutorial. Question There are no forward edges. 4. For each back edge u, v, we have 0 d[v] d[u].

Web Service Interfaces

Slides for Faculty Oxford University Press All rights reserved.

Multi-way Search Trees. (Multi-way Search Trees) Data Structures and Programming Spring / 25

1. Draw the state graphs for the finite automata which accept sets of strings composed of zeros and ones which:

CSE 105 THEORY OF COMPUTATION

A counter-example to the minimal coverability tree algorithm

Data Structures and Algorithms (DSA) Course 9 Lists / Graphs / Trees. Iulian Năstac

TREES. Trees - Introduction

Automata & languages. A primer on the Theory of Computation. The imitation game (2014) Benedict Cumberbatch Alan Turing ( ) Laurent Vanbever

Rational subsets in HNN-extensions

Concurrent Models of Computation

Turing Machines. A transducer is a finite state machine (FST) whose output is a string and not just accept or reject.

Administrativia. Extra credit for bugs in project assignments. Building a Scanner. CS164, Fall Recall: The Structure of a Compiler

More on Polynomial Time and Space

Alpha-Beta Pruning in Mini-Max Algorithm An Optimized Approach for a Connect-4 Game

Automata-Theoretic LTL Model Checking. Emptiness of Büchi Automata

Timed Automata From Theory to Implementation

Multiple Choice Questions

CSE 105 THEORY OF COMPUTATION

Trees. Truong Tuan Anh CSE-HCMUT

Introduction to Embedded Systems

THEORY OF COMPUTATION

Transcription:

Safra's Büchi determinization algorithm Aditya Oak Seminar on Automata Theory 28 Jan 2016

Introduction Proposed by S. Safra in 1988 For determinization of non-deterministic Büchi automaton Gives equivalent Rabin or Muller automaton Involves construction of multiple powersets in a tree structure called as Safra Trees 2

Applying powerset construction to Büchi automaton(1) Fig. 1. Non-deterministic Büchi automaton Accepts a(aab) ω 3

Applying powerset construction to Büchi automaton(2) Fig. 2. Deterministic automaton after powerset construction Acceptance condition for accepting a(aab) ω? No Rabin acceptance condition is applicable. No accepting condition uniquely accepts the language. Hence classical powerset construction does not work in this scenario!!! 4

Intuition behind Safra's algorithm(1) Trick 1 : Initialize new runs of macrostates starting from recurring states [1, p. 47]. This allows the construction of an accepting run of the original automaton. A new component is added to Safra tree whenever recurring state occurs in a macrostate. Using this, we track the paths which traverse through recurring states. (Known as 'Branch Accepting') Fig. 3. Branch Accepting 5

Intuition behind Safra's algorithm(2) Trick 2 : Keep track of joining runs of the non-deterministic Büchi automaton just once [1, p. 47]. 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 Both runs are joining in state q n+1, after passing through a recurring state. Hence it is sufficient to continue with only one added component, second component can be removed as both the components hold the same information. (Known as 'Horizontal Merge') 6

Intuition behind Safra's algorithm(3) Trick 3 : If all states in a macrostate have a recurring state as predecessor, delete the corresponding components [1, p. 48]. When a node's label is equal to the union of the labels of its child nodes, then they all track the same run and hence all child nodes can be removed. (Known as 'Vertical Merge') 7

Safra Tree(1) Consists of nodes Safra trees form the states of resultant automaton Each node in a Safra tree has Name Unique number in a single tree ({1,...,2n}) (n number of states of original automaton) Label / Macrostate Set of states of original automaton Mark (!) - A Boolean (i.e. either a node is marked or unmarked) 8

Safra Tree(2) Safra Tree Nodes Labels {q 0, q 1, q 2 } 1 {q 0 } 2! {q 2 } 3 Names Mark Fig. 4. A Safra Tree 9

Safra Tree(3) States (Safra Trees) Fig. 5. Resultant deterministic Rabin or Muller automaton 10

Safra's Algorithm Nondeterministic Büchi Automaton (given) B = (Q, Σ, δ, q 0, F) Safra's Algorithm Rabin Automaton R = (S, Σ, δ', s 0, {(E 1,F 1 ),...,(E 2n,F 2n )}) 11

Safra's Algorithm computation of Rabin automaton parameters (1) Computation of initial state s 0 - Initial state s 0 is a Safra tree with single node having name 1 and label q 0 {q 0 } 1 Computation of S - Fig. 6. State s 0 S is set of all reachable Safra trees from initial Safra tree s 0 12

Safra's Algorithm computation of Rabin automaton parameters (2) Computation of δ' (transition function) - Every single transition in Rabin automaton is obtained using following six steps 1. Remove marks All the marks (!) in a Safra tree are removed. 2. Branch accepting For every node in a Safra tree, if label of a node contains at least one accepting state, then new youngest child node of this node is added with unique name. Label of this child node is set of accepting states in parent node. Fig. 7. Branch Accepting 13

Safra's Algorithm computation of Rabin automaton parameters (3) Computation of δ' (transition function) (cont.) - 3. Powerset construction Apply powerset construction on every node of Safra tree. 4. Horizontal merge If a particular state in a node's label is also present in the label of the node's older brother then that state is removed from the node's label and also from all its children. Fig. 8. Horizontal Merge 14

Safra's Algorithm computation of Rabin automaton parameters (4) Computation of δ' (transition function) (cont.) - 5. Remove empty nodes Nodes having empty labels are removed. 6. Vertical merge For every node whose label is equal to the union of the labels of its child nodes, all its child nodes are removed and node is marked with '!'. Fig. 9. Vertical Merge 15

Safra's Algorithm computation of Rabin automaton parameters (5) Computation of acceptance condition - For set of pairs {(E 1,F 1 ),...,(E 2n,F 2n )}, E i : Safra trees without node i (i is name of a node) F i : Safra trees with node i marked '!' 16

Safra's Algorithm Example Fig. 10. Büchi automaton Accepts finitely many as and infinitely many bs i.e. Σ * (b) ω 17

Safra's Algorithm computing s 0 Computation of initial state s 0 - Initial state s 0 is a Safra tree with single node having name 1 and label q 0 {q 0 } 1 Fig. 11. State s 0 18

Safra's Algorithm computing δ' Computation of δ' (s 0, a) - Rabin automaton parameters computed so far. Step 1) Remove marks No change Step 2) Branch accepting - No change s 0 Step 3) Powerset construction - In Büchi automaton δ(q 0, a) = q 0 Step 4) Horizontal merge No change Step 5) Remove empty nodes No change Step 6) Vertical merge No change Hence we have δ' (s 0, a) = s 0 19

Safra's Algorithm computing δ' Computation of δ' (s 0, b) - Step 1) Remove marks No change Step 2) Branch accepting No change Step 3) Powerset construction - Rabin automaton parameters computed so far. s 0 δ'(s 0, a) = s o In Büchi automaton δ(q 0, b) = {q 0, q 1 } Step 4) Horizontal merge No change Step 5) Remove empty nodes No change Step 6) Vertical merge No change New state obtained!!! Hence we have δ' (s 0, b) = s 1 20

Safra's Algorithm computing δ' Computation of δ' (s 1, a) - Rabin automaton parameters computed so far. Step 1) Remove marks No change Step 2) Branch accepting Applicable, as q 1 is an accepting state in original automaton, hence new child with unique name has to be added. s 0 δ'(s 0, a) = s o δ'(s 0, b) = s 1 s 1 Step 3) Powerset construction - 21

Safra's Algorithm computing δ' Computation of δ' (s 1, a) (cont.) - Step 4) Horizontal merge No change Step 5) Remove empty nodes Applicable, node 2 is removed Rabin automaton parameters computed so far. s 0 δ'(s 0, a) = s o δ'(s 0, b) = s 1 s 1 Step 6) Vertical merge No change Hence we have δ' (s 1, a) = s 0 22

Safra's Algorithm computing δ' Computation of δ' (s 1, b) - Rabin automaton parameters computed so far. Step 1) Remove marks No change Step 2) Branch accepting Applicable, as q 1 is an accepting state in original automaton, hence new child with unique name has to be added. s 0 δ'(s 0, a) = s o δ'(s 0, b) = s 1 s 1 δ'(s 1, a) = s o Step 3) Powerset construction - 23

Safra's Algorithm computing δ' Computation of δ' (s 1, b) (cont.) - Step 4) Horizontal merge No change Step 5) Remove empty nodes No change Step 6) Vertical merge No change New state obtained!!! Hence we have δ' (s 1, b) = s 2 Rabin automaton parameters computed so far. s 0 δ'(s 0, a) = s o δ'(s 0, b) = s 1 s 1 δ'(s 1, a) = s o 24

Safra's Algorithm computing δ' Computation of δ' (s 2, a) - After applying all the six steps again we get Rabin automaton parameters computed so far. δ' (s 2, a) = s 0 δ'(s 0, a) = s o s 0 δ'(s 0, b) = s 1 s 1 Computation of δ' (s 2, b) - δ'(s 1, a) = s o δ'(s 1, b) = s 2 After applying all the six steps again we get s 2 δ' (s 2, b) = s 3 Only difference between state s 2 and state s 3 is the marking of node 2. Therefore transitions from state s 3 are same as that from state s 2. 25

Safra's Algorithm computing δ' Therefore we get transitions and states of Rabin automaton as - δ'(s 0, a) = s o δ'(s 0, b) = s 1 δ'(s 1, a) = s o δ'(s 1, b) = s 2 δ'(s 2, a) = s 0 δ'(s 2, b) = s 3 δ'(s 3, a) = s 0 δ'(s 3, b) = s 3 26

Safra's Algorithm Acceptance condition Set of accepting pairs for Rabin automaton - (For set of pairs {(E 1,F 1 ),...,(E 2n,F 2n )}, E i : Safra trees without node i F i : Safra trees with node i marked '!' ) (E 1, F 1 ) = (ϕ, ϕ) as node 1 is present in all the states and it is never marked. (E 2, F 2 ) = ({s 0, s 1 }, {s 3 }) as node 2 is absent in states s 0 and s 1 and node is marked in state s 3. 27

Safra's Algorithm equivalent Rabin automaton Fig. 12. Equivalent Rabin automaton Accepts Σ * (b) ω 28

Safra's Algorithm Remarks State complexity - 2 O(n log n) (improved over previous complexities of ) Optimal for conversion into Rabin automaton Using this algorithm as an intermediate step, Büchi automaton can be complemented with same complexity which is also optimal. 2 2O(n) Fig. 13. Complementation steps Source : [2][5] 29

References 1. Gradel E., Thomas W., Wilke T. : Automata, logics, and infinite games : A guide to current research (2002) 2. Sadegh G. : Complementing Büchi Automata. https://www.lrde.epita.fr/~sadegh/buchi-complementation-techrep.pdf (2009) 3. Bienvenu M. : Automata on infinite words and trees. http://www.informatik.uni-bremen.de/tdki/lehre/ws09/automata/automata-notes.pdf (2010) 4. Safra S. : On the Complexity of ω Automata (1988) 5. Panigrahi D. : Complementing Büchi Automata : Safra's construction. http://www.powershow.com/view1/1eeb50-zdc1z/complementing_b_powerpoint_ppt_ presentation 6. K. Narayan Kumar : Safra's Determinization construction. http://www.cmi.ac.in/~kumar/words/lecture11.pdf 30