Finite Automata. Theorems - Unit I SUSAN ELIAS. Professor Department of Computer Science & Engineering Sri Venkateswara College of Engineering

Similar documents
Subset construction. We have defined for a DFA L(A) = {x Σ ˆδ(q 0, x) F } and for A NFA. For any NFA A we can build a DFA A D such that L(A) = L(A D )

Extended transition function of a DFA

Finite Automata. BİL405 - Automata Theory and Formal Languages 1

Automata and Formal Languages - CM0081 Non-Deterministic Finite Automata

Languages. Non deterministic finite automata with ε transitions. First there was the DFA. Finite Automata. Non-Deterministic Finite Automata (NFA)

Deterministic Finite Automata. Non deterministic finite automata. Non-Deterministic Finite Automata (NFA) Non-Deterministic Finite Automata (NFA)

CSE 135: Introduction to Theory of Computation Equivalence of DFA and NFA

CSE 135: Introduction to Theory of Computation Nondeterministic Finite Automata (cont )

Theory of Computation

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018

Finite Automata and Regular Languages

September 11, Second Part of Regular Expressions Equivalence with Finite Aut

Nondeterministic Finite Automata

Chap. 2 Finite Automata

Automata and Formal Languages - CM0081 Finite Automata and Regular Expressions

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

Nondeterministic Finite Automata

Introduction to Formal Languages, Automata and Computability p.1/51

Formal Models in NLP

DFA to Regular Expressions

CSE 135: Introduction to Theory of Computation Nondeterministic Finite Automata

Decision, Computation and Language

Equivalence of NFAs and DFAs

CS 154. Finite Automata, Nondeterminism, Regular Expressions

Nondeterministic Finite Automata. Nondeterminism Subset Construction

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

CS 154 Formal Languages and Computability Assignment #2 Solutions

CS 455/555: Finite automata

Regular Language Equivalence and DFA Minimization. Equivalence of Two Regular Languages DFA Minimization

Lecture 4 Nondeterministic Finite Accepters

Non-deterministic Finite Automata (NFAs)

Chapter 6: NFA Applications

Finite Automata and Formal Languages TMV026/DIT321 LP Testing Equivalence of Regular Languages

Takeaway Notes: Finite State Automata

CS 208: Automata Theory and Logic

Chap. 2 Finite Automata

Equivalence of DFAs and NFAs

Closure under the Regular Operations

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

September 7, Formal Definition of a Nondeterministic Finite Automaton

E.g. The set RE of regular expressions is given by the following rules:

Lecture 1: Finite State Automaton

C2.1 Regular Grammars

Lecture 3: Nondeterministic Finite Automata

CSE 311: Foundations of Computing. Lecture 23: Finite State Machine Minimization & NFAs

cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska

C2.1 Regular Grammars

Nondeterministic Finite Automata

CpSc 421 Homework 1 Solutions

Recitation 2 - Non Deterministic Finite Automata (NFA) and Regular OctoberExpressions

Finite Automata and Regular Languages (part III)

COMP4141 Theory of Computation

Examples of Regular Expressions. Finite Automata vs. Regular Expressions. Example of Using flex. Application

Chapter Five: Nondeterministic Finite Automata

Computational Models - Lecture 1 1

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

Harvard CS 121 and CSCI E-207 Lecture 4: NFAs vs. DFAs, Closure Properties

Recap DFA,NFA, DTM. Slides by Prof. Debasis Mitra, FIT.

Nondeterministic finite automata

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

Formal Language and Automata Theory (CS21004)

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

Deterministic Finite Automata (DFAs)

CSC236 Week 11. Larry Zhang

Deterministic Finite Automata (DFAs)

Regular Languages. Kleene Theorem I. Proving Kleene Theorem. Kleene Theorem. Proving Kleene Theorem. Proving Kleene Theorem

Nondeterminism. September 7, Nondeterminism

Homomorphisms and Efficient State Minimization

FORMAL LANGUAGES, AUTOMATA AND COMPUTATION

Finite Automata. Dr. Neil T. Dantam. Fall CSCI-561, Colorado School of Mines. Dantam (Mines CSCI-561) Finite Automata Fall / 35

Finite Automata. Seungjin Choi

CS 321 Solutions to Homework 4 Due October 22, 5pm

CS 154, Lecture 3: DFA NFA, Regular Expressions

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018

Computational Models - Lecture 3 1

Chap. 1.2 NonDeterministic Finite Automata (NFA)

CS243, Logic and Computation Nondeterministic finite automata

Fooling Sets and. Lecture 5

CS 121, Section 2. Week of September 16, 2013

Chapter 2: Finite Automata

CMPSCI 250: Introduction to Computation. Lecture #22: From λ-nfa s to NFA s to DFA s David Mix Barrington 22 April 2013

CONCATENATION AND KLEENE STAR ON DETERMINISTIC FINITE AUTOMATA

Automata and Formal Languages - CM0081 Determinist Finite Automata

COM364 Automata Theory Lecture Note 2 - Nondeterminism

CSE 105 Theory of Computation Professor Jeanne Ferrante

Constructions on Finite Automata

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,

Computational Models Lecture 2 1

Computational Models Lecture 2 1

Theory of Computation (I) Yijia Chen Fudan University

Deterministic finite Automata

CSCE 551 Final Exam, April 28, 2016 Answer Key

Introduction to the Theory of Computation. Automata 1VO + 1PS. Lecturer: Dr. Ana Sokolova.

Let us first give some intuitive idea about a state of a system and state transitions before describing finite automata.

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018

1 More finite deterministic automata

Automata and Languages

CSE 135: Introduction to Theory of Computation Optimal DFA

What we have done so far

Sri vidya college of engineering and technology

Transcription:

Finite Automata Theorems - Unit I SUSAN ELIAS Professor Department of Computer Science & Engineering Sri Venkateswara College of Engineering September 17, 2012

Unit I - Guidelines Formal Definitions Definition of DFA 2.2.1 Notations for DFA 2.2.3 ˆδ for DFA 2.2.4 Language of DFA 2.2.5 Definition of NFA 2.3.2 ˆδ for NFA 2.3.3 Language of NFA 2.3.4 Definition of ɛ-nfa 2.5.2 ˆδ and Language for ɛ-nfa 2.5.4 Theorems Problems

Unit I - Guidelines Formal Definitions Theorems NFA - DFA Theorems 2.11, 2.12 Theorem 2.22 Forms of Proofs - Chapter 1-1.2, 1.3, 1.4 Problems Design of DFA Problems Convert NFA, ɛ-nfa to DFA Problems

Introduction NFA - DFA To prove that NFA is equivalent to DFA ɛ-nfa - DFA To prove that ɛ-nfa is equivalent to DFA

Introduction Induction Principle : If we Prove S(i) and we prove that for all n i, S(n) implies S(n+1), then we may conclude S(n) for all n i.

Introduction IF-AND-ONLY-IF Statements A if and only if B A iff B A is equivalent to B

Introduction A if and only if B if part : if B then A only if part : if A then B

Introduction NFA - DFA Theorem 2.12 A language L is accepted by some DFA if and only if L is accepted by some NFA ɛ-nfa - DFA Theorem 2.22 A language L is accepted by some ɛ-nfa if and only if L is accepted by some DFA

NFA-DFA NFA - DFA Theorem 2.12 A language L is accepted by some DFA if and only if L is accepted by some NFA if part : Theorem 2.11 - Subset construction only if part : Trivial

NFA-DFA NFA - DFA - Theorem 2.11 If D = (Q D, Σ, δ D, {q 0 }, F D ) is a DFA constructed from NFA N = (Q N, Σ, δ N, q 0, F N ) by subset construction, then L(D) = L(N) Proof : Prove by induction on w that ˆ δ D ({q 0 }, w) = ˆ δ N (q 0, w) BASIS: Let w = 0 that is w = ɛ. By the Basis definition of ˆδ for DFA s and NFA s, both δˆ D ({q 0 }, ɛ) and δˆ N (q 0, ɛ) are {q 0 } INDUCTION: Let w be of length n + 1, assume the statement for length n Break w up as w = xa, where a is the first symbol of w. By the inductive hypothesis δˆ D ({q 0 }, x) = δˆ N (q 0, x) Let both these sets of N s states be {p 1, p 2,, p k }

NFA - DFA - Theorem 2.11 INDUCTION: The inductive part of the definition of ˆδ for NFA s says that δˆ N (q 0, w) = k i=1 δ N(p i, a) - (1) The subset construction on the other hand says that δ D ({p 1, p 2,, p k }, a) = k i=1 δ N(p i, a) - (2) Using Equation(2) and the fact that δˆ D ({q 0 }, x) = {p 1, p 2,, p k } in the inductive part of the definition of ˆδ for DFA s: δˆ D (q 0, w) = δ D ( δˆ D ({q 0 }, x), a) = δ D ({p 1, p 2,, p k }, a) = k i=1 δ N(p i, a) - (3) Thus Equations (1) and (3) demonstrate that δˆ D ({q 0 }, w) = δˆ N (q 0, w). When we observe that D and N both accept w if and only if δˆ D ({q 0 }, w) or δˆ N (q 0, w) respectively contain a state in F N the proof that L(D) = L(N) is complete

NFA - DFA - Theorem 2.12 NFA - DFA Theorem 2.12 A language L is accepted by some DFA if and only if L is accepted by some NFA if part : Theorem 2.11 - Subset construction only if part : Trivial - A transition diagram for a DFA can also be interpreted as the transition diagram for an NFA which happens to have exactly one choice of transition in any situation.

ɛ-nfa-dfa ɛ-nfa-dfa Theorem Theorem 2.22 A language L is accepted by some ɛ-nfa if and only if L is accepted by some DFA if part : Let L(D) be the language of a DFA Turn D into an ɛ NFA E by adding transitions δ(q, ɛ) = for all states q of D. Turn all the transitions of D on input symbol as δ E (q, a) = {p} Now transitions of E and D are the same only if part : Modified Subset Construction.

NFA-DFA - Theorem 2.22 Only-If part: Let E = (Q E, Σ, δ E, {q 0 }, F E ) be an ɛ NFA. Apply Modified Subset construction to produce DFA D = (Q D, Σ, δ D, {q 0 }, F D ). Need to show that L(D) = L(E) We prove that δˆ E (q 0, w) = δˆ D (q D, w) by induction on length of w BASIS: If w = 0, then w = ɛ It is known that δˆ E (q 0, ɛ) = ECLOSE(q 0 ) It is also known that q D = ECLOSE(q 0 ) It is known that for a DFA ˆδ(p, ɛ) = p for any state p So δˆ D (q D, ɛ) = ECLOSE(q 0 ) Thus is is proved that δˆ E (q 0, ɛ) = δˆ D (q D, ɛ) INDUCTION:

NFA - DFA - Theorem 2.22 INDUCTION: Suppose w = xa, where a is the final symbol of w and assume that the statement holds for x. That is δˆ E (q 0, x) = δˆ D (q 0, x) Let both these sets of states be {p 1, p 2,, p k } By the definition of ˆδ for ɛ-nfa we compute δˆ E (q 0, w) by 1 Let {r 1, r 2,, r m } be k i=1 δ E (p i, a) 2 Then δˆ E (q 0, w) = m j=1 ECLOSE(r j) Steps (1) and (2) are the same steps used in the Modified Subset Construction Thus δ ˆ D (q D, w) which is δ D ({p 1, p 2,, p k }, a) is the same set as δˆ E (q 0, w) Thus it is proved that δˆ E (q 0, w) = δˆ D (q D, w)