1 Equivalence of Finite Automata and Regular Expressions Given regular expression R, will construct NFA N such that L(N) = L(R) • Given DFA M, will
Previous PDF | Next PDF |
[PDF] Equivalence of Regular Expressions and Regular Languages
12 sept 2018 · In this lecture we will formalize the equivalence between regular expressions and reg- ular languages To do so, we first need to formalize the
[PDF] 1 Equivalence of Finite Automata and Regular Expressions 2
1 Equivalence of Finite Automata and Regular Expressions Given regular expression R, will construct NFA N such that L(N) = L(R) • Given DFA M, will
[PDF] Equivalence of DFA and Regular Expressions - CUHK CSE
If R asd S are regular expressions, so are R + S, RS and R∗ Page 8 8/19 General method regular expression =⇒ NFA ∅ q0 ε q0 a ∈ Σ q0 q1 a Page 9 9/19
[PDF] Regular Expressions and the Equivalence of Programs - CORE
simple fashion For example, consider the following regular expression representation of the elemental program in Fig 1: f (~-~(p ~ r) g(~-/pg)* ,~ ~p)*(p ~ r) g,
[PDF] Proof Pearl: Regular Expression Equivalence and Relation Algebra
He informally describes a neat algorithm for deciding equivalence of regular expressions r and s: incrementally construct the relation of all (Dw(r), Dw(s)) between
[PDF] Equivalence of Regular Languages and FSMs
Do Homework 8 Theorem: The set of languages expressible using regular expressions (the regular languages) equals the class of languages recognizable by
[PDF] Lecture 2: Regular Expression
8 jan 2015 · thus equivalent to DFA, NFA) Proof (Regular expression ⇒ NFA with ϵ-moves) We will prove, if L is accepted by a regular expression, then
[PDF] erasmus 2020/21
[PDF] erasmus application example
[PDF] erasmus darwin
[PDF] erasmus definition
[PDF] erasmus exchange program
[PDF] erasmus huis training centre
[PDF] erasmus motivation letter sample
[PDF] erasmus mundus interview
[PDF] erasmus mundus mechanical engineering
[PDF] erasmus mundus scholarship how to apply
[PDF] erasmus of rotterdam
[PDF] erasmus plus apply
[PDF] erasmus plus courses
[PDF] erasmus programme post 2020
1 Equivalence of Finite Automata and Regular Expressions
Finite Automata Recognize Regular Languages
Theorem 1.Lis a regular language i there is a regular expressionRsuch thatL(R) =Li there is a DFAMsuch thatL(M) =Li there is a NFANsuch thatL(N) =L. i.e., regular expressions, DFAs and NFAs have the same computational power. Proof.Given regular expressionR, will constructNFANsuch thatL(N) =L(R) GivenDFAM, will construct regular expressionRsuch thatL(M) =L(R)2 Regular Expressions to NFARegular Expressions to Finite Automata
:::to Non-determinstic Finite Automata Lemma 2.For any regexR, there is an NFANRs.t.L(NR) =L(R).Proof Idea
We will build the NFANRforR, inductively, based on the number of operators inR, #(R). Base Case:#(R) = 0 means thatRis;;, ora(from somea2). We will build NFAs for these cases. Induction Hypothesis:Assume that for regular expressionsR, with #(R)< n, there is anNFANRs.t.L(NR) =L(R).
Induction Step:ConsiderRwith #(R) =n. Based on the form ofR, the NFANRwill be built using the induction hypothesis.Regular Expression to NFABase Cases
IfRis an elementary regular expression, NFANRis constructed as follows. R=;q 0R=q 0R=aq 0q 1a 1Induction Step: Union
CaseR=R1[R2
By induction hypothesis, there areN1;N2s.t.L(N1) =L(R1) andL(N2) =L(R2). Build NFAN s.t.L(N) =L(N1)[L(N2)q 0q 1q 11q 12q 2q 21Figure 1: NFA forL(N1)[L(N2)Induction Step: Union
Formal Denition
CaseR=R1[R2
LetN1= (Q1;;1;q1;F1) andN2= (Q2;;2;q2;F2) (withQ1\Q2=;) be such thatL(N1) = L(R1) andL(N2) =L(R2). The NFAN= (Q;;;q0;F) is given byQ=Q1[Q2[ fq0g, whereq062Q1[Q2
F=F1[F2
is dened as follows (q;a) =81(q;a) ifq2Q1
2(q;a) ifq2Q2
fq1;q2gifq=q0anda= ;otherwiseInduction Step: UnionCorrectness Proof
Need to show thatw2L(N) iw2L(N1)[L(N2).
)w2L(N) impliesq0w!Nqfor someq2F. Based on the transitions out ofq0,q0!N q1w!Nqorq0!Nq2w!Nq. Considerq0!Nq1w!Nq. (Other case is similar) This
meansq1w!N1q(asNhas the same transition asN1on the states inQ1) andq2F1. This meansw2L(N1). 2 (w2L(N1)[L(N2). Considerw2L(N1); case ofw2L(N2) is similar. Then,q1w!N1qfor someq2F1. Thus,q0!Nq1w!Nq, andq2F. This means thatw2L(N).Induction Step: ConcatenationCaseR=R1R2
By induction hypothesis, there areN1;N2s.t.L(N1) =L(R1) andL(N2) =L(R2)Build NFANs.t.L(N) =L(N1)L(N2)q
1q 11q 12q 2q 21Figure 2: NFA forL(N1)L(N2)Induction Step: Concatenation