Prefix-Free Subsets of Regular Languages and Descriptional Complexity

Similar documents
Finite-State Automata: Recap

Deterministic Finite-State Automata

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.

NFAs continued, Closure Properties of Regular Languages

Minimal DFA. minimal DFA for L starting from any other

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

Midterm 1 Practice. CS 350 Fall 2018 gilray.org/classes/fall2018/cs350/

Converting Regular Expressions to Discrete Finite Automata: A Tutorial

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

Harvard University Computer Science 121 Midterm October 23, 2012

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

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

Convert the NFA into DFA

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

Worked out examples Finite Automata

Finite Automata-cont d

Lecture 09: Myhill-Nerode Theorem

Fundamentals of Computer Science

NFAs continued, Closure Properties of Regular Languages

Speech Recognition Lecture 2: Finite Automata and Finite-State Transducers

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

Languages & Automata

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

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

CSCI FOUNDATIONS OF COMPUTER SCIENCE

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

First Midterm Examination

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

Speech Recognition Lecture 2: Finite Automata and Finite-State Transducers. Mehryar Mohri Courant Institute and Google Research

Non-deterministic Finite Automata

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

Formal Languages and Automata

State Minimization for DFAs

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

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

Regular Expressions (RE) Regular Expressions (RE) Regular Expressions (RE) Regular Expressions (RE) Kleene-*

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

CMSC 330: Organization of Programming Languages

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

Non-deterministic Finite Automata

CS 311 Homework 3 due 16:30, Thursday, 14 th October 2010

First Midterm Examination

Nondeterminism. Nondeterministic Finite Automata. Example: Moves on a Chessboard. Nondeterminism (2) Example: Chessboard (2) Formal NFA

Java II Finite Automata I

GNFA GNFA GNFA GNFA GNFA

AUTOMATA AND LANGUAGES. Definition 1.5: Finite Automaton

Theory of Computation Regular Languages

Nondeterminism and Nodeterministic Automata

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

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.

Formal languages, automata, and theory of computation

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

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

1 From NFA to regular expression

Chapter 2 Finite Automata

Designing finite automata II

1 Nondeterministic Finite Automata

1.4 Nonregular Languages

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

CHAPTER 1 Regular Languages. Contents. definitions, examples, designing, regular operations. Non-deterministic Finite Automata (NFA)

Nondeterministic Biautomata and Their Descriptional Complexity

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

Myhill-Nerode Theorem

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

Prefix-Free Regular-Expression Matching

Lexical Analysis Finite Automate

Formal Language and Automata Theory (CS21004)

The size of subsequence automaton

Chapter 1, Part 1. Regular Languages. CSC527, Chapter 1, Part 1 c 2012 Mitsunori Ogihara 1

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

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

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

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

Today s Topics Automata and Languages

Automata and Languages

CHAPTER 1 Regular Languages. Contents

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

Let's start with an example:

input tape head moves current state

In-depth introduction to main models, concepts of theory of computation:

Exercises Chapter 1. Exercise 1.1. Let Σ be an alphabet. Prove wv = w + v for all strings w and v.

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

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

DFA Minimization and Applications

Homework 3 Solutions

Name Ima Sample ASU ID

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

Formal Methods in Software Engineering

On Determinisation of History-Deterministic Automata.

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

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

CS 275 Automata and Formal Language Theory

CS375: Logic and Theory of Computing

CSC 311 Theory of Computation

Talen en Automaten Test 1, Mon 7 th Dec, h45 17h30

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

Learning Moore Machines from Input-Output Traces

Recursively Enumerable and Recursive. Languages

Operations on Unambiguous Finite Automata

Deterministic Finite Automata

Transcription:

Prefix-Free Susets of Regulr Lnguges nd Descriptionl Complexity Jozef Jirásek Jurj Šeej DCFS 2015 Prefix-Free Susets of Regulr Lnguges nd Descriptionl Complexity Jozef Jirásek, Jurj Šeej 1/22

Outline Mximl prefix-free susets Properties Constructing Susets of certin properties Stte complexity Non-regulr MPFS Prefix-Free Susets of Regulr Lnguges nd Descriptionl Complexity Jozef Jirásek, Jurj Šeej 2/22

DFA A = (Q, Σ, δ, s, F) Definitions We consider incomplete, trim DFAs. Prefix-Free Susets of Regulr Lnguges nd Descriptionl Complexity Jozef Jirásek, Jurj Šeej 3/22

DFA A = (Q, Σ, δ, s, F) Definitions We consider incomplete, trim DFAs. u p v iff w: uw = v u < p v iff u p v nd u v (w ε) Set P is prefix-free iff u, v P: u v p Set P is mximl prefix-free suset of L iff: P L P is prefix-free u L: v P: u v or v u p p Prefix-Free Susets of Regulr Lnguges nd Descriptionl Complexity Jozef Jirásek, Jurj Šeej 4/22

Constructing MPFS Let A = (Q, Σ, δ, s, F); F' F Construct A F ' = (Q, Σ, δ', s, F') δ'(q, ) undefined if q F' s in A otherwise. L(A F ' ) is PFS of L(A) If q F \ F' rechle in A F ' : w ccepted from q in A F ' then L(A F ' ) is MPFS of L(A). 1 2 3 4 1 2 3 4 1 2 3 4 Prefix-Free Susets of Regulr Lnguges nd Descriptionl Complexity Jozef Jirásek, Jurj Šeej 5/22

Constructing some PFS...remove ll strings which re proper prefixes? L 1 = L \ {w L v ε: wv L} A 1 = (Q, Σ, δ, s, F 1 ) F 1 = {q F w ε ccepted from q} 1 2 3 1 2 3 4 4 Prefix-Free Susets of Regulr Lnguges nd Descriptionl Complexity Jozef Jirásek, Jurj Šeej 6/22

Results...remove ll strings which re proper prefixes? sc(l 1 ) sc(l) L unry: sc(l 1 ) = 1 or sc(l 1 ) = n 1 k n there is inry L with sc(l) = n nd sc(l 1 ) = k L 1 is PFS of L. If L is finite, L 1 is lrgest MPFS of L. Otherwise, L Prefix-Free Susets of Regulr Lnguges nd Descriptionl Complexity Jozef Jirásek, Jurj Šeej 7/22

Constructing some PFS...remove ll strings which hve proper prefix? L 2 = L \ {w L u L, v ε: w = uv} A 2 = (Q, Σ, δ 2, s, F) δ 2 undefined for q F, s in A otherwise. 1 2 3 1 2 3 4 4 Prefix-Free Susets of Regulr Lnguges nd Descriptionl Complexity Jozef Jirásek, Jurj Šeej 8/22

Results...remove ll strings which hve proper prefix? sc(l 2 ) sc(l) + 1 1 k n + 1 there is unry L with sc(l) = n nd sc(l 2 ) = k L 2 is MPFS of L. If L 2 is infinite, L does not hve ny finite MPFS. If L 2 is finite, it is smllest MPFS of L. Prefix-Free Susets of Regulr Lnguges nd Descriptionl Complexity Jozef Jirásek, Jurj Šeej 9/22

Finding lrgest finite MPFS L hs oth finite nd infinite MPFS. We cn find the smllest (L 2 ), cn we find the lrgest finite MPFS? Prefix-Free Susets of Regulr Lnguges nd Descriptionl Complexity Jozef Jirásek, Jurj Šeej 10/22

Finding lrgest finite MPFS L hs oth finite nd infinite MPFS. We cn find the smllest (L 2 ), cn we find the lrgest finite MPFS? Yes we cn! Polynomil-time lgorithm which either: finds F' F, such tht L(A F ' ) is lrgest finite MPFS of L; or determines tht no lrgest finite MPFS of L exists. Only infinite MPFS. Finite MPFS of unlimited size. sc(l(a F ' )) sc(l) + 1 Reched for every 1 k n + 1 on unry lnguges. Construction in pper. Prefix-Free Susets of Regulr Lnguges nd Descriptionl Complexity Jozef Jirásek, Jurj Šeej 11/22

Infinite MPFS Tsk: Find n infinite regulr MPFS of L = L(A). L infinite A contins cycle (1) trnsition out of the cycle: Prefix-Free Susets of Regulr Lnguges nd Descriptionl Complexity Jozef Jirásek, Jurj Šeej 12/22

Infinite MPFS Tsk: Find n infinite regulr MPFS of L = L(A). L infinite A contins cycle (1) trnsition out of the cycle: Prefix-Free Susets of Regulr Lnguges nd Descriptionl Complexity Jozef Jirásek, Jurj Šeej 13/22

Infinite MPFS Tsk: Find n infinite regulr MPFS of L = L(A). L infinite A contins cycle (2) no trnsition out of ny cycle: Only finite prefix-free sets! Prefix-Free Susets of Regulr Lnguges nd Descriptionl Complexity Jozef Jirásek, Jurj Šeej 14/22

Stte complexity For every n 2, there exists lnguge L with sc(l) = n, such tht every infinite MPFS of L hs sc 2n.... For every n 4, there exists lnguge L with sc(l) = n, which hs infinite MPFS of unlimited sc. L = + { i i n 3} P k = + { k } sc(p k ) = k Prefix-Free Susets of Regulr Lnguges nd Descriptionl Complexity Jozef Jirásek, Jurj Šeej 15/22

Non-regulr MPFS of regulr lnguges Regulr lnguge L with non-regulr MPFS: L = ** P = { n n n > 0} Prefix-Free Susets of Regulr Lnguges nd Descriptionl Complexity Jozef Jirásek, Jurj Šeej 16/22

Non-regulr MPFS of regulr lnguges L hs non-regulr MPFS L hs uncountly mny MPFS. Let P e non-regulr MPFS of regulr lnguge L. P + = {w P u w L: w < p u w } P = {w P u L: w < p u} Prefix-Free Susets of Regulr Lnguges nd Descriptionl Complexity Jozef Jirásek, Jurj Šeej 17/22

Non-regulr MPFS of regulr lnguges L hs non-regulr MPFS L hs uncountly mny MPFS. Let P e non-regulr MPFS of regulr lnguge L. P + = {w P u w L: w < p u w } P = {w P u L: w < p u} Assume tht P + is finite: Let R = L \ {[w] w P + } Let R = {w R u R: w < p u} Clim: R = P Thus P = P + P is regulr! Prefix-Free Susets of Regulr Lnguges nd Descriptionl Complexity Jozef Jirásek, Jurj Šeej 18/22

Non-regulr MPFS of regulr lnguges L hs non-regulr MPFS L hs uncountly mny MPFS. Let P e non-regulr MPFS of regulr lnguge L. P + = {w P u w L: w < p u w } (infinite) P = {w P u L: w < p u} Pick S P + Let S' = S { wu w w P + \ S} Extend S' to MPFS S''. Prefix-Free Susets of Regulr Lnguges nd Descriptionl Complexity Jozef Jirásek, Jurj Šeej 19/22

Non-regulr MPFS of regulr lnguges L hs non-regulr MPFS L hs uncountly mny MPFS. Let P e non-regulr MPFS of regulr lnguge L. P + = {w P u w L: w < p u w } (infinite) P = {w P u L: w < p u} Pick S P + Let S' = S { wu w w Extend S' to MPFS S''. P + \ S} Picking two different S 1, S 2 results in two different S 1 '', S 2 ''. Uncountly mny choices uncountly mny MPFS. Prefix-Free Susets of Regulr Lnguges nd Descriptionl Complexity Jozef Jirásek, Jurj Šeej 20/22

Non-regulr MPFS of regulr lnguges L hs non-regulr MPFS L hs uncountly mny MPFS. Let P e non-regulr MPFS of regulr lnguge L. P + = {w P u w L: w < p u w } (infinite) P = {w P u L: w < p u} Pick S P + Let S' = S { wu w w Extend S' to MPFS S''. P + \ S} Picking two different S 1, S 2 results in two different S 1 '', S 2 ''. Uncountly mny choices uncountly mny MPFS. Further results on non-regulr MPFS in n upcoming pper! Prefix-Free Susets of Regulr Lnguges nd Descriptionl Complexity Jozef Jirásek, Jurj Šeej 21/22

Thnk you for your ttention! Questions? Prefix-Free Susets of Regulr Lnguges nd Descriptionl Complexity Jozef Jirásek, Jurj Šeej 22/22