1 / 11

Lecture 8 From NFA to Regular Language

Lecture 8 From NFA to Regular Language. Induction on k= # of states other than initial and final states. K=0. a. a*. b. c*a(d+bc*a)*. a. c. d. k > 1. ac*e. c. ac*d. a. e. bc*e. d. b. bc*d. Example 1. 0. 1. 0 +10. 1. 0. 0. Why?. 10. 0. 1. 1. (0+10)*0(1+10(0+10)*0)*.

henrybaker
Download Presentation

Lecture 8 From NFA to Regular Language

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Lecture 8 From NFA to Regular Language

  2. Induction on k= # of states other than initial and final states • K=0 a a* b c*a(d+bc*a)* a c d

  3. k > 1 ac*e c ac*d a e bc*e d b bc*d

  4. Example 1 0 1 0+10 1 0 0 Why? 10 0 1 1 (0+10)*0(1+10(0+10)*0)* 0+10 1 0 1 0+10 (0+10)*0 0 10(1+10)*0 How to get in the final state? 10 Cycles at the final state.

  5. Example 2 0 1 0 1 0 0 1 ε 0 0 ε 1 1 1 1 0 1 0 0 0 0 0 1 1 1 1 Solution 1 (0+10)*0(1+10(0+10)*0)* + 0*(1+01*1)(00*(1+01*1))*

  6. 0 0 1 0 01* ε 0 0 1 1 1+01*1 ε ε Solution 2 0+(1+01*1)0 (0+(1+01*1)0)*(01*+1+01*1) 01*+(1+01*1)

  7. 0+10 1 0 1 0 ε+1 ε 0 10 1 1 1 ε Solution 3 0+10+01*10 (0+10+01*10)*(1+01*(ε+1)) 1+01*(ε+1) Different ways may give different regular expressions for the same language.

  8. Theorem • A language is regular if and only if it can be accepted by an NFA if and only if it can be accepted by a DFA.

  9. Closure Properties • If A is regular, so is its complement A. • If A and B are regular, then A∩B, A\B, A U B, AB are regular.

  10. Quotient • L1/L2 = {x | there exists y in L2 s.t. xy in L1} • If L1 is regular, so is L1/L2 . L1=L(M), M=(Q,Σ,δ,s,F) L1/L2 = L(M’), M’ = (Q,Σ,δ,s, F’) where F’={q in Q | there exists y in L2 s.t. δ(q,y) in F}

  11. Example L2 = 0*1+0*11 L1 = L(M) 0 0 1 0 1 1 0 1

More Related