Computational Linguistics: Dr. Dina Khattab
Computational Linguistics: Dr. Dina Khattab
Lecture 2
1 2 a c
3 b
Finite State
Automata (FSA)
5
Finite State Automata
Language Recognition Problem:
Whether a word belonging to
language?
2
e.x. String: abb a
1 b
a
Give other Examples! b
3 b
9
The language accepted by A1 is the
set of strings of a's and b's which end
in b, and in which no two a's are
adjacent a
2
1 b
a
b
3 b
10
Finite-state Automata
An FSA defines a regular language over an
alphabet :
• is a regular language: q0
= { a, b, c} q0 b q1
= { a, b, c}
q0 b q1 c q2
FSA Example
Consider the following FSA
T: {0, 1}
Q: {s1, s2}
I: s1
F: s2 0 1
S1 S1 S2
E: S2 S2 S1 12
FSA Example
0 1
S1 S2
13
FSA Example
Determine which string is accepted and
which is rejected:
01101
011011
00000
11111
10101010 14
Assignment (due to 14 Oct.)
th
abb
abba
bcbccc
caaabbc
16