Hyper-minimisation of weighted finite automata

Similar documents
Myhill-Nerode Theorem

Learning Moore Machines from Input-Output Traces

Chapter 2 Finite Automata

Lecture 09: Myhill-Nerode Theorem

Minimal DFA. minimal DFA for L starting from any other

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

NFA DFA Example 3 CMSC 330: Organization of Programming Languages. Equivalence of DFAs and NFAs. Equivalence of DFAs and NFAs (cont.

On Determinisation of History-Deterministic Automata.

Nondeterministic Biautomata and Their Descriptional Complexity

State Minimization for DFAs

NFAs continued, Closure Properties of Regular Languages

Model Reduction of Finite State Machines by Contraction

Good-for-Games Automata versus Deterministic Automata.

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

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

Formal Languages and Automata

1 Nondeterministic Finite Automata

CISC 4090 Theory of Computation

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

Non-deterministic Finite Automata

Convert the NFA into DFA

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.

Theory of Computation Regular Languages

AUTOMATA AND LANGUAGES. Definition 1.5: Finite Automaton

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

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

CMSC 330: Organization of Programming Languages

NFAs continued, Closure Properties of Regular Languages

Coalgebra, Lecture 15: Equations for Deterministic Automata

Deterministic Finite Automata

A tutorial on sequential functions

Types of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. NFA for (a b)*abb.

Formal languages, automata, and theory of computation

DFA minimisation using the Myhill-Nerode theorem

Types of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. Comparing DFAs and NFAs (cont.) Finite Automata 2

Non-deterministic Finite Automata

GNFA GNFA GNFA GNFA GNFA

Formal Language and Automata Theory (CS21004)

Designing finite automata II

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

Fundamentals of Computer Science

Prefix-Free Subsets of Regular Languages and Descriptional Complexity

CSC 311 Theory of Computation

Lecture 9: LTL and Büchi Automata

Gold s algorithm. Acknowledgements. Why would this be true? Gold's Algorithm. 1 Key ideas. Strings as states

Formal Methods in Software Engineering

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

Finite-State Automata: Recap

Regular Languages and Applications

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

1 Structural induction

Introduction to ω-autamata

11.1 Finite Automata. CS125 Lecture 11 Fall Motivation: TMs without a tape: maybe we can at least fully understand such a simple model?

CS:4330 Theory of Computation Spring Regular Languages. Equivalences between Finite automata and REs. Haniel Barbosa

Probabilistic Model Checking Michaelmas Term Dr. Dave Parker. Department of Computer Science University of Oxford

Section: Other Models of Turing Machines. Definition: Two automata are equivalent if they accept the same language.

CS 373, Spring Solutions to Mock midterm 1 (Based on first midterm in CS 273, Fall 2008.)

CSC 473 Automata, Grammars & Languages 11/9/10

CS 301. Lecture 04 Regular Expressions. Stephen Checkoway. January 29, 2018

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

4 Deterministic Büchi Automata

Chapter 4 Regular Grammar and Regular Sets. (Solutions / Hints)

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

CS311 Computational Structures Regular Languages and Regular Grammars. Lecture 6

FABER Formal Languages, Automata and Models of Computation

Deciding the value 1 problem for probabilistic leaktight automata

CMSC 330: Organization of Programming Languages. DFAs, and NFAs, and Regexps (Oh my!)

5.1 Definitions and Examples 5.2 Deterministic Pushdown Automata

CSCI 340: Computational Models. Transition Graphs. Department of Computer Science

Regular languages refresher

CS 275 Automata and Formal Language Theory

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

NFAs and Regular Expressions. NFA-ε, continued. Recall. Last class: Today: Fun:

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018

Synchronizing Automata with Random Inputs

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 1 Regular Languages. Contents

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

Non-Deterministic Finite Automata

1.4 Nonregular Languages

Inductive and statistical learning of formal grammars

Java II Finite Automata I

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

Converting Regular Expressions to Discrete Finite Automata: A Tutorial

CS 267: Automated Verification. Lecture 8: Automata Theoretic Model Checking. Instructor: Tevfik Bultan

DFA Minimization and Applications

Hyper-Minimization. Lossy compression of deterministic automata. Andreas Maletti. Institute for Natural Language Processing University of Stuttgart

The Value 1 Problem for Probabilistic Automata

CS 310 (sec 20) - Winter Final Exam (solutions) SOLUTIONS

Regular Language. Nonregular Languages The Pumping Lemma. The pumping lemma. Regular Language. The pumping lemma. Infinitely long words 3/17/15

80 CHAPTER 2. DFA S, NFA S, REGULAR LANGUAGES. 2.6 Finite State Automata With Output: Transducers

First Midterm Examination

1.2. Linear Variable Coefficient Equations. y + b "! = a y + b " Remark: The case b = 0 and a non-constant can be solved with the same idea as above.

Nondeterminism and Nodeterministic Automata

Let's start with an example:

Lexical Analysis Finite Automate

Worked out examples Finite Automata

Learning Regular Languages over Large Alphabets

Chapter 3. Vector Spaces

Transcription:

Hyper-minimistion of weighted finite utomt Dniel Quernheim nd ndres Mletti Institute for Nturl Lnguge Processing, University of Stuttgrt <first.lst>@ims.uni-stuttgrt.de ugust 18, 2011. Mletti nd D. Quernheim Hyper-minimistion of weighted finite utomt ugust 18, 2011 1 / 21

Outline Unweighted cse Weighted cse onclusion. Mletti nd D. Quernheim Hyper-minimistion of weighted finite utomt ugust 18, 2011 2 / 21

Outline Unweighted cse Weighted cse onclusion. Mletti nd D. Quernheim Hyper-minimistion of weighted finite utomt ugust 18, 2011 2 / 21

Minimistion Prolem given DF, return equivlent DF such tht ll equivlent DF re lrger Theorem (Hopcroft 1971) DF minimistion cn e done in time O(n log n) n: numer of sttes. Mletti nd D. Quernheim Hyper-minimistion of weighted finite utomt ugust 18, 2011 3 / 21

Minimistion Prolem given DF, return equivlent DF miniml Theorem (Hopcroft 1971) DF minimistion cn e done in time O(n log n) n: numer of sttes. Mletti nd D. Quernheim Hyper-minimistion of weighted finite utomt ugust 18, 2011 3 / 21

Hyper-minimistion Definition DF, B lmost equivlent if L() nd L(B) hve finite difference Prolem [Bdr et l. 2009] given DF, return lmost equivlent DF such tht ll lmost equivlent DF re lrger Theorem (Holzer, 2009, Gwrychowsky, Jeż 2009) DF hyper-minimistion cn e done in time O(n log n). Mletti nd D. Quernheim Hyper-minimistion of weighted finite utomt ugust 18, 2011 4 / 21

Hyper-minimistion Definition DF, B lmost equivlent if L() nd L(B) hve finite difference Prolem [Bdr et l. 2009] given DF, return lmost equivlent DF hyper-miniml Theorem (Holzer, 2009, Gwrychowsky, Jeż 2009) DF hyper-minimistion cn e done in time O(n log n). Mletti nd D. Quernheim Hyper-minimistion of weighted finite utomt ugust 18, 2011 4 / 21

lmost equivlence Sttes re lmost equivlent if their right lnguges differ finitely q = {w Σ δ(q, w) F} E G I. Mletti nd D. Quernheim Hyper-minimistion of weighted finite utomt ugust 18, 2011 5 / 21

Kernel nd premle sttes Definition premle stte: finite left lnguge kernel stte: infinite left lnguge q = {w Σ δ(q 0, w) = q} E G I. Mletti nd D. Quernheim Hyper-minimistion of weighted finite utomt ugust 18, 2011 6 / 21

Structurl chrcteristion Theorem (Bdr et l. 2009) DF is hyper-miniml iff miniml no premle stte is lmost equivlent to nother stte. Mletti nd D. Quernheim Hyper-minimistion of weighted finite utomt ugust 18, 2011 7 / 21

Structurl chrcteristion Theorem (Bdr et l. 2009) DF is hyper-miniml iff miniml no premle stte is lmost equivlent to nother stte Exmple (Not hyper-miniml) E G I. Mletti nd D. Quernheim Hyper-minimistion of weighted finite utomt ugust 18, 2011 7 / 21

Hyper-minimistion premle lmost equivlent B D F E Tle: Merges E G I. Mletti nd D. Quernheim Hyper-minimistion of weighted finite utomt ugust 18, 2011 8 / 21

Hyper-minimistion premle lmost equivlent B D F E Tle: Merges E G I. Mletti nd D. Quernheim Hyper-minimistion of weighted finite utomt ugust 18, 2011 8 / 21

Motivtion ppliction In nturl lnguge processing utomt often deterministic for efficient evlution DF tend to e very ig good reduction potentil Often pproximtive dt lossy compression ok. Mletti nd D. Quernheim Hyper-minimistion of weighted finite utomt ugust 18, 2011 9 / 21

Motivtion ppliction In nturl lnguge processing utomt often deterministic for efficient evlution DF tend to e very ig good reduction potentil Often pproximtive dt lossy compression ok ut DF re weighted onclusion Let s do hyper-minimistion for weighted DF!. Mletti nd D. Quernheim Hyper-minimistion of weighted finite utomt ugust 18, 2011 9 / 21

Outline Unweighted cse Weighted cse onclusion. Mletti nd D. Quernheim Hyper-minimistion of weighted finite utomt ugust 18, 2011 10 / 21

Weight structure Generl pproch works for semifields (semirings with mult. inverses). Mletti nd D. Quernheim Hyper-minimistion of weighted finite utomt ugust 18, 2011 11 / 21

Weight structure Generl pproch works for semifields (semirings with mult. inverses) Presenttion here we use the field of rel numers Exmple (WDF) 4 4 2 E 2 weight of is 1 4 1 2 2 = 16 weight of is 0 G I. Mletti nd D. Quernheim Hyper-minimistion of weighted finite utomt ugust 18, 2011 11 / 21

Weighted merge 4 4 2 E 2 G I Weighted merge of F into E with fctor 2. Mletti nd D. Quernheim Hyper-minimistion of weighted finite utomt ugust 18, 2011 12 / 21

Weighted merge 2 4 2 E G I 2 Weighted merge of F into E with fctor 2. Mletti nd D. Quernheim Hyper-minimistion of weighted finite utomt ugust 18, 2011 12 / 21

lmost equivlence Definition Two WDF, B re lmost equivlent if (w) B(w) for only finitely mny w Σ Definition Two sttes p, q re lmost equivlent if there is k R \ {0} such tht p (w) k q (w) for only finitely mny w Σ [Borchrdt: The Myhill-Nerode theorem for recognizle tree series. DLT 2003]. Mletti nd D. Quernheim Hyper-minimistion of weighted finite utomt ugust 18, 2011 13 / 21

Exmple 4 4 2 E 2 G I ɛ 1 1 1 0 G I G nd I lmost equivlent. Mletti nd D. Quernheim Hyper-minimistion of weighted finite utomt ugust 18, 2011 14 / 21

Exmple 0 B D F 4 H 4 2 2 E G I G nd I lmost equivlent E nd F lmost equivlent (with fctor 2) E F 1 1 1 0 2 4 2 4 2 4 2 4.... Mletti nd D. Quernheim Hyper-minimistion of weighted finite utomt ugust 18, 2011 14 / 21

Exmple 0 B D F 4 H 4 2 2 E G I G nd I lmost equivlent E nd F lmost equivlent (with fctor 2) nd B not lmost equivlent! B 4 4 4 4 4 4... 4 16 4 16 4 16.... Mletti nd D. Quernheim Hyper-minimistion of weighted finite utomt ugust 18, 2011 14 / 21

Finding lmost equivlent sttes Definition co-kernel stte: infinite right lnguge co-premle stte: finite right lnguge 4 4 2 E 2 G I. Mletti nd D. Quernheim Hyper-minimistion of weighted finite utomt ugust 18, 2011 15 / 21

Signture stndrdistion Definition signture of q: ( δ(q, σ), c(q, σ) ) σ Σ Stndrdistion select miniml σ 0 Σ such tht δ(q, σ 0 ) is co-kernel djust trnsition weights: c (q, σ) = { c(q,σ) c(q,σ 0 ) if δ(q, σ) is co-kernel 1 otherwise. Mletti nd D. Quernheim Hyper-minimistion of weighted finite utomt ugust 18, 2011 16 / 21

Signture stndrdistion 4 4 2 E 2 G I Stndrdised signture of F F I leds to co-premle. Mletti nd D. Quernheim Hyper-minimistion of weighted finite utomt ugust 18, 2011 17 / 21

Signture stndrdistion 4 4 2 E 2 G I Stndrdised signture of F F I leds to co-premle c (F, ) = 1. Mletti nd D. Quernheim Hyper-minimistion of weighted finite utomt ugust 18, 2011 17 / 21

Signture stndrdistion 4 4 2 E 2 G I Stndrdised signture of F F I leds to co-premle c (F, ) = 1 F 4 H leds to co-kernel. Mletti nd D. Quernheim Hyper-minimistion of weighted finite utomt ugust 18, 2011 17 / 21

Signture stndrdistion 4 4 2 E 2 G I Stndrdised signture of F F I leds to co-premle c (F, ) = 1 F 4 H leds to co-kernel c (F, ) = 4 4 = 1. Mletti nd D. Quernheim Hyper-minimistion of weighted finite utomt ugust 18, 2011 17 / 21

Signture stndrdistion 4 4 2 E 2 G I Stndrdised signture of F F I leds to co-premle c (F, ) = 1 F 4 H leds to co-kernel c (F, ) = 4 4 = 1 Stndrdised signture ( I, 1, H, 1 ). Mletti nd D. Quernheim Hyper-minimistion of weighted finite utomt ugust 18, 2011 17 / 21

Finding lmost equivlent sttes 4 4 2 E G I 2 Signture mp:, 1,, 1 Blocks: {, I} sig(i) = (, 1,, 1 ) in mp! dd I to lock of (nd merge). Mletti nd D. Quernheim Hyper-minimistion of weighted finite utomt ugust 18, 2011 18 / 21

Finding lmost equivlent sttes 4 4 2 E G I 2 Signture mp:, 1,, 1 H, 1,, 1 H Blocks: {, I} sig(h) = ( H, 1,, 1 ) dd to mp. Mletti nd D. Quernheim Hyper-minimistion of weighted finite utomt ugust 18, 2011 18 / 21

Finding lmost equivlent sttes 4 4 2 E G I 2 Signture mp:, 1,, 1 H, 1,, 1 H Blocks: {, I, G} sig(g) = (, 1,, 1 ) in mp! dd G to (nd merge). Mletti nd D. Quernheim Hyper-minimistion of weighted finite utomt ugust 18, 2011 18 / 21

Finding lmost equivlent sttes 0 B D F 4 H 4 2 2 E G I sig(f) = (, 1, H, 1 ) dd to mp Signture mp:, 1,, 1 H, 1,, 1 H, 1, H, 1 F Blocks: {, I, G}. Mletti nd D. Quernheim Hyper-minimistion of weighted finite utomt ugust 18, 2011 18 / 21

Finding lmost equivlent sttes 0 B D F 4 H 4 2 2 E G I sig(e) = (, 1, H, 1 ) in mp! dd E to F (nd merge with fctor 1 2 ) Signture mp:, 1,, 1 H, 1,, 1 H, 1, H, 1 F Blocks: {, I, G} {F, E}. Mletti nd D. Quernheim Hyper-minimistion of weighted finite utomt ugust 18, 2011 18 / 21

Finding lmost equivlent sttes 0 B D F 4 H 4 E G I sig(d) = (, 1, F, 1 ) dd to mp Signture mp:, 1,, 1 H, 1,, 1 H, 1, H, 1 F, 1, F, 1 D Blocks: {, I, G} {F, E}. Mletti nd D. Quernheim Hyper-minimistion of weighted finite utomt ugust 18, 2011 18 / 21

Finding lmost equivlent sttes 0 B D F 4 H 4 E G I sig() = (, 1, F, 1 ) in mp! dd to D (nd merge) Signture mp:, 1,, 1 H, 1,, 1 H, 1, H, 1 F, 1, F, 1 D Blocks: {, I, G} {F, E} {D, }. Mletti nd D. Quernheim Hyper-minimistion of weighted finite utomt ugust 18, 2011 18 / 21

Finding lmost equivlent sttes 4 4 E G I sig(b) = ( D, 1,, 4 ) dd to mp Signture mp:, 1,, 1 H, 1,, 1 H, 1, H, 1 F, 1, F, 1 D D, 1,, 4 B Blocks: {, I, G} {F, E} {D, }. Mletti nd D. Quernheim Hyper-minimistion of weighted finite utomt ugust 18, 2011 18 / 21

Finding lmost equivlent sttes 4 4 E Signture mp:, 1,, 1 H, 1,, 1 H, 1, H, 1 F, 1, F, 1 D D, 1,, 4 B D, 1,, 1 G sig() = ( D, 1,, 1 ) dd to mp I Blocks: {, I, G} {F, E} {D, }. Mletti nd D. Quernheim Hyper-minimistion of weighted finite utomt ugust 18, 2011 18 / 21

Finding lmost equivlent sttes 4 4 E G I sig(0) = (, 1, B, 1 ) dd to mp Signture mp:, 1,, 1 H, 1,, 1 H, 1, H, 1 F, 1, F, 1 D D, 1,, 4 B D, 1,, 1, 1, B, 1 0 Blocks: {, I, G} {F, E} {D, }. Mletti nd D. Quernheim Hyper-minimistion of weighted finite utomt ugust 18, 2011 18 / 21

Finding lmost equivlent sttes 4 4 E G I Blocks represent lmost equivlence Scling fctors used in merges Signture mp:, 1,, 1 H, 1,, 1 H, 1, H, 1 F, 1, F, 1 D D, 1,, 4 B D, 1,, 1, 1, B, 1 0 Blocks: {, I, G} {F, E} {D, }. Mletti nd D. Quernheim Hyper-minimistion of weighted finite utomt ugust 18, 2011 18 / 21

Finding lmost equivlent sttes 4 4 E G I Blocks represent lmost equivlence Scling fctors used in merges ut we merged kernel sttes Signture mp:, 1,, 1 H, 1,, 1 H, 1, H, 1 F, 1, F, 1 D D, 1,, 4 B D, 1,, 1, 1, B, 1 0 Blocks: {, I, G} {F, E} {D, }. Mletti nd D. Quernheim Hyper-minimistion of weighted finite utomt ugust 18, 2011 18 / 21

Weighted merges merge of F into E with fctor 2 merge of D into with fctor 1 4 2 E G I 2. Mletti nd D. Quernheim Hyper-minimistion of weighted finite utomt ugust 18, 2011 19 / 21

onclusion Solved hyper-minimistion for WDF over semifields Open Optimise numer of errors Incrementl construction Extensions to WNF, more weight structures, etc.. Mletti nd D. Quernheim Hyper-minimistion of weighted finite utomt ugust 18, 2011 20 / 21

onclusion Solved hyper-minimistion for WDF over semifields Open Optimise numer of errors Incrementl construction Extensions to WNF, more weight structures, etc. Thnk you for your ttention!. Mletti nd D. Quernheim Hyper-minimistion of weighted finite utomt ugust 18, 2011 20 / 21

References ndrew Bdr, Vilim Geffert, nd In Shipmn. Hyper-minimizing minimized deterministic finite stte utomt. RIRO Theor. Inf. ppl., 43(1), 2009. Json Eisner. Simpler nd more generl minimiztion for weighted finite-stte utomt. In Proc. HLT-NL, 2003. Pweł Gwrychowski nd rtur Jeż. Hyper-minimistion mde efficient. In Proc. MFS, volume 5734 of LNS, 2009. Mrkus Holzer nd ndres Mletti. n n log n lgorithm for hyper-minimizing (minimized) deterministic utomton. Theor. omput. Sci., 411(38 39), 2010. John E. Hopcroft. n n log n lgorithm for Minimizing the Sttes in Finite utomton. In The Theory of Mchines nd omputtions. cdemic Press, 1971.. Mletti nd D. Quernheim Hyper-minimistion of weighted finite utomt ugust 18, 2011 21 / 21