100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Lecture notes

Lecture Notes on Automata and Patterns (COMP11212)

Rating
-
Sold
-
Pages
5
Uploaded on
30-05-2024
Written in
2023/2024

Explore the intricate relationship between automata and pattern recognition with these comprehensive lecture notes for COMP11212. Learn about different types of automata, their role in recognizing patterns, and their applications in computational theory. Detailed explanations and visual aids help demystify complex topics, perfect for deepening your understanding.

Show more Read less









Whoops! We can’t load your doc right now. Try again or contact support.

Document information

Uploaded on
May 30, 2024
Number of pages
5
Written in
2023/2024
Type
Lecture notes
Professor(s)
Francisco lobo
Contains
All classes

Content preview

Automata

babb X
Practical Example
·


Ab
abba v
Let I =
(a by ,
·




=
a E
aba v
We want to
·




identify any words over alphabet I such that they have an even numbers of as J
a, b
Let's draw an automata with two states [EVEN , ODD] for the numbers of as I've .
seen
> &
Da ,
b · a bab
X
F


· bb ~
b
6 b

a
x2 x2 abbar
W
ba
as abb X of

·..
↓ A
=
z
LVEN ODD
a



a




Deterministic Finite Automaton (DFA) DFA Acceptance

Definition 5: Let I be a finite alphabet of symbols. A (deterministic) finite "automaton Definition 6: A word S = X, ... An over E is accepted by the deterministic finite automaton
or DFA , over I consists of the following :

(Q 6) if
, 9 ., F,

·
A finite non-empty set Q of states ·
S(q ., x) =
91

·
A particular element ofQ called the start state (which we often ·
S(q1 ,*2) =
A2

denote with
qo) ...




·
A subset F of Q consisting of the accepting states ·
S(qn-1 <n) ,
=
An and


A transition EF ,
function & which for that accepting state
·

In
every state q Q
·
is
and , an is an
every
symbol zeI returns the next state 8(9 2) EQ
,
, so 8 is a



function from QXI to Q .
When S(q X) ,
=
q'we often write
.




G > q!·




We sometimes put these together
four items in a
quadruple
(Q , 9 ., F, 5)


Examples
Ab
Da b
c
,



>
a
D
Da b ,
>
S
D a

F



b a *
(ab(ba)(a(b)
b
*
(a(b)

&
a
W a
ab
*
a b
aab a(a(b)
A


↳ ba
a
> Da ,
b
a b
,
T




bs A




>
a
>
Da b , b
*
Jas
ja N

b dump state
(you cannot leave this state


aba 49 b ,



N



unreachable state




We can simplify it !
R
>



ja
b

, NFA Acceptance
Non-Deterministic Finite Automaton (NFA)
Definition 8 : Let I be a finite alphabet of symbols. A non-deterministic finite automaton Definitiona : A word S = X, ... Un over E is accepted by the non-deterministic finite
or NFA
,
over I is given by automaton (Q , q ., F, 6) if there are states


·
A finite non-empty set Q of states 90 , 91, .... q


·
A start state go in Q
such thatqo =
g .
and for all : < n
8 relates (gi , Xi) to gite and such
,


thatqn
A subset F of Q consisting of
is an
accepting state The language recognized by an NFA is the set
the accepting states
.

·




of words it accepts.


·
A transition relation s which relates a
pair consisting of a state and
a letter in I to a state. We often write
transitions from input
It means that it can have 2 or more a
given state for the same



G > Xq


if (q , 2 is S-related to 9

BFA us NFA


Example The key difference is in the transitions ,
for a DFA it is a
function whilst
for a NFA it is a


relation .




a Db abb
> · v Take this DFA
ba
N X
a) A
f(A
·
A =
a,b

b ·
ababb X
↑ b ,

L
· aab > A F
BDa f(A ,
b) = B
X

abbbab v b
B
f(B a)
·
=
,



b) A
f(B
=




f x
,
: > T




Rf (k f(x)z = X] ,)
(SA
=
DFA : B3 , A , (B3
,

,




=
NFA : (SA , BY A , ,
LBY , Rf




A DFA can be an NFA but an NFA cannot necessarily be a DFA
.
,




Algorithm 1: NFA to DFA


Given an NFA(Q , q ., F , 5) we can construct a DFA as
follows :
Examp1.
b
(P(Q)
a
,
,
39 . 3 , 15 [Q JqES with qEFY S , ↓
~
N
D
b
start state > A s > c


powerset of Q accepting states



P(Q) = [A , B, C , AB , AC , BC , ABC , ]
S' (S ,
x) =
GqEQ zgeS with q sta F = (C ,
Ac , BC , ABC)


unreachable
eb L unreachable
b -
Conly trasitions coming in
A C
>
B 3

D
b D
are also unreachable)
a

O
a, b b

*
b


AB Al BC



·
↳ a
D *
unreachable



a ,2
L
a




*
ABC L unreachable

↳ D




·


dump state



We can -

further simplify this




Aub O
AC




&
so
AB


£5.49
Get access to the full document:

100% satisfaction guarantee
Immediately available after payment
Both online and in PDF
No strings attached

Get to know the seller
Seller avatar
jpxoi

Get to know the seller

Seller avatar
jpxoi The University of Manchester
View profile
Follow You need to be logged in order to follow users or courses
Sold
0
Member since
1 year
Number of followers
0
Documents
20
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their exams and reviewed by others who've used these revision notes.

Didn't get what you expected? Choose another document

No problem! You can straightaway pick a different document that better suits what you're after.

Pay as you like, start learning straight away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and smashed it. It really can be that simple.”

Alisha Student

Frequently asked questions