FoRMAL LANGUAGE AND AuTOMATA THEORY FLATJ 06/02/2025
(re Requisite:
1, AVB Sn|E A oT nEBE 1. Basie idoa on 3ar They
2.
blserete Maths
2. AnB ylyeA and ye 8? 3. Shing operahoni
A+8, AUB- An B
A I, 2, 33, B 2, 3, 4 {1, 2, 3, 4 3
A+0 AnB 2, 3
4, 2, 3, 2, 3, 4 I
x (A UB) : n(A)+ x (8) - (An 8)
Cros Pro duet
Power Jat A:
2 (4)
3, 1, 2, 3; (1, 2), (2,3), (1,3), (1, 2,3)?
IAI
(A)| 2 2 8
|A =3eardinalihy
Concatenahion :
AB = xyleA &Yeo3
BA
y is not ordered pair, it i a shing.
{A, 8,.. . 2, a,
b ,Z, 0, 1 ... ,4 ?
1SI = 42. ’ cardinalihy
oing:
Eg! w - Azed ?0 it is denoted by cw,s, y, 2
Longhe).Jring :
" Total . ol element in shring :n
Concatenakon l Shing
Noll Shing:
’ it it a atring withoot any sgmbol
’ denoted ,A,E
’ w w: Aw [Tdenhty elementlike o, 1 ]
Jo/02 /2025
FoRMAL LANGUAGE AND AuTOMATA THE ORY [FLATJ
Automata (Finite Jtate Machine)
DEA NFA
(Determini sie finite Autoata] Nor- determi nisie Finite Automara]
M: (4,E, S.4..F> N: <a, 5,, 1. F>
DEA:
Q’ set ol inite state < Q Ql n+1
Z’ set o input symbol/alphabat< a :$2o2,42 2n 5
F’ sot finite state (- F:
where k n
S ’ Transiion Funehion t
A $3, 1, 3 , B {2,3, 4
-(1,2), (1,3), (1,4), (2, 2), (2, 3), (2,4), (3,2), (3,),(3, 4) Ý
8 : A-Z, a-z, 0-4?
L,$a, b? Prev Stae nert &hale
NFA
2, §a, b
aab, abba, aaaabbb.
1.N = N.1 : N
)
0+ N= N0 N
A 1, 2,3
P(A) =¢, 1, 2,?, (1, 2), (1, 3), (2,3), (1, 2, 3)?
where, 4¬
q'G P(a)
S:Sa, b
0 A? $A, a, b?
final &tata
(43
Bharting tale dumy tate
Sehomahe biagom Automata i
Jnput Pag4
a
Readlny
Head u:baab a bab
Finite control
1 4; ¬F, the string cw'= baababab is aecapted -y the nachine M.
trap state
|T (4)| : nt
shring
Alphabat S:a, b?
| wl &|5|
onsteeaton the 3bring:
Kleany elosure: *’ colleckion q all srings
U
S,: $a, b3
Z, 3 aa, ab, ba, bb ?
(
2-3A,a,b, aa, ab, ba,bb.aaa, . ,bbb,.., aag 5sb. oE
3 10,,53, 00 0, J1,111... 000, . , 115...4, DO0...0...O{
"o,1,1L, 10, Di, 11,.., ...?
J1/02/202s
FORMAL LANGUAGE AND AuTOMATA THEORY FLAT]
S= jA-Z, a- z, 0...9?. IsI: 62
cardinaity
the set
= total ne. o elemantc in
Z : 3t input syabol or alphabats
K 0, 1, 2,3
E ° i colleehon al thring having kngh O.
colleehion y au sring haing length 1.
E* :$aa, as, ba, bb collechon au sring having length .
E
M :$aaa, abt ....bHb3 - colle chion all sring kawing lengh s.
= 202,2a as,aalt. collechon auiming having lengh k.
E*: PE°U S, UE, U...*U
collechion y all s ring prodyced by the
-3^, a, b, aa, ab, ba, bb,.. oo : t is a S.
syrmbols takan Jrom
Sa,b,aa. ...?
Problam. §,g.2?
*=A, ,, , x, Xy y2, 2x, L .. .
t * - Saz
Ly :3A, b, abb, aobb ?
l2 : a , bba, bbaa?
pAb, abb, aabb, a, bba, bbaa ?
DFA FA NFA
Finite Auhmata
M =<a,,6,4oF) N <Q,E,5, 4.,. F
S:$a, b? a'eple)
fORMAL LANG UAGE AND AUTOMA TA THEORY FLAT 13/0212025
Jnput tape
$aaa
Reading Head
2 Jar hing trate
n Fina! Phare
(Aesume)
>3A-2, a" z, 0-9}
DEA
M a , ,8, ,:F)
Suppeze:
Given
1. S (4, ^) =4
2. 3(9.aa) : (8(a, ).w)
8 (4, a) : s(8(4, ),a)
where sla_le iymbol
wi wa ay az...QnsQ
a ai .
Given
a, a1an
= (3(4o. ao).c) uring propenty
Wi> a, a a 2 . . an-t is accepted by DEA
Pictorias Reprarcntaion :
anl
LanguaggGeneratod by DEA :
M:
eollecion ay al string Jor whiea ter
SeAnning entire sting veaches rom
where M : (ai, 4o, F> starting state t eding eiata.
ngag&benaratac by NEA:
cofection au ybing ! ad into intersechon
is non - null
uhere Ne <Q, 1, 8.4,, F)
14/02/2025
FLAT]
FoRMAL LANGUASE AND AUtOMATA THEORY
Designingg Finike Auto mara (FA)
Ihere Must be one and maona d sfate,
k
2.Jhere Must be ne at loast ane Jinal state.
3. In case el eomditn traasition all input condihion must ba weu defin ed.
MUtt have me value
Bot in eara NFA, it is not mandator
4. Jn ease o bFA, J(4,x) is uniue.
Bot in cae ay NFA, (ei) it ot uniq ue
Bfen Determinishic
ony one 0.over Eto)
Design afinite Automata which will accepr a string having
I :{0, 13
Input 3ring
M ( , S, s, 4o» F
DEA
Start
2d odoad /trop dmony
O.0ver E -§o, I
a Finita Automata whieh wil aceept a shing having at (eart 0ne
Deslgn
Som
W D/oo/ot / o01 /o o/.
ending wi ending with a over I a6?
3 Design a FA which will accept the shing
Jnput Shing :
wi
tO100/I oo/400 /il boo/10100ftolo0D
Start
over E" 3 0, ?
4. Design a tA whieh win aceeph the shring ending with oo0
Start
State Tran silion Takie ? Stae Tranihn braph.
8/2 0 8 State Transiton
ending wilh abe over a, 5, c}
5. Design a FA whieh will accepr he string
Soln:
wi co abe uhera wt §a, b, e 3
ababe aabe
babe) ab ababe
Star'
b,a