Finite-State Automata
Non-deterministic Finite-State Automata
Finite-State Machines with No Output
JS Liu
December 15, 2011
1 / 15
Finite-State Automata
Non-deterministic Finite-State Automata
Outline
1
Finite-State Automata
2
Non-deterministic Finite-State Automata
2 / 15
Finite-State Automata
Non-deterministic Finite-State Automata
Finite-State Automata
A finite-state automaton M = (S, I , f , s0 , F ) consists of:
3 / 15
Finite-State Automata
Non-deterministic Finite-State Automata
Finite-State Automata
A finite-state automaton M = (S, I , f , s0 , F ) consists of:
states a finite set of sets – S
3 / 15
Finite-State Automata
Non-deterministic Finite-State Automata
Finite-State Automata
A finite-state automaton M = (S, I , f , s0 , F ) consists of:
states a finite set of sets – S
input a finite input alphabet – I
3 / 15
Finite-State Automata
Non-deterministic Finite-State Automata
Finite-State Automata
A finite-state automaton M = (S, I , f , s0 , F ) consists of:
states a finite set of sets – S
input a finite input alphabet – I
transition function assign each state and input pair a new state – f
3 / 15
Finite-State Automata
Non-deterministic Finite-State Automata
Finite-State Automata
A finite-state automaton M = (S, I , f , s0 , F ) consists of:
states a finite set of sets – S
input a finite input alphabet – I
transition function assign each state and input pair a new state – f
initial state s0
3 / 15
Finite-State Automata
Non-deterministic Finite-State Automata
Finite-State Automata
A finite-state automaton M = (S, I , f , s0 , F ) consists of:
states a finite set of sets – S
input a finite input alphabet – I
transition function assign each state and input pair a new state – f
initial state s0
final/accepting states a subset of S – F
3 / 15
Finite-State Automata
Non-deterministic Finite-State Automata
Language Recognition by Finite-State Machine
Given a machine M = (S, I , f , s0 , F ),
A string x is said to be recognized or accepted by the machine
M if f (s0 , x) is a state in F .
4 / 15
Finite-State Automata
Non-deterministic Finite-State Automata
Language Recognition by Finite-State Machine
Given a machine M = (S, I , f , s0 , F ),
A string x is said to be recognized or accepted by the machine
M if f (s0 , x) is a state in F .
The language recognized or accepted by the machine M,
denoted by L(M), is the set of all strings that are recognized
by M.
4 / 15
Finite-State Automata
Non-deterministic Finite-State Automata
Ex. 5
Determine the language recognized by M1 .
5 / 15
Finite-State Automata
Non-deterministic Finite-State Automata
Ex. 5
Determine the language recognized by M1 .
L(M1 ) =
5 / 15
Finite-State Automata
Non-deterministic Finite-State Automata
Ex. 5
Determine the language recognized by M1 .
L(M1 ) = {1n |n = 0, 1, 2, · · · }
5 / 15
Finite-State Automata
Non-deterministic Finite-State Automata
Ex. 5
Determine the language recognized by M2 .
6 / 15
Finite-State Automata
Non-deterministic Finite-State Automata
Ex. 5
Determine the language recognized by M2 .
L(M2 ) =
6 / 15
Finite-State Automata
Non-deterministic Finite-State Automata
Ex. 5
Determine the language recognized by M2 .
L(M2 ) = {1, 01}
6 / 15
Finite-State Automata
Non-deterministic Finite-State Automata
Ex. 5
Determine the language recognized by M3 .
7 / 15
Finite-State Automata
Non-deterministic Finite-State Automata
Ex. 5
Determine the language recognized by M3 .
L(M3 ) =
7 / 15
Finite-State Automata
Non-deterministic Finite-State Automata
Ex. 5
Determine the language recognized by M3 .
L(M3 ) = {0n ,
7 / 15
Finite-State Automata
Non-deterministic Finite-State Automata
Ex. 5
Determine the language recognized by M3 .
L(M3 ) = {0n , 0n 10
7 / 15
Finite-State Automata
Non-deterministic Finite-State Automata
Ex. 5
Determine the language recognized by M3 .
L(M3 ) = {0n , 0n 10x | n = 0, 1, 2, · · · , and x is any string}
7 / 15
Finite-State Automata
Non-deterministic Finite-State Automata
Ex. 6
Construct deterministic finite-state automata that recognize each
of these languages.
1
the set of bit strings that begin with two 0s
8 / 15
Finite-State Automata
Non-deterministic Finite-State Automata
Ex. 6
Construct deterministic finite-state automata that recognize each
of these languages.
1
the set of bit strings that begin with two 0s
2
the set of bit strings that contain two consecutive 0s
8 / 15
Finite-State Automata
Non-deterministic Finite-State Automata
Ex. 6
Construct deterministic finite-state automata that recognize each
of these languages.
1
the set of bit strings that begin with two 0s
2
the set of bit strings that contain two consecutive 0s
3
the set of bit strings that do not contain two consecutive 0s
8 / 15
Finite-State Automata
Non-deterministic Finite-State Automata
Ex. 6
Construct deterministic finite-state automata that recognize each
of these languages.
1
the set of bit strings that begin with two 0s
2
the set of bit strings that contain two consecutive 0s
3
the set of bit strings that do not contain two consecutive 0s
4
the set of bit strings that end with two 0s
8 / 15
Finite-State Automata
Non-deterministic Finite-State Automata
Ex. 6
Construct deterministic finite-state automata that recognize each
of these languages.
1
the set of bit strings that begin with two 0s
2
the set of bit strings that contain two consecutive 0s
3
the set of bit strings that do not contain two consecutive 0s
4
the set of bit strings that end with two 0s
5
the set of bit strings that contain at least two 0s
8 / 15
Finite-State Automata
Non-deterministic Finite-State Automata
Ex. 6
9 / 15
Finite-State Automata
Non-deterministic Finite-State Automata
Ex. 7
bit strings that contain an odd number of 1s and end with at least
two consecutive 0s
10 / 15
Finite-State Automata
Non-deterministic Finite-State Automata
Ex. 7
bit strings that contain an odd number of 1s and end with at least
two consecutive 0s
observations:
1
odd number of 1s –
10 / 15
Finite-State Automata
Non-deterministic Finite-State Automata
Ex. 7
bit strings that contain an odd number of 1s and end with at least
two consecutive 0s
observations:
1
odd number of 1s – odd/even on 1s
10 / 15
Finite-State Automata
Non-deterministic Finite-State Automata
Ex. 7
bit strings that contain an odd number of 1s and end with at least
two consecutive 0s
observations:
1
odd number of 1s – odd/even on 1s
2
end with two or more consecutive 0s –
10 / 15
Finite-State Automata
Non-deterministic Finite-State Automata
Ex. 7
bit strings that contain an odd number of 1s and end with at least
two consecutive 0s
observations:
1
odd number of 1s – odd/even on 1s
2
end with two or more consecutive 0s – 1 0, 2+ 0s
10 / 15
Finite-State Automata
Non-deterministic Finite-State Automata
Ex. 7
bit strings that contain an odd number of 1s and end with at least
two consecutive 0s
observations:
1
odd number of 1s – odd/even on 1s
2
end with two or more consecutive 0s – 1 0, 2+ 0s
10 / 15
Finite-State Automata
Non-deterministic Finite-State Automata
Ex. 7
bit strings that contain an odd number of 1s and end with at least
two consecutive 0s
observations:
1
odd number of 1s – odd/even on 1s
2
end with two or more consecutive 0s – 1 0, 2+ 0s
10 / 15
Finite-State Automata
Non-deterministic Finite-State Automata
Ex. 7
bit strings that contain an odd number of 1s and end with at least
two consecutive 0s
observations:
1
odd number of 1s – odd/even on 1s
2
end with two or more consecutive 0s – 1 0, 2+ 0s
Can we simplify it?
10 / 15
Finite-State Automata
Non-deterministic Finite-State Automata
Non-deterministic Finite-State Automata
A non-deterministic finite-state automaton M = (S, I , f , s0 , F )
consists of:
11 / 15
Finite-State Automata
Non-deterministic Finite-State Automata
Non-deterministic Finite-State Automata
A non-deterministic finite-state automaton M = (S, I , f , s0 , F )
consists of:
states a finite set of sets – S
11 / 15
Finite-State Automata
Non-deterministic Finite-State Automata
Non-deterministic Finite-State Automata
A non-deterministic finite-state automaton M = (S, I , f , s0 , F )
consists of:
states a finite set of sets – S
input a finite input alphabet – I
11 / 15
Finite-State Automata
Non-deterministic Finite-State Automata
Non-deterministic Finite-State Automata
A non-deterministic finite-state automaton M = (S, I , f , s0 , F )
consists of:
states a finite set of sets – S
input a finite input alphabet – I
transition function assign each state and input pair a new state set
of states – f
11 / 15
Finite-State Automata
Non-deterministic Finite-State Automata
Non-deterministic Finite-State Automata
A non-deterministic finite-state automaton M = (S, I , f , s0 , F )
consists of:
states a finite set of sets – S
input a finite input alphabet – I
transition function assign each state and input pair a new state set
of states – f
initial state s0
11 / 15
Finite-State Automata
Non-deterministic Finite-State Automata
Non-deterministic Finite-State Automata
A non-deterministic finite-state automaton M = (S, I , f , s0 , F )
consists of:
states a finite set of sets – S
input a finite input alphabet – I
transition function assign each state and input pair a new state set
of states – f
initial state s0
final/accepting states a subset of S – F
11 / 15
Finite-State Automata
Non-deterministic Finite-State Automata
State diagram and state table
Find the state table for the machine
12 / 15
Finite-State Automata
Non-deterministic Finite-State Automata
State diagram and state table
Find the state table for the machine
12 / 15
Finite-State Automata
Non-deterministic Finite-State Automata
Theorem
Thm. 1
If the language L is recognized by a non-deterministic
finite-state automaton M0 , then L is also recognized by a
deterministic finite-state automaton M1 .
13 / 15
Finite-State Automata
Non-deterministic Finite-State Automata
Ex. 12
Find a deterministic finite-state automaton that recognizes the
same language as the machine
14 / 15
Finite-State Automata
Non-deterministic Finite-State Automata
Ex. 12
Find a deterministic finite-state automaton that recognizes the
same language as the machine
14 / 15
Finite-State Automata
Non-deterministic Finite-State Automata
Exercisers
9, 11, 13, 14, 16, 17, 19, 22, 23, 43, 45, 46, 47, 49, 53, 55
15 / 15
© Copyright 2026 Paperzz