example 1 33 i
play

Example 1.33 I Consider the following figure September 17, 2020 1 - PowerPoint PPT Presentation

Example 1.33 I Consider the following figure September 17, 2020 1 / 9 Example 1.33 II 0 0 0 0 0 September 17, 2020 2 / 9 Example 1.33 III For this language, = { 0 } . This is called unary alphabets What is the language? { 0


  1. Example 1.33 I Consider the following figure September 17, 2020 1 / 9

  2. Example 1.33 II 0 ǫ 0 ǫ 0 0 0 September 17, 2020 2 / 9

  3. Example 1.33 III For this language, Σ = { 0 } . This is called unary alphabets What is the language? { 0 k | k multiples of 2 or 3 } September 17, 2020 3 / 9

  4. Example 1.35 I Fig 1.36 q 1 a b ǫ q 2 q 3 a a , b Accept ǫ , a , baba , baa can be accepted But babba is rejected September 17, 2020 4 / 9

  5. Example 1.35 II See the tree below q 1 q 3 b q 2 a q 2 q 3 b q 3 This example is later used to illustrate the procedure for converting NFA to DFA September 17, 2020 5 / 9

  6. Definition: NFA I ( Q , Σ , δ, q 0 , F ) δ : Q × Σ ǫ → P ( Q ) P ( Q ): all possible subsets of Q Σ ǫ = Σ ∪ { ǫ } P ( Q ): power set of Q “power”: all 2 | Q | combinations Q = { 1 , 2 , 3 } P ( Q ) = {∅ , { 1 } , { 2 } , { 3 } , { 1 , 2 } , { 1 , 3 } , { 2 , 3 } , { 1 , 2 , 3 }} September 17, 2020 6 / 9

  7. Example 1.38 I 0 , 1 0 , 1 0 , ǫ 1 1 q 1 q 2 q 3 q 4 Q = { q 1 , . . . , q 4 } Σ = { 0 , 1 } Start state: q 1 F = { q 4 } δ : September 17, 2020 7 / 9

  8. Example 1.38 II 0 1 ǫ { q 1 } { q 1 , q 2 } ∅ q 1 { q 3 } ∅ { q 3 } q 2 ∅ { q 4 } ∅ q 3 { q 4 } { q 4 } ∅ q 4 Note that DFA does not allow ∅ September 17, 2020 8 / 9

  9. N accepts w I First we have that w can be written as w = y 1 . . . y m where y i ∈ Σ ǫ A sequence r 0 . . . r m such that r 0 = q 0 1 r i +1 ∈ δ ( r i , y i +1 ) 2 r m ∈ F 3 So m may not be the original length (as y i may be ǫ ) September 17, 2020 9 / 9

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend