example 1 11 i
play

Example 1.11 I Fig 1.12 September 13, 2020 1 / 12 Example 1.11 II - PowerPoint PPT Presentation

Example 1.11 I Fig 1.12 September 13, 2020 1 / 12 Example 1.11 II s a b q 1 a r 1 b a a b b q 2 r 2 a b September 13, 2020 2 / 12 Example 1.11 III L ( M ) =? a . . . a , b . . . b where . . . can be any string of a and b


  1. Example 1.11 I Fig 1.12 September 13, 2020 1 / 12

  2. Example 1.11 II s a b q 1 a r 1 b a a b b q 2 r 2 a b September 13, 2020 2 / 12

  3. Example 1.11 III L ( M ) =? a . . . a , b . . . b where “ . . . ” can be any string of a and b September 13, 2020 3 / 12

  4. Example 1.13 I Figure 1.14 September 13, 2020 4 / 12

  5. Example 1.13 II 0 q 1 � t e s e 1 r � , 2 1 2 2 q 0 q 2 0 1 , � reset � 0 , � reset � September 13, 2020 5 / 12

  6. Example 1.13 III Σ = {� reset � , 0 , 1 , 2 } L ( M ) = . . . . . . � reset � . . . � reset � . . . = { sum of the last segment mod 3 = 0 } Example: 10 � reset � 22 � reset � 012 September 13, 2020 6 / 12

  7. Example 1.13 IV Running this string � reset � 1 0 2 2 q 0 − → q 1 − → q 1 − − − → q 0 − → q 2 − → q 1 � reset � 0 1 2 − − − → q 0 − → q 0 − → q 1 − → q 0 Accepted. September 13, 2020 7 / 12

  8. Formal Definition of Computation I M accepts w = w 1 · · · w n if ∃ states r 0 · · · r n such that r 0 = q 0 1 δ ( r i , w i +1 ) = r i +1 , i = 0 , . . . , n − 1 2 r n ∈ F 3 Definition: a language is regular if recognized by some automata September 13, 2020 8 / 12

  9. Designing Automata I Given a language, how do we construct a machine to recognize it? Basically we need to get a state diagram (where the number of states is finite) An automaton recognizing { 0 , 1 } strings with odd # of 1’s Fig 1.20 September 13, 2020 9 / 12

  10. Designing Automata II 0 0 1 q e q o 1 Examples 01 0 1 − → q e − → q o q e 010101 0 1 0 1 0 1 − → q e → q o − − → q o − → q e − → q e − → q o q e September 13, 2020 10 / 12

  11. Designing Automata III Two ways to think about the design After the first 1, we go to q o . Subsequently, every 1 , . . . , 1 pair is cancelled out by 1 1 − → q e → · · · → q e → q o − q o q e , q o respectively remember whether the number of 1’s so far is even or odd Example 1.21 strings contain 001 Fig 1.22 September 13, 2020 11 / 12

  12. Designing Automata IV 1 0 0 0 1 q q 0 q 00 q 001 1 0 , 1 q 0 , q 00 indicate that before the current input character, we have 0 and 00, respectively September 13, 2020 12 / 12

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