1 / 61

Applied Computer Science II Chapter 1 : Regular Languages

Applied Computer Science II Chapter 1 : Regular Languages. Prof. Dr. Luc De Raedt Institut für Informatik Albert-Ludwigs Universität Freiburg Germany. Overview. Deterministic finite automata Regular languages Nondeterministic finite automata Closure operations Regular expressions

bond
Download Presentation

Applied Computer Science II Chapter 1 : Regular Languages

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. Applied Computer Science IIChapter 1 : Regular Languages Prof. Dr. Luc De Raedt Institut für Informatik Albert-Ludwigs Universität Freiburg Germany

  2. Overview • Deterministic finite automata • Regular languages • Nondeterministic finite automata • Closure operations • Regular expressions • Nonregular languages • The pumping lemma

  3. Finite Automata • An intuitive example : supermarket door controller • Figures 1,2,3 • Probabilistic counterparts exist • Markov chains, bayesian nets, etc. • Not in this course

  4. Figure 1.4 Formally A finite automaton

  5. 7,8,9 Other examples

  6. Another example

  7. Formal definition of computation

  8. Designing finite automata • Design automaton for language consisting of binary strings with an odd number of 1s • Design first states • Then transitions • Accept and reject states • Fig. 12

  9. Another example • Design an automaton to recognize the language of binary strings containing the string 001 as substring • Fig 13

  10. The regular operations

  11. Regular languages are closed under … • Proof

  12. Non deterministic finite automata • Deterministic • One successor state •  transitions not allowed • Non deterministic • Several successor states possible •  transitions possible • Figure 14

  13. Deterministic versus non deterministic computation • Figure 15

  14. Example

  15. Every NFA has an equivalent DFA • Figures 17-18

  16. Another NFA

  17. Nondeterministic finite automaton

  18. Example • Example 18

  19. Formal definition of computation

  20. Equivalence NFA and DFA

  21. Proof

  22. An example

  23. Closure under the regular operations

  24. Proof idea • INSERT FIG 1.24

  25. PROOF P 60 !

  26. Proof idea

  27. Proof idea

  28. Regular expressions

  29. Applications • Design of compilers • awk, grep, vi … in unix (search for strings) • Perl programming language • Bioinformatics • So called motifs (patterns occurring in sequences, e.g. proteins)

  30. Proof through :

  31. Two steps • DFA into GNFA (generalized nondeterministic finite automaton) • GNFA into regular expression

  32. Two states q and r are connected in both directions Exception : Start state Accept state One direction only Labels are regular expressions GNFAs

  33. Formally

  34. Convert DFA into GNFA

  35. Convert GNFA into regular expression

More Related