Omega Automata: Minimization and Learning 1



Similar documents
ω-automata Automata that accept (or reject) words of infinite length. Languages of infinite words appear:

Automata on Infinite Words and Trees

On Winning Conditions of High Borel Complexity in Pushdown Games

Formal Languages and Automata Theory - Regular Expressions and Finite Automata -

Regular Languages and Finite Automata

On Omega-Languages Defined by Mean-Payoff Conditions

Testing LTL Formula Translation into Büchi Automata

Automata and Formal Languages

Pushdown Automata. place the input head on the leftmost input symbol. while symbol read = b and pile contains discs advance head remove disc from pile

6.045: Automata, Computability, and Complexity Or, Great Ideas in Theoretical Computer Science Spring, Class 4 Nancy Lynch

The Halting Problem is Undecidable

Reading 13 : Finite State Automata and Regular Expressions

(IALC, Chapters 8 and 9) Introduction to Turing s life, Turing machines, universal machines, unsolvable problems.

SOLUTIONS TO ASSIGNMENT 1 MATH 576

Lecture 2: Universality

Informatique Fondamentale IMA S8

Representing Reversible Cellular Automata with Reversible Block Cellular Automata

Introduction to Automata Theory. Reading: Chapter 1

T Reactive Systems: Introduction and Finite State Automata

On strong fairness in UNITY

Regular Expressions and Automata using Haskell

Monitoring Metric First-order Temporal Properties

Follow links for Class Use and other Permissions. For more information send to:

The sample space for a pair of die rolls is the set. The sample space for a random number between 0 and 1 is the interval [0, 1].

I. GROUPS: BASIC DEFINITIONS AND EXAMPLES

CMPSCI 250: Introduction to Computation. Lecture #19: Regular Expressions and Their Languages David Mix Barrington 11 April 2013

The Ergodic Theorem and randomness

Techniques algébriques en calcul quantique

CS5236 Advanced Automata Theory

FUNCTIONAL ANALYSIS LECTURE NOTES: QUOTIENT SPACES

Turing Machines: An Introduction

Fundamentele Informatica II

Automata and Computability. Solutions to Exercises

Deterministic Finite Automata

University of Lille I PC first year list of exercises n 7. Review

Linear Algebra. A vector space (over R) is an ordered quadruple. such that V is a set; 0 V ; and the following eight axioms hold:

Notes on metric spaces

Reducing Clocks in Timed Automata while Preserving Bisimulation

1 Definition of a Turing machine

CSE 135: Introduction to Theory of Computation Decidability and Recognizability


An algorithmic classification of open surfaces

Extension of measure

The Optimum One-Pass Strategy for Juliet

Introduction to Topology

Regular Expressions with Nested Levels of Back Referencing Form a Hierarchy

Chapter 6: Episode discovery process

GENERATING SETS KEITH CONRAD

Left-Handed Completeness

CS 3719 (Theory of Computation and Algorithms) Lecture 4

Enforcing Security Policies. Rahul Gera

9 More on differentiation

Lights and Darks of the Star-Free Star

Verification of hybrid dynamical systems

1. Prove that the empty set is a subset of every set.

Galois representations with open image

Regular Languages and Finite State Machines

Matrix Representations of Linear Transformations and Changes of Coordinates

Tree sums and maximal connected I-spaces

MATH 304 Linear Algebra Lecture 9: Subspaces of vector spaces (continued). Span. Spanning set.

1 if 1 x 0 1 if 0 x 1

Turing Degrees and Definability of the Jump. Theodore A. Slaman. University of California, Berkeley. CJuly, 2005

Semantics of UML class diagrams

SOLUTIONS TO EXERCISES FOR. MATHEMATICS 205A Part 3. Spaces with special properties

CS103B Handout 17 Winter 2007 February 26, 2007 Languages and Regular Expressions

How To Solve The Stable Roommates Problem

Basic Set Theory. 1. Motivation. Fido Sue. Fred Aristotle Bob. LX Semantics I September 11, 2008

Metric Spaces Joseph Muscat 2003 (Last revised May 2009)

a 11 x 1 + a 12 x a 1n x n = b 1 a 21 x 1 + a 22 x a 2n x n = b 2.

MA651 Topology. Lecture 6. Separation Axioms.

Finite Automata. Reading: Chapter 2

University of Ostrava. Reasoning in Description Logic with Semantic Tableau Binary Trees

Non-deterministic Semantics and the Undecidability of Boolean BI

Software Model Checking: Theory and Practice

Lambda Calculus between Algebra and Topology. Antonino Salibra

INDISTINGUISHABILITY OF ABSOLUTELY CONTINUOUS AND SINGULAR DISTRIBUTIONS

Compiler Construction

Separation Properties for Locally Convex Cones

MASSACHUSETTS INSTITUTE OF TECHNOLOGY 6.436J/15.085J Fall 2008 Lecture 5 9/17/2008 RANDOM VARIABLES

Finite Automata. Reading: Chapter 2

3515ICT Theory of Computation Turing Machines

Just the Factors, Ma am

Semantics and Verification of Software

Learning Automata and Grammars

No: Bilkent University. Monotonic Extension. Farhad Husseinov. Discussion Papers. Department of Economics

December 4, 2013 MATH 171 BASIC LINEAR ALGEBRA B. KITCHENS

C H A P T E R Regular Expressions regular expression

Lecture Notes on Measure Theory and Functional Analysis

THEORY of COMPUTATION

k, then n = p2α 1 1 pα k

Transcription:

Omega Automata: Minimization and Learning 1 Oded Maler CNRS - VERIMAG Grenoble, France 2007 1 Joint work with A. Pnueli, late 80s

Summary Machine learning in general and of formal languages in particular States, minimization and learning in finitary automata Basics of ω-automata Why minimization/learning does not work for ω-languages in the general case A solution for the B B subclass Toward a general solution

Machine Learning Given a sample consisting of a set of pairs (x, f (x)) for some unknown function f Find a (representation of) a function f : X Y which is compatible with the sample

Machine Learning Given a sample consisting of a set of pairs (x, f (x)) for some unknown function f Find a (representation of) a function f : X Y which is compatible with the sample Many issues and variations: Validity of inductive inference Static or dynamic sampling Passive or active sampling - can we influence the choice of examples Evaluation criteria: identification in the limit, probabilities, etc.

Learning Formal Languages For sets of sequences (languages) L Σ, we want to learn the characteristic function χ L : Σ {0, 1} The sample elements are of the form (u, χ L (u)) The goal is to find a representation (say, automaton) compatible with the sample

Learning Formal Languages For sets of sequences (languages) L Σ, we want to learn the characteristic function χ L : Σ {0, 1} The sample elements are of the form (u, χ L (u)) The goal is to find a representation (say, automaton) compatible with the sample The problem was first posed in Moore 56: Gedanken experiments on sequential machines It was solved in Gold 72: System identification via state characterization Various complexity issues concerning the number of examples as a function of the number of states (Gold, Trakhtenbrot and Barzdins, Angluin)

Regular Sets and their Syntactic Congruences With every L Σ we can define the following equivalence relation u L v iff w Σ u w L v w L Two prefixes are equivalent if they accept the same suffixes

Regular Sets and their Syntactic Congruences With every L Σ we can define the following equivalence relation u L v iff w Σ u w L v w L Two prefixes are equivalent if they accept the same suffixes This relation is a right-congruence with respect to concatenation: u v implies u w v w for all u, v, w Σ

Regular Sets and their Syntactic Congruences With every L Σ we can define the following equivalence relation u L v iff w Σ u w L v w L Two prefixes are equivalent if they accept the same suffixes This relation is a right-congruence with respect to concatenation: u v implies u w v w for all u, v, w Σ Myhill-Nerode theorem: a language L is accepted by a finite automaton iff L has finitely many congruence classes This relation is sometimes called the syntactic congruence associated with L

The minimal Automaton Let Σ / be the quotient of Σ by, that is the set of its equivalence classes and let [u] denote the equivalence class of u The minimal automaton for L is A L = (Σ, Q, q 0, δ, F) where The states are the -classes: Q = Σ / Ther initial state is the class of the empty word: q0 = [ε] Transition function: δ([u],a) = [u a] Accepting states are those that accept the empty word: F = {[u] : u ε L}

The minimal Automaton Let Σ / be the quotient of Σ by, that is the set of its equivalence classes and let [u] denote the equivalence class of u The minimal automaton for L is A L = (Σ, Q, q 0, δ, F) where The states are the -classes: Q = Σ / Ther initial state is the class of the empty word: q0 = [ε] Transition function: δ([u],a) = [u a] Accepting states are those that accept the empty word: F = {[u] : u ε L} This is canonical representation of L based on its I/O semantics A L is homomorphic to any other automaton accepting L

Observation Tables (Gold 1972) Given a language L, imagine an infinite two-dimensional table The rows of the table are indexed by all elements of Σ The columns of the table are indexed by all elements of Σ Each entry u, v in the table indicates whether u v L (whether after reading prefix u we accept v)

Observation Tables (Gold 1972) Given a language L, imagine an infinite two-dimensional table The rows of the table are indexed by all elements of Σ The columns of the table are indexed by all elements of Σ Each entry u, v in the table indicates whether u v L (whether after reading prefix u we accept v) For finite automata, according to Myhill-Nerode, there will be only finitely-many distinct rows (and columns) It is sufficient to use tables over Σ n Σ n

Example b a a a b b ε a b aa ab ba bb ε + a + + b + aa + ab + + + + ba + + bb + aba + + + + abb + + ε b aa a ba abb ab aba

A Sufficient Sample to Characterize the Automaton b a a a b b E ε a b ε S a + ab + + b S Σ aa S aba + + abb +

A Sufficient Sample to Characterize the Automaton b a a a b b E ε a b ε S a + ab + + b S Σ aa S aba + + abb + The states of the canonical automaton are S = {[ε], [a] and [ab]}

A Sufficient Sample to Characterize the Automaton b a a a b b E ε a b ε S a + ab + + b S Σ aa S aba + + abb + The states of the canonical automaton are S = {[ε], [a] and [ab]} The words/paths correspond to a spanning tree Elements of S Σ S correspond to cross- and back-edges in the spanning tree

Angluin s L Algorithm An incremental algorithm to construct the table based on two sources of information: Membership query Member(u)? where the learner asks whether u L Equivalence query Equiv(A) where the learner asks whether automaton A is the (minimal) automaton for L The answer is either yes or a counter-example

Angluin s L Algorithm An incremental algorithm to construct the table based on two sources of information: Membership query Member(u)? where the learner asks whether u L Equivalence query Equiv(A) where the learner asks whether automaton A is the (minimal) automaton for L The answer is either yes or a counter-example The learner asks membership queries until it can build an automaton

Angluin s L Algorithm An incremental algorithm to construct the table based on two sources of information: Membership query Member(u)? where the learner asks whether u L Equivalence query Equiv(A) where the learner asks whether automaton A is the (minimal) automaton for L The answer is either yes or a counter-example The learner asks membership queries until it can build an automaton Then it asks an equivalence query and if there is a counter-example it adds its suffixes to the columns, thus discovering new states and so on

Angluin s L Algorithm An incremental algorithm to construct the table based on two sources of information: Membership query Member(u)? where the learner asks whether u L Equivalence query Equiv(A) where the learner asks whether automaton A is the (minimal) automaton for L The answer is either yes or a counter-example The learner asks membership queries until it can build an automaton Then it asks an equivalence query and if there is a counter-example it adds its suffixes to the columns, thus discovering new states and so on Polynomial in the number of states

ω-languages Let Σ ω be the set of all infinite sequences over Σ An ω-language is a subset L Σ ω The ω-regular sets can be written as a finite union of sets of the form U V ω with U and V finitary regular sets Every non-empty ω-regular set contains an ultimately-periodic sequence of the form u v ω

Acceptance of ω-languages by ω-automata Consider a deterministic automaton (Σ, Q, δ, q 0 ) When an infinite word u is read by the automaton it induces an infinite run, an infinite sequence of states This run is summarized by Inf (u), the set of states visited infinitely-often by the run

Acceptance of ω-languages by ω-automata Consider a deterministic automaton (Σ, Q, δ, q 0 ) When an infinite word u is read by the automaton it induces an infinite run, an infinite sequence of states This run is summarized by Inf (u), the set of states visited infinitely-often by the run Muller acceptance condition: a set of subsets F 2 Q An infinite word u is accepted if Inf (u) = F F

Subclasses of ω-regular Sets If we restrict the structure of the accepting subsets F we obtain interesting subclasses of languages For example, the class B of languages accepted by deterministic Buchi automata Here we define a set F of accepting states and u is accepted if Inf (u) F This amounts to saying that F consists of all elements of 2 Q that contain elements of F (F is upward closed)

Subclasses of ω-regular Sets If we restrict the structure of the accepting subsets F we obtain interesting subclasses of languages For example, the class B of languages accepted by deterministic Buchi automata Here we define a set F of accepting states and u is accepted if Inf (u) F This amounts to saying that F consists of all elements of 2 Q that contain elements of F (F is upward closed) An infinite word u is in the complement L if Inf (u) F = or equivalently Inf (u) Q F This is called co-buchi condition and the class is denoted by B

The Class B B Languages that belong to both classes can be accepted by automata whose accepting set F admits a special structure In such automata, all cycles that belong to the same SCC are either accepting or rejecting

The Class B B Languages that belong to both classes can be accepted by automata whose accepting set F admits a special structure In such automata, all cycles that belong to the same SCC are either accepting or rejecting + + Inf (u) F iff Inf (u) Q F =

Learning ω-regular Sets First problem: how do you present examples which are infinite sequences? Solution: use ultimately-periodic words u v ω

Learning ω-regular Sets First problem: how do you present examples which are infinite sequences? Solution: use ultimately-periodic words u v ω My first lemma in life: if L L then there is α = u v ω that distinguishes between L and L

Learning ω-regular Sets First problem: how do you present examples which are infinite sequences? Solution: use ultimately-periodic words u v ω My first lemma in life: if L L then there is α = u v ω that distinguishes between L and L So now we can think of building tables where rows are words and columns are (ultimately-periodic) ω-words and entries tell us whether u α L But it is not that simple

The Problem Consider the language L = (0 + 1) 1 ω The observation table for this language looks like this 0 ω 1 ω 0 1 ω 1 0 ω (01) ω ε + + 0 + + 1 + +

The Problem Consider the language L = (0 + 1) 1 ω The observation table for this language looks like this 0 ω 1 ω 0 1 ω 1 0 ω (01) ω ε + + 0 + + 1 + + All prefixes accept the same language The Nerode congruence corresponds to a one-state automaton that, obviously, cannot accept L Already observed by Trakhtenbrot: in general ω-languages cannot be recognized by an automaton isomorphic to their Nerode congruence

No Canonical Minimal Automaton The language L = (0 + 1) 1 ω can be accepted by various 2-state automata, not related by homomorphism 1 1 0 1 0 1 0 0 1 0,1 0

Partial Solution Result by Staiger: languages in B B can be recognized by their Nerode congruence

Partial Solution Result by Staiger: languages in B B can be recognized by their Nerode congruence General culture: if we consider Cantor topology on infinite sequences The class B B correspond to the class F σ G δ in the Borel hierarchy Such sets can written as Countable unions of closed sets Countable intersections of open sets

Partial Solution Result by Staiger: languages in B B can be recognized by their Nerode congruence General culture: if we consider Cantor topology on infinite sequences The class B B correspond to the class F σ G δ in the Borel hierarchy Such sets can written as Countable unions of closed sets Countable intersections of open sets We adapt Angluin s algorithm to this class

Algorithm L ω : Sketch Two phases: Ask queries until you can build a transition graph for the Nerode congruence (similar to L ) Try to define a B B acceptance condition

Algorithm L ω : Sketch Two phases: Ask queries until you can build a transition graph for the Nerode congruence (similar to L ) Try to define a B B acceptance condition In finitary languages acceptance status for a state is determined according to whether it accepts the empty word For ω-languages not all cycles in the automaton are exercised infinitely-often by the sample

Algorithm L ω : Sketch Two phases: Ask queries until you can build a transition graph for the Nerode congruence (similar to L ) Try to define a B B acceptance condition In finitary languages acceptance status for a state is determined according to whether it accepts the empty word For ω-languages not all cycles in the automaton are exercised infinitely-often by the sample We try to mark SCCs as accepting or rejecting in a way consistet with the sample, but we may have a conflict: s x ω L and s z y ω L. This requires more queries s x + s z w t y

Example: Learn L = (01) (10) ω Initial table is trivial, we conjecture L = 0 ω 1 ω ε 0 1

Example: Learn L = (01) (10) ω Initial table is trivial, we conjecture L = 0 ω 1 ω ε 0 1 We get a positive counter example +(10) ω We add the suffixes (01) ω and (10) ω to the columns and discover states 0 and 1 0 ω 1 ω (01) ω (10) ω ε + 0 1 + 00 01 + 10 + 11

Example: Learn L = (01) (10) ω ε 0 ω 1 ω (01) ω (10) ω ε + 0 1 + 00 01 + 10 + 11 0 0 0 1 1 0 1 1 + The transition graph cannot be marked consistently for acceptance because (10) ω L and (01) ω L

Example: Learn L = (01) (10) ω ε 0 ω 1 ω (01) ω (10) ω ε + 0 1 + 00 01 + 10 + 11 0 0 0 1 1 0 1 1 + The transition graph cannot be marked consistently for acceptance because (10) ω L and (01) ω L The conflict detection procedure returns the word 01(10) ω which is added together with its suffix 1(10) ω to E leading to the discovery of 2 additional states

Example: Learn L = (01) (10) ω 0 ω 1 ω (01) ω (10) ω 1(10) ω 01(10) ω λ + + 0 + 1 + 00 10 + 01 + + 11 000 001 100 101 + 0, 1 00 0 0 0 1 0 ε 1 1 10 1 0 1 The final table defines an automaton whose three maximal SCCs can be marked uniformly as accepting of rejecting This is the minimal automaton for L

Conclusions and Perspectives We extended learning to a subclass of ω-regular sets

Conclusions and Perspectives We extended learning to a subclass of ω-regular sets States in ω-automata have an additional infinitary role A more refined (two-sided) congruence relation was suggested by Arnold as a canonical object associated with an ω-language: (xuyz ω L xvyz ω L) u L v iff x, y, z Σ (x(yuz) ω L x(yvz) ω L)

Conclusions and Perspectives We extended learning to a subclass of ω-regular sets States in ω-automata have an additional infinitary role A more refined (two-sided) congruence relation was suggested by Arnold as a canonical object associated with an ω-language: (xuyz ω L xvyz ω L) u L v iff x, y, z Σ (x(yuz) ω L x(yvz) ω L) In [Maler Staiger 97] we proposed a smaller object, a family of right-congruences, which can, in principle, be used for learning using 3-dimensional observation tables