Chapter 1: Regular Languages
For Your Enjoyment
Chapter 1.1, Finite Automata
Machine M = (Q, Σ, δ, q0, F)
accepts string w = w1...wn
where each wi ∈ Σ
if a sequence of states
r0...rn exists with
- r0 = q0
- δ(ri, wi+1) = ri+1
- rn ∈ F
Definition
A language is a regular language if some finite automaton
recognizes it.
Active Learning Problems
- Design a finite automaton that recognizes all binary
strings that contain an even number of symbols.
- Design a finite automaton that recognizes all binary
strings that contain a number of symbols that is
evenly divisible by 3.
Definition
Let A and B be languages. The regular operations are
- Union: A ∪ B = {x | x ∈ A or x ∈ B}
- Concatenation: A ◦ B = {xy | x ∈ A and y ∈ B}
- Star: A* = {x1...xk | k ≥ 0 and each
xi ∈ A}
Lecture Problem
Construct a finite automaton that recognizes the union
of binary strings that contain either an even number of symbols
or a number of symbols that is evenly divisible by 3.
Active Learning Problem
- Note: A regular language is closed under an operation
if applying the operation to members of the collection returns
an object still in the collection.
- Let M1 = (Q1, Σ, δ1,
q1, F1) recognize A1 and
let M2 = (Q2, Σ, δ2,
q2, F2) recognize A2.
- Show how to construct M = (Q, Σ, δ, q0, F)
to recognize A1 ∪ A2. Such a construction
shows that the class of regular languages is closed under
the union operation.