We define the multi-step transition function T : S Σ S as follows. 1. For any s S, T (s,λ) = s. 2. For any s S, x Σ and a Σ,

Similar documents
T (s, xa) = T (T (s, x), a). The language recognized by M, denoted L(M), is the set of strings accepted by M. That is,

Theory of computation: initial remarks (Chapter 11)

Theory of computation: initial remarks (Chapter 11)

Büchi Automata and their closure properties. - Ajith S and Ankit Kumar

Notes on State Minimization

Closure Properties of Regular Languages. Union, Intersection, Difference, Concatenation, Kleene Closure, Reversal, Homomorphism, Inverse Homomorphism

Finite Automata and Regular Languages

What we have done so far

3515ICT: Theory of Computation. Regular languages

Finite Automata and Regular languages

Computational Models: Class 3

DM17. Beregnelighed. Jacob Aae Mikkelsen

More on Finite Automata and Regular Languages. (NTU EE) Regular Languages Fall / 41

Computational Models - Lecture 3 1

Great Theoretical Ideas in Computer Science. Lecture 4: Deterministic Finite Automaton (DFA), Part 2

COMP-330 Theory of Computation. Fall Prof. Claude Crépeau. Lec. 5 : DFA minimization

Unit 6. Non Regular Languages The Pumping Lemma. Reading: Sipser, chapter 1

Name: Student ID: Instructions:

HKN CS/ECE 374 Midterm 1 Review. Nathan Bleier and Mahir Morshed

Lecture 3: Nondeterministic Finite Automata

COMP4141 Theory of Computation

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

Theory of Computation

CS 455/555: Finite automata

CSE 105 THEORY OF COMPUTATION

Axioms of Kleene Algebra

THEORY OF COMPUTATION (AUBER) EXAM CRIB SHEET

CS 530: Theory of Computation Based on Sipser (second edition): Notes on regular languages(version 1.1)

Fooling Sets and. Lecture 5

CSE 105 THEORY OF COMPUTATION

COMP-330 Theory of Computation. Fall Prof. Claude Crépeau. Lec. 9 : Myhill-Nerode Theorem and applications

Warshall s algorithm

CSCI 2200 Foundations of Computer Science Spring 2018 Quiz 3 (May 2, 2018) SOLUTIONS

September 7, Formal Definition of a Nondeterministic Finite Automaton

Notes for Comp 497 (Comp 454) Week 5 2/22/05. Today we will look at some of the rest of the material in Part 1 of the book.

Computational Models - Lecture 3

1 More finite deterministic automata

2. Syntactic Congruences and Monoids

CPSC 421: Tutorial #1

Properties of Regular Languages. BBM Automata Theory and Formal Languages 1

CISC 4090: Theory of Computation Chapter 1 Regular Languages. Section 1.1: Finite Automata. What is a computer? Finite automata

Nondeterministic Finite Automata

Computational Models - Lecture 4

Computational Theory

Theory of Computation p.1/?? Theory of Computation p.2/?? Unknown: Implicitly a Boolean variable: true if a word is

CSE 135: Introduction to Theory of Computation Optimal DFA

Definition of Büchi Automata

Definition: A binary relation R from a set A to a set B is a subset R A B. Example:

Theory of Computation (I) Yijia Chen Fudan University

Theory of Computation

Theory of Computation (II) Yijia Chen Fudan University

CSCE 551 Final Exam, Spring 2004 Answer Key

ECS 120: Theory of Computation UC Davis Phillip Rogaway February 16, Midterm Exam

Computer Science & Engineering Department. IIT Kharagpur. Theory of Computation: CS41001 Lecture I

Finite Automata - Deterministic Finite Automata. Deterministic Finite Automaton (DFA) (or Finite State Machine)

Computational Models - Lecture 3 1

CS154. Non-Regular Languages, Minimizing DFAs

Computer Sciences Department

Computational Models #1

Context Free Languages. Automata Theory and Formal Grammars: Lecture 6. Languages That Are Not Regular. Non-Regular Languages

Chapter Five: Nondeterministic Finite Automata

0 Sets and Induction. Sets

CS 154, Lecture 2: Finite Automata, Closure Properties Nondeterminism,

Lecture 1: Finite State Automaton

arxiv: v2 [cs.fl] 29 Nov 2013

TDDD65 Introduction to the Theory of Computation

cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska

Before we show how languages can be proven not regular, first, how would we show a language is regular?

Computational Models - Lecture 1 1

Automata extended to nominal sets

Finite Automata. Mahesh Viswanathan

Finite State Automata

Inf2A: Converting from NFAs to DFAs and Closure Properties

Finite Automata and Regular Languages (part III)

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

Outline. Nondetermistic Finite Automata. Transition diagrams. A finite automaton is a 5-tuple (Q, Σ,δ,q 0,F)

Section Summary. Relations and Functions Properties of Relations. Combining Relations

CSE 105 THEORY OF COMPUTATION

CSE 105 THEORY OF COMPUTATION

Deterministic Finite Automata (DFAs)

CPS 220 Theory of Computation REGULAR LANGUAGES

Automata and Formal Languages - CM0081 Non-Deterministic Finite Automata

COM364 Automata Theory Lecture Note 2 - Nondeterminism

Lecture Notes On THEORY OF COMPUTATION MODULE -1 UNIT - 2

Deterministic Finite Automata (DFAs)

GEETANJALI INSTITUTE OF TECHNICAL STUDIES, UDAIPUR I

CS 154. Finite Automata, Nondeterminism, Regular Expressions

Automata & languages. A primer on the Theory of Computation. Laurent Vanbever. ETH Zürich (D-ITET) September,

CSC236 Week 11. Larry Zhang

Intro to Theory of Computation

Advanced Automata Theory 2 Finite Automata

Obtaining the syntactic monoid via duality

2. Elements of the Theory of Computation, Lewis and Papadimitrou,

CS 154, Lecture 4: Limitations on DFAs (I), Pumping Lemma, Minimizing DFAs

Automata & languages. A primer on the Theory of Computation. Laurent Vanbever. ETH Zürich (D-ITET) September,

Closure under the Regular Operations

Finite Automata and Languages

Takeaway Notes: Finite State Automata

Sri vidya college of engineering and technology

CS 154 Introduction to Automata and Complexity Theory

Transcription:

Distinguishability Recall A deterministic finite automaton is a five-tuple M = (S,Σ,T,s 0,F) where S is a finite set of states, Σ is an alphabet the input alphabet, T : S Σ S is the transition function, s 0 S is the initial state, F S is the set of final or accepting states. We define the multi-step transition function T : S Σ S as follows. 1. For any s S, T (s,λ) = s. 2. For any s S, x Σ and a Σ, A string x Σ is accepted by M if T (s,xa) = T(T (s,x),a). T (s 0,x) F. The language recognized by M, denoted L(M), is the set of strings accepted by M. That is, L(M) = {x Σ T (s 0,x) F }.

Distinguishing Strings The use of a DFA to recognize an infinite language depends on the ability to adequately distinguish strings from one another without remembering everything about them. Definition For any language L over Σ, and any x,y,z Σ, we say x and y are distinguished by z wrt L if exactly one of xz, yz is in L. That is, xz L iff yz / L. Similarly, we say that x and y are distinguishable wrt L if there is some z Σ that distinguishes them. Example Consider the language L = ({0,1}{0,1}). The strings 0 and 01 are distinguishable wrt L. In fact, any string in {0,1} distinguishes them. The strings Λ and 01 are indistinguishable wrt L. (In fact, for this language, strings x and y are distinguishable iff exactly one of them belongs to L.)

Distinguishing Strings Continued For any language L over Σ, and any x,y,z Σ, we say x and y are distinguished by z wrt L if exactly one of xz, yz is in L. That is, xz L iff yz / L. Similarly, we say that x and y are distinguishable wrt L if there is some z Σ that distinguishes them. Example Consider the language L = {0,1} {01}. The strings 1 and 10 are distinguishable wrt L. They are distinguished by only one string: 1.

Distinguishability Lemma For any DFA M = (S,Σ,T,s 0,F), for any x,y Σ, if x and y are distinguishable wrt L(M), then T (s 0,x) T (s 0,y). Proof. Consider any x,y Σ s.t. T (s 0,x) = T (s 0,y). No z Σ can distinguish x and y wrt L(M). To see this, consider any z Σ. Consequently, T (s 0,xz) = T (T (s 0,x),z) (previous result) = T (T (s 0,y),z) (T (s 0,x) = T (s 0,y)) = T (s 0,yz) (previous result) T (s 0,xz) F iff T (s 0,yz) F, which shows that xz L(M) iff yz L(M).

Distinguishability Theorem For any language L over Σ, if there are n strings over Σ s.t. each is distinguishable from all the others wrt L, then any DFA that recognizes L has at least n states. Proof. Assume that x 1,x 2,...,x n are all distinguishable from one another wrt L. Assume that DFA M = (S,Σ,T,s 0,F) recognizes L. By the Distinguishability Lemma, since any two distinct strings from x 1,x 2,...,x n are distinguishable wrt L, we can conclude that each of the states T (s 0,x 1),T (s 0,x 2),...,T (s 0,x n) is distinct. Hence, M has at least n states. Distinguishability Corollary For any language L over Σ, if there are infinitely many strings over Σ s.t. each is distinguishable from all the others wrt L, then there is no DFA that recognizes L. Consequently L is not regular.

Distinguishability Theorem For any language L over Σ, if there are n strings over Σ s.t. each is distinguishable from all the others wrt L, then any DFA that recognizes L has at least n states. For any n N, let L n = {0,1} {1}{0,1} n. So, in words, L n is the set of all binary strings that end with a 1 followed by exactly n symbols. Claim For any n N, any DFA that recognizes L n has at least 2 n+1 states. As you might imagine, we will prove this by constructing a set of 2 n+1 binary strings that are all distinguishable from one another wrt L n. Then we can apply the Distinguishability Theorem. Before proving this claim, let s construct DFA s for L 1 and L 2...

A DFA for {0, 1} {1}{0, 1}1

A DFA for {0, 1} {1}{0, 1}2

Claim For any n N, any DFA that recognizes has at least 2 n+1 states. L n = {0,1} {1}{0,1} n. Proof. First notice that any two distinct strings over {0,1} of length n +1 are distinguishable wrt L n. Indeed, any two such strings x,y differ on the (k +1)st character, for some k (0 k n). Assume wlog that the (k +1)st character of x is 1 and the (k +1)st character of y is 0. So x {0,1} k {1}{0,1} n k {0,1} {1}{0,1} n k and y {0,1} k {0}{0,1} n k {0,1} {0}{0,1} n k. Consequently, x and y are distinguished by the string 1 k, with x1 k L n, while y1 k / L n. Finally, since there are 2 n+1 distinct strings over {0,1} of length n+1, we conclude by the Distinguishability Theorem that any DFA that recognizes L n has at least 2 n+1 states.

{0 n 1 n n N } is not recognized by any DFA Claim The language L = {0 n 1 n n N } is not recognized by any DFA. We prove this by showing that there is an infinite set of binary strings that are all distinguishable from one another wrt L. (The result then follows by the Distinguishability Corollary.) Proof. There are infinitely many strings of the form 0 n (n N), and all are distinguishable from one another wrt L. Indeed, for any m,n N, if m n, then 0 m and 0 n are distinguished wrt L by 1 n, since 0 m 1 n / L while 0 n 1 n L. It follows by the Distinguishability Corollary that no DFA recognizes L.

Indistinguishability wrt L: an equivalence relation on strings Definition For any L Σ, let I L be the binary relation on Σ s.t. for all x,y Σ, xi L y iff x and y are indistinguishable wrt L. Recall: x and y are distinguishable wrt L iff there is a z Σ s.t. xz L iff yz / L. So xi L y iff, for all z Σ, xz L iff yz L. For any L Σ, I L is an equivalence relation. We won t study this notion independently this semester, although it is very useful. An equivalence relation on a set partitions the set that is, it divides the set into disjoint subsets and these disjoint subsets are called equivalence classes...

Equivalence classes wrt L For any x Σ, we will write [x] to stand for the set {y Σ xi L y }. So, in words, [x] is the set of all strings that are indistinguishable from x wrt L. We call [x] the equivalence class of x (wrt L). Some nice properties of equivalence classes wrt L: 0. For all x Σ, x [x]. 1. For all x,y Σ, [x] [y] = or [x] = [y]. 2. For all x Σ, x L iff [x] L. 3. {[x] x Σ } is a partition of Σ. That is, (a) the elements of the set are disjoint subsets of Σ, and (b) their union is Σ. 4. {[x] x L} is a partition of L. That is, (a) the elements of the set are disjoint subsets of L, and (b) their union is L.

Example Consider the language L = ((0+1)(0+1)). Even length strings are indistinguishable wrt L. Similarly, odd length strings are indistinguishable wrt L. Hence, So And I L = {(x,y) x,y {0,1}, xy is even }. [Λ] = [00] = [01] = [0000] = {x x {0,1}, x is even }. [0] = [1] = [010] = [11111] = {x x {0,1}, x is odd }.

Observation Consider the language PAL = {x x Σ,x = x R }, where x R stands for the reverse of x. It turns out that if Σ > 1, then I PAL = {(x,x) x Σ }, because all strings over Σ are distinguishable from each other wrt PAL. Therefore, for all x Σ, [x] = {x}. BTW: To see that all strings are distinguishable wrt PAL, take any two strings x,y over Σ. Consider two cases. Case 1: x = y. Then xx R PAL, while yx R / PAL. Case 2: x y. Wlog assume that x < y. Let z be a string over Σ s.t. (i) xz = y, and (ii) xz y. (For condition (ii), we need the fact that Σ > 1.) Then xz(xz) R PAL, while yz(xz) R / PAL. Indeed, since y = xz, yz(xz) R cannot belong to PAL unless y = xz, which by choice of z is not the case.

Minimal DFA Theorem Theorem For any language L over Σ, let S L = {[x] x Σ }, F L = {[x] x L} and let T L : S L Σ S L be the unique function s.t. for all x Σ and a Σ, If S L is finite, then T L ([x],a) = [xa]. M L = (S L,Σ,T L,[Λ],F L ) is a DFA that recognizes L. Moreover, no DFA that recognizes L has fewer states than M L. Corollary (Myhill-Nerode Theorem 1957-58) A language L is regular iff there are finitely many equivalence classes of I L. Proof sketch. The left-to-right part follows from Kleene s Theorem and the Distinguishability Corollary. The right-to-left part follows from the Minimal DFA Theorem and Kleene s Theorem.