Title: Languages and Finite Automata
1Formal Languages Finite Automata Hinrich
Schütze IMS, Uni Stuttgart, WS 2007/08 Slides
based on RPI CSCI 2400 Thanks to Costas Busch
2Chomsky Hierarchy
3Finite Automaton
Input
String
Output
Accept or Reject
Finite Automaton
4Transition Graph
initial state
accepting state
transition
state
5Initial Configuration
Input String
6Reading the Input
7 8 9 10Input finished
accept
11Rejection
12 13 14 15Input finished
reject
16Acceptance or Rejection?
17Initial State
18Rejection
reject
19Language?
20Acceptance Example
21(No Transcript)
22(No Transcript)
23(No Transcript)
24Input finished
accept
25Rejection Example
26(No Transcript)
27(No Transcript)
28(No Transcript)
29Input finished
reject
30Languages Accepted by FAs
- FA
- Definition
- The language contains
- all input strings accepted by
- strings that bring
- to an accepting state
31Example L(M) ?
accept
32L(M) abba
accept
33L(M) ?
accept
accept
accept
34accept
accept
accept
35L(M) ?
trap state
accept
36trap state
accept
37Formal Definition
set of states
input alphabet
transition function
initial state
set of accepting states
38Input Alphabet
39Set of States
40Initial State
41Set of Accepting States
42Transition Function
43 44 45(No Transcript)
46Transition Function
47Extended Transition Function
48(No Transcript)
49(No Transcript)
50(No Transcript)
51 Observation if there is a walk from to
with label then
52 Example There is a walk from to
with label
53Recursive Definition
54 55Language Accepted by FAs
- For a FA
- Language accepted by
-
56Observation
57L(M) ?
accept
58 all strings with prefix
accept
59L(M)?
60Example
all strings without substring
61L(M) ?
62 63Regular Languages
- Definition
- A language is regular if there is
- FA such that
- Observation
- All languages accepted by FAs
- form the family of regular languages
-
64Examples of regular languages
all strings with prefix
all strings without substring
There exist automata that accept these Languages
(see previous slides).
65There exist languages which are not Regular
Example
There is no FA that accepts such a language
(we will prove this later in the class)