Chapter 1 Regular Languages
Chapter 1 Regular Languages
FRONT
Closed NEITHER
Open
q1 q2 q3
0,1
q1 q2 q3
0,1
• M1 = (Q, , δ, q0, F)
– Q=
– =
– δ:
– Start state:
– F=
q1 q2 q3
0,1
• M1 = (Q, , δ, q0, F)
– Q = {q1, q2, 0 1
– q3}
= {0,1} q1 q1 q2
– q1 is the start state q2 q3 q2
– F = {q2} q3 q2 q2
Transition function δ
Dr. Gary Weiss, January 27 2008 11
The Language of M1
• If A is the set of all strings that a machine M
accepts, then A is the language of M
– L(M) = A
– We also say that M recognizes A or M accepts A
• A machine may accept many strings, but only
one language
• Convention: M accepts string and recognizes a
language
q1 q2
q1 q2
• Let = {RESET, 0, 1, 2}
• Construct M5 to accept a string only if the
sum of each input symbol is a multiple of 3
and RESET sets the sum back to 0 (1.13, page
39)
0,1 0,1
1 0, ε 1
q1 q2 q3 q4
1 0, ε 1
q1 q2 q3 q4
0,1
1 0, 1 0,1
q1 q2 q3 q4
1 0, ε 1
q1 q2 q3 q4
ε
ε
ε
a ε
a
a, b
2
Dr. Gary Weiss, January 27 2008 61
Chapter 1.4: Nonregular Languages