Génération aléatoire uniforme pour les réseaux d automates

Similar documents
Petri Nets. Rebecca Albrecht. Seminar: Automata Theory Chair of Software Engeneering

Technische Universität München Winter term 2009/10 I7 Prof. J. Esparza / J. Křetínský / M. Luttenberger 11. Februar Solution

Nondeterministic Automata vs Deterministic Automata

Chapter 2 Finite Automata

Project 6: Minigoals Towards Simplifying and Rewriting Expressions

NON-DETERMINISTIC FSA

Lecture Notes No. 10

Deterministic Finite Automata

Nondeterminism and Nodeterministic Automata

State Complexity of Union and Intersection of Binary Suffix-Free Languages

The Value 1 Problem for Probabilistic Automata

Chapter 4 State-Space Planning

First Midterm Examination

CS311 Computational Structures Regular Languages and Regular Grammars. Lecture 6

CS 573 Automata Theory and Formal Languages

Regular expressions, Finite Automata, transition graphs are all the same!!

Learning Partially Observable Markov Models from First Passage Times

12.1 Nondeterminism Nondeterministic Finite Automata. a a b ε. CS125 Lecture 12 Fall 2014

Intermediate Math Circles Wednesday, November 14, 2018 Finite Automata II. Nickolas Rollick a b b. a b 4

CS103B Handout 18 Winter 2007 February 28, 2007 Finite Automata

Hybrid Systems Modeling, Analysis and Control

12.1 Nondeterminism Nondeterministic Finite Automata. a a b ε. CS125 Lecture 12 Fall 2016

1. For each of the following theorems, give a two or three sentence sketch of how the proof goes or why it is not true.

Synchronizing Automata with Random Inputs

Coalgebra, Lecture 15: Equations for Deterministic Automata

Non Deterministic Automata. Linz: Nondeterministic Finite Accepters, page 51

Linear Algebra Introduction

Finite State Automata and Determinisation

Pre-Lie algebras, rooted trees and related algebraic structures

Lecture 08: Feb. 08, 2019

Formal Languages and Automata

CS415 Compilers. Lexical Analysis and. These slides are based on slides copyrighted by Keith Cooper, Ken Kennedy & Linda Torczon at Rice University

Propositional models. Historical models of computation. Application: binary addition. Boolean functions. Implementation using switches.

Formal Methods in Software Engineering

First Midterm Examination

Prefix-Free Regular-Expression Matching

Non Deterministic Automata. Formal Languages and Automata - Yonsei CS 1

Matrices SCHOOL OF ENGINEERING & BUILT ENVIRONMENT. Mathematics (c) 1. Definition of a Matrix

Automatic Synthesis of New Behaviors from a Library of Available Behaviors

Lexical Analysis Finite Automate

The University of Nottingham SCHOOL OF COMPUTER SCIENCE A LEVEL 2 MODULE, SPRING SEMESTER MACHINES AND THEIR LANGUAGES ANSWERS

System Validation (IN4387) November 2, 2012, 14:00-17:00

Minimal DFA. minimal DFA for L starting from any other

Non-Deterministic Finite Automata. Fall 2018 Costas Busch - RPI 1

Bisimulation, Games & Hennessy Milner logic

Ch. 2.3 Counting Sample Points. Cardinality of a Set

Grammar. Languages. Content 5/10/16. Automata and Languages. Regular Languages. Regular Languages

Finite Automata. Informatics 2A: Lecture 3. John Longley. 22 September School of Informatics University of Edinburgh

Automata Theory 101. Introduction. Outline. Introduction Finite Automata Regular Expressions ω-automata. Ralf Huuck.

Anatomy of a Deterministic Finite Automaton. Deterministic Finite Automata. A machine so simple that you can understand it in less than one minute

Nondeterministic Finite Automata

Bayesian Networks: Approximate Inference

GRAND PLAN. Visualizing Quaternions. I: Fundamentals of Quaternions. Andrew J. Hanson. II: Visualizing Quaternion Geometry. III: Quaternion Frames

Chapter Five: Nondeterministic Finite Automata. Formal Language, chapter 5, slide 1

Learning Moore Machines from Input-Output Traces

CSE 332. Sorting. Data Abstractions. CSE 332: Data Abstractions. QuickSort Cutoff 1. Where We Are 2. Bounding The MAXIMUM Problem 4

Data Structures and Algorithm. Xiaoqing Zheng

Automata and Languages

Unfoldings of Networks of Timed Automata

Behavior Composition in the Presence of Failure

On Determinisation of History-Deterministic Automata.

Homework 3 Solutions

Test Generation from Timed Input Output Automata

Finite Automata-cont d

CMPSCI 250: Introduction to Computation. Lecture #31: What DFA s Can and Can t Do David Mix Barrington 9 April 2014

A Symbolic Approach to Control via Approximate Bisimulations

Theory of Computation Regular Languages. (NTU EE) Regular Languages Fall / 38

More on automata. Michael George. March 24 April 7, 2014

Chapter Gauss Quadrature Rule of Integration

Linear Systems with Constant Coefficients

Lecture 6: Coding theory

#A42 INTEGERS 11 (2011) ON THE CONDITIONED BINOMIAL COEFFICIENTS

Regular Languages and Applications

Logic Synthesis and Verification

Electromagnetism Notes, NYU Spring 2018

Running an NFA & the subset algorithm (NFA->DFA) CS 350 Fall 2018 gilray.org/classes/fall2018/cs350/

Introduction to Olympiad Inequalities

Abstraction of Nondeterministic Automata Rong Su

Finite Automata. Informatics 2A: Lecture 3. Mary Cryan. 21 September School of Informatics University of Edinburgh

Can one hear the shape of a drum?

Lecture 09: Myhill-Nerode Theorem

CSCI 340: Computational Models. Kleene s Theorem. Department of Computer Science

Assignment 1 Automata, Languages, and Computability. 1 Finite State Automata and Regular Languages

Formal Language and Automata Theory (CS21004)

Theory of Computation Regular Languages

Graph States EPIT Mehdi Mhalla (Calgary, Canada) Simon Perdrix (Grenoble, France)

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018

Tutorial Automata and formal Languages

a,b a 1 a 2 a 3 a,b 1 a,b a,b 2 3 a,b a,b a 2 a,b CS Determinisitic Finite Automata 1

Random subgroups of a free group

Revision Sheet. (a) Give a regular expression for each of the following languages:

CHAPTER 1 Regular Languages. Contents

A negative answer to a question of Wilke on varieties of!-languages

1 Nondeterministic Finite Automata

1 PYTHAGORAS THEOREM 1. Given a right angled triangle, the square of the hypotenuse is equal to the sum of the squares of the other two sides.

Myhill-Nerode Theorem

Java II Finite Automata I

Computing with finite semigroups: part I

Lecture 6 Regular Grammars

Languages & Automata

Transcription:

Génértion létoire uniforme pour les réseux d utomtes Niols Bsset (Trvil ommun ve Mihèle Sori et Jen Miresse) Université lire de Bruxelles Journées Alé 2017 1/25

Motivtions (1/2) p q Automt re omni-present in omputer siene. Given regulr lnguge, it is nturl to sk wht does typil word of fixed length n look like? wht does n infinite typil word look like? The literture provides nswer sed on Uniform smpling (from omintoris); Mximl entropy mesure (from informtion & ergodi theory) when deterministi finite stte utomton (DFA) reognising the lnguge is provided. These methods re polynomil in the size of the given DFA. 2/25

Motivtions (2/2) Automt in verifition of onurrent systems Computtionl systems (softwre or hrdwre) re often omposed of severl omponents tht intert together; Networks of utomt re n elegnt nd useful frmework to model onurrent systems; The ssoited produt utomton A = A 1 A K is of exponentil size A = A 1 A K. In this tlk we will see how to do uniform smpling of words of given length; smpling ording to the mximl entropy mesure; for network of DFAs in ompositionl fshion. A previous work on the sujet y [Denise et l., STTT 2012] gives pplitions to model sed testing. 3/25

Monolithi methods of smpling for single DFA ( rep) Compositionl methods of smpling for Network of DFAs Conlusion nd perspetive 4/25

Uniform smpling of words of n utomton (1/3). Fixed length. Reursive Method. 1 5/8 3/8 p q 5/8 3/8 3/5 2/5 1 3/8 2/8 3/8 2/3 1/3 1 2/3 1/3 2/8 1/8 2/8 2/8 1/8 1/2 1/2 1 1/2 1/2 1/2 1/2 1 1/8 1/8 1/8 1/8 1/8 1/8 1/8 1/8 Lnguges L p,k Crdinlities L p,k Proilities p k (p q) = L q,n k L p,n k+1 ( Lp,k L q,k L p,k = L p,k 1 L q,k 1 ; L q,k = L p,k 1. L p,k = L p,k 1 + L q,k 1 ; L q,k = L p,k 1. ) ( ) ( ) Lp,k 1 = M = M k 1 with M = L q,k 1 1 ( 1 1 1 0 ). 5/25

Uniform smpling of words of n utomton (2/3). Rndom length. Boltzmnn Smpling [Duhon, Fljolet, Louhrd, Sheffer, ICALP 02]. z, z 2, p q 1 z z 2, ε STOP z 1 z 2, 1 z 1 z 2, ε Generting funtion : L p(z) = w L p z w = 1 1 z z 2 with z < 1 φ. Pro of word w : Pro(w) = z w L p(z). Lnguges L p Generting funtions L p(z) Proilities p z() = z Lq(z) L p(z) L p = L p L q {ε}; L q = L p {ε}. L p (z) = zl p (z)+zl q (z)+1; L q (z) = zl p (z)+1. L(z) = zml(z)+1 F ; L(z) = (I zm) 1 1 F. 6/25

Uniform smpling of words of n utomton (3/3). Infinite length. Prry smpling. 1 φ, 1 φ 2, p q 1, For strongly onneted utomton. Defined y Shnnon, known s Prry mesure in ergodi theory. Here, we ll it Boltzmnn riti. ω-regulr Lnguges L p,ω Perron eigenvetor v Proilities p 1 ρ () = vq ρv p L p,ω = L p,ω L q,ω ; L q,ω = L p,ω. ρv p = v p +v q ; ρv q = v p ve ρ v.p. mximle. ρv = Mv. 7/25

Monolithi methods of smpling for single DFA ( rep) Compositionl methods of smpling for Network of DFAs Conlusion nd perspetive 8/25

Network of DFAs A network of three DFAs with shred tions {,}, β 1 2 1 1 2, d 3 2 γ 3 Exmple of words reognised: γd 9/25

Network of DFAs A network of three DFAs with shred tions {,}, β 1 2 1 1 2, d 3 2 γ 3 Exmple of words reognised: γd 9/25

Network of DFAs A network of three DFAs with shred tions {,}, β 1 2 1 1 2, d 3 2 γ 3 Exmple of words reognised: γd 9/25

Network of DFAs A network of three DFAs with shred tions {,}, β 1 2 1 1 2, d 3 2 γ 3 Exmple of words reognised: γd 9/25

Network of DFAs A network of three DFAs with shred tions {,}, β 1 2 1 1 2, d 3 2 γ 3 Exmple of words reognised: γd 9/25

Network of DFAs A network of three DFAs with shred tions {,}, β 1 2 1 1 2, d 3 2 γ 3 Exmple of words reognised: γd 9/25

Network of DFAs A network of three DFAs with shred tions {,}, β 1 2 1 1 2, d 3 2 γ 3 Exmple of words reognised: γd β The produt DFA: 211 111 112, 212 313 d 311 221 121 321 122 222 γ 323 d 9/25

The esy se: no shred tion Lnguge of the produt = shuffle of lnguges. L(A (1) A (K) ) = L(A (1) ) L(A (K) ) Shuffle of lnguges Shuffle of words d = {d,d,d,d,d} Shuffle of two lnguges: L (1) L (2) = w (1) w (2) (w (1),w (2) ) L (1) L (2) Nturlly extends to K lnguges. 10/25

Computing the rdinlities of shuffle of lnguges For the shuffle of two lnguges n (L L ) n = k=0 ( n k ) L k L n k. (1) For the shuffle of K lnguges L = L (1) L (K) Do not use L n = n (1) + +n (K) =n ( ) n n (1),...,n (K) L (1) L (K) n (1) n (K) There re exponentilly mny oeffiients! Insted pply eqution (1) K 1 times L = (...((L (1) L (2) ) L (3) ) ) L (K). This n e trnsformed into reursive method of smpling for L = L (1) L (K). 11/25

Generting funtions for shuffle of lnguges Exponentil generting funtions ˆL(z) = n N L n z n /n! Exponentil Boltzmnn mesure ˆµ z (w) = z w w!ˆl(z) Given L = L (1) L (K), L(z) = + 0 e uˆl(zu)du ˆL(z) = ˆL (1) (z) ˆL (K) (z) Boltzmnn smpler of prmeter z for L Choose u ording to weight funtion: u e uˆl(zu) = e u K i=1 ˆL (i) (zu); For i = 1 to K, let w (i) e hosen using n exponentil Boltzmnn smpler of prmeter zu for L (i). Return word uniformly t rndom in w (1) w (K) 12/25

Shnnon Prry-Mrkov hin for the shuffle of lnguges Rep of the definition P(p q) = v q /(ρv p ) with Mv = ρv Lemm Let A = A (1) A (K) e the produt of K strongly onneted DFAs without synhronistion. Then ρ = n i=1 ρ(i), v s = K i=1 v(i). s (i) The smpling ording to the Shnnon-Prry Mrkov hin Repet forever the following: With proility ρ (i) /ρ mke one step (s (i),,t (i) ) of the Shnnon-Prry Mrkov hin numer i, write on the output tpe; 13/25

Diffiulties ome from synhronistion Rep no shred tions=shuffle of lnguges=everything is esy; All letters shred Lnguge of the produt = intersetion of lnguges : L(A (1) A (K) ) = L(A (1) ) L(A (K) ) L(A (1) ) L(A (K) )? = is PSPACE-omplete prolem. In our frmework We introdue the redued utomton: It keeps only the synhronised prt of the produt utomton (the true diffiulty tht needs sequentil resoning). The non-synhronised prt is projeted out (esy to tret y omining independent lol works). 14/25

The redued utomton The redued utomton of DFA A = (Q,Σ,ι,F,δ) is finite utomton A red = (Q red,σ red,ι red,f red, red) suh tht Q red Q re sttes ourring just fter shred tion + initil stte ι; Σ red set of shred tion; ι red = ι (sme initil stte); Finl sttes F red irrelevnt red = {(s,,t) s u t for some u (Σ\Σ red) } β 211 111 112, 212 313 d 311 111 β γ 112 323 221 121 321 122 222 γ 323 311 313 d Do not ompute A red from the produt DFA A = A 1 A K ut use A red = A 1 red AK red. 15/25

Lnguges ssoited to the redued utomton Given DFA A nd its redued utomton A red. L s : lnguge from stte s without shred tion. L δ = {u (Σ\Σ red ) s u t}, for δ = (s,,t) red These lnguge re otined y modifying slightly the utomton. Exmple L 111 nd L (112,γ,323) β 211 111 112, 212 313 d 311 111 β γ 112 323 221 121 321 122 222 γ 323 311 313 d In ft, ompute everything lolly nd use shuffle of lnguges: L (112,γ,323) = L (1) (1,γ,3) L (2) (1,γ,2) L (3) (3,γ,3) = () ε. 16/25

Equtions on lnguges relted to the redued utomton Theorem: Equtions on lnguges L s = L s L δ L t δ=(s,,t) red L s = K i=1 L (i) s (i) ; L δ = K i=1l (i) δ (i) Our generi reipe to rndomly generte word w L s Choose whether synhronistion will our or not; if not hoose w L s = K (i) i=1 L ; otherwise s (i) hoose δ = (s,,t) red ; hoose u L δ = K i=1 L(i) δ (i) ; write u nd repet from t to generte the rest of the word. 17/25

Our generi reipe to rndomly generte word w L s,n (1/3) Fixed length uniform smpling 1. Choose whether synhronistion will our or not; No synhronistion with proility L s,n / L s,n. if not hoose w L s = K (i) i=1 L ; otherwise s (i) 2. hoose δ = (s,,t) red ; hoose the length m with weight δ=(s,,t) red L δ,m 1 n m=1 δ=(s,,t) red L δ,m 1 ; hoose δ = (s,,t) red with weight L δ,m 1 δ =(s,,t ) L δ,m 1 ; 3. hoose u L δ,m 1 = K i=1 L(i) δ (i),m 1 ; 4. write u nd repet from t to generte the rest of the word of length n m. 18/25

Our generi reipe to rndomly generte word w L s (2/3) Boltzmnn smpling Rep: L s (z) = L s (z)+z L δ (z)l t (z). (2) δ=(s,,t) red 1. Choose whether synhronistion will our or not; No synhronistion with proility L s (z)/l s (z). if not hoose w L s = K (i) i=1 L using Boltzmnn smpling s (i) with prmeter z; otherwise 2. hoose δ = (s,,t) red with proility L δ (z)l t (z) δ =(s,,t ) red L δ (z)l t (z) 3. hoose u L δ = K i=1 L(i) δ (i) with proility z u /L δ (z) using Boltzmnn smpling with prmeter z; 4. write u nd repet from t to generte the rest of the word. 19/25

Our generi reipe to rndomly generte word w L s,ω (3/3) Prry smpling Assume the produt utomton is strongly onneted nd let v 0 nd ρ suh tht Mv = ρv. 1. A synhronistion ours in the future with proility 1; 2. hoose δ = (s,,t) red with proility L δ (1/ρ) v t ρv s 3. hoose u L δ = K i=1 L(i) δ (i) with proility 1 ρ u L δ (1/ρ) using Boltzmnn smpling with prmeter 1/ρ; 4. write u nd repet from t to generte the rest of the word. 20/25

Chrteristion of the generting funtions in the redued utomton Rep equtions on lnguges: L s = L s L δ L t (3) δ=(s,,t) red Theorem: Equtions on generting funtions L s (z) = L s (z)+z L δ (z)l t (z) δ=(s,,t) red In mtrix form Let M(z) e the Q red Q red mtrix defined y M s,t (z) = δ=(s,,t) red L δ (z) (4) L(z) = L(z)+zM(z)L(z); then L(z) = (I zm(z)) 1 L(z) (5) 21/25

Computing rdinlities for ll lnguges Let n e the length of words to smple. Lnguges without synhronistion ( L s,m ) m n,s Qred nd ( L δ,m ) m n,δ red See efore, shuffle of lnguges. Polynomil in n nd K. Lnguges with synhronistions ( L s,m ) m n,s Qred Write L s (z) mod z n+1 = n m=0 L s,m z m nd M s,t (z) mod z n+1 = n m=0 δ=(s,,t) red L δ,m z m Find L(z) mod z n+1 y tking ll opertions modulo z n+1 in Polynomil in n nd A red. L(z) = (I zm(z)) 1 L(z). 22/25

A Perron Froenius Theorem for the redued utomton Let A e produt utomton tht is strongly onneted nd A red its redued utomton. Spetrl ttriutes of the mtrix M(z) Given λ C nd v 0. If M(1/λ)v = λv then λ is lled redued eigenvlue nd v redued eigenvetor. Theorem Existene of ρ nd v red : There exists redued eigenvlue ρ > 0 suh tht λ ρ for every redued eigenvlue λ. There exists unique v red 0 (up to multiplitive onstnt) whih is redued eigenvetor. It stisfies M(1/ρ)v red = ρv red. Link with A nd its djeny mtrix M ρ is the spetrl rdius of M v red is the restrition to Q red of the unique eigenvetor v 0 (it stisfies Mv = ρv) 23/25

Monolithi methods of smpling for single DFA ( rep) Compositionl methods of smpling for Network of DFAs Conlusion nd perspetive 24/25

Wht we hve seen A rep in the monolithi se of Uniform smpling Boltzmnn smpling Smpling ording to Shnnon-Prry Mrkov hin nd their link to entropy Compositionl methods for these smpling for network of DFAs sed on the notion of redued utomt. Possile further works Preise study of numeril omputtions (e.g. for finding redued spetrl rdius). Design of lgorithms with etter it omplexity. Implementtions nd pplitions to sttistil model heking; model sed testing. Extension of the theory to weighted utomt. Extension of the theory to timed utomt. 25/25