Applied Computer Science II Chapter 1 Regular Languages
- Slides: 61
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 Nonregular languages The pumping lemma
Finite Automata • An intuitive example : supermarket door controller • Figures 1, 2, 3 • Probabilistic counterparts exist – Markov chains, bayesian nets, etc. – Not in this course
A finite automaton • Figure 1. 4 • Formally
Other examples • 7, 8, 9
Another example
Formal definition of computation
Designing finite automata • Design automaton for language consisting of binary strings with an odd number of 1 s • Design first states • Then transitions • Accept and reject states • Fig. 12
Another example • Design an automaton to recognize the language of binary strings containing the string 001 as substring • Fig 13
The regular operations
Regular languages are closed under … • Proof
Non deterministic finite automata • Deterministic – One successor state – transitions not allowed • Non deterministic – Several successor states possible – transitions possible • Figure 14
Deterministic versus non deterministic computation • Figure 15
Example
Every NFA has an equivalent DFA • Figures 17 -18
Another NFA
Nondeterministic finite automaton
Example • Example 18
Formal definition of computation
Equivalence NFA and DFA
Proof
An example
Closure under the regular operations
Proof idea • INSERT FIG 1. 24
• PROOF P 60 !
Proof idea
Proof idea
Regular expressions
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)
Proof through :
• Two steps – DFA into GNFA (generalized nondeterministic finite automaton) – GNFA into regular expression
GNFAs • Two states q and r are connected in both directions • Exception : – Start state – Accept state – One direction only • Labels are regular expressions
Formally
Convert DFA into GNFA
Convert GNFA into regular expression
Induction Proof • Induction proof
Nonregular Languages • Finite Automata have a finite memory • Are the following languages regular ? • Mathematical proof necessary
The pumping lemma
Proof Idea
Nonregular languages
Summary • • Deterministic finite automata Regular languages Nondeterministic finite automata Closure operations Regular expressions Nonregular languages The pumping lemma
- Which grammar generates regular language
- Applied science vs pure science
- Pumping lemma non regular languages examples
- Decision properties of regular languages
- Decision properties of regular language
- Closure properties of regular languages
- Decision properties of regular languages
- Decision properties of regular languages
- Properties of regular languages
- Regular and irregular languages
- Contradiction example
- Right linear grammar to left linear grammar
- What is your favourite subject in college and why
- History of computer languages
- Animation refers to
- Programming language hierarchy
- Lone star nursing requirements
- Unit 7 btec applied science
- Applied prevention science international
- Esslingen university of applied science
- Importance of applied science
- Btec applied science level 3 unit 4
- Fu foundation school of engineering
- Applied medical science swansea
- Applied principles of horticultural science
- Wjec applied science single award
- Uc college of engineering and applied science
- Rmit applied science psychology
- Applied science projects
- Computer science illuminated chapter 4 answers
- Invitation to computer science chapter 10 answers
- Chemistry: the central science chapter 14 answers
- Natural vs social science
- Brances of science
- Natural and physical science
- Natural science and social science similarities
- Extra credit
- Rule of 70 in population growth
- Windcube lidar
- Hard science and soft science
- Gcse computer science wjec
- Phoenix online computer science university
- How many fields in computer science
- Procedural abstraction example
- Unsolved computer science problems
- Bridgeport engineering department
- University of bridgeport computer engineering
- Sequencing ap csp
- Ucl bsc computer science
- Ucl careers service
- Casting computer science
- Predicate logic tutorial
- Computer science illuminated (doc or html) file
- Himpunan logika informatika
- Yonsei syllabus
- Sat in computer science
- Ib computer science topic 6
- Data representation computer science
- Ap computer science recursion
- Recurrence relation computer science
- Pda computer science
- Anticipating misuse computer science