Toc Notes

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 82

Iheony Computation Jprl2/09/2023

(n) dawdtony
Irput Model otputt

Compatalrty
ilog
Auto
Jhuony
Compy
|on
P :maY

T
1T Jhoe9
JI, <l
Computaton

→ Deals wtth hao <l|rty ths hY probumacanloe A-

Aolved
Omyputaton
J
slatr to ansthe stat calluot
→ Changi om One

machinn.
Automata E: Rtgeator

Lotraucon o omal Proal:

forlro; ri:t) cattön TFrnu comnpbny nereose

tor (i o: n: 4J comute
Jotnal piottd
JS

Irductare Doductre
prool po-
Deductiu Pral oialas)
poteats (H) toniConcuston (),1

Thuorem: 1 thuna2 1 ohs


2
H: 9 4

14 F
1;a'y :221
2 →F o = 2;2'2 2 4 A →T
F
?3;2 3o 84
32 25→T
a:b b → T
suitono

= 4 5..5.,. DD
pialsl

Nau o 2' gt doubd

()( ()) ())


LHS: incTeaseod thon
lamo

25

( 34

kquau ol tou pasttve ntrys


Theorem:
TTa fs t bum th
then 2
Jo
Comiautve 4

a, b, c, d,
thn 2" a
I a:a'4b'4ce
'4da
Statmant Justtottba
toundnlb
1. -a'+b'te4d Gven

4 2"2 1 Iheoremm 3
2.

3. T a, b, c, d =| 9
Prfneiplu ol 2

I+ 1+ I41 Eoraputato
afthme tPe 1H

H
arth mtie

5.
Pinctpu
antthmtr
b. 2? , n hrom () ard
Sot U.
Theorem L.5: Lst S be the 7te subset somsInat thon
sprct
Lut T be thConmplaminte s wth uspet
Tstnttnit. k
dvndoubleroaus
Statt ment Newostat munt
Otgtrat Thee an intg uch t |s1]:n
initr
no ntg p s lulp n
2. u is intin?tr

3. Ts Lorplement o s SuT - U sot -


q0
(uioo)
hos A
oau
A
OtherJhorem tovm
toamatn2
) slatumont
) 4 and oly I slatument

then
a2teen, 2
I. H mpltas
Nsqa)
22.Honly i
3.
2.
227

4. alhene ihölda e tolo. henve


4. whenavu ny holde22
yalloy

diiliiby b, thonn must be tnu.


) an trntg n Coneluson.

imp ltes n muat be tns.


tnbga n | divisibleby b
n must be tw,
Jnteg n diviel by o
3 must b tnu
41
4. henva Intuga n ditsttu by binhold n dtttec
dnini stat2
t- l||+roust, be tnu ollouss
Staemeot L
d,o
IA and ony 3 B
A
(c
pvs) Tg
3. A 2qulva lumt to B

A. A enaty ulhen B

Jhe Amnt & too - Btalemnt

A then & ! Bthun9*


Jhonm:
hoo
Let bu the al numbel Jhen LJ:13(oe)u
.
and
;coro
an
ntg.
2ymgolNot rqual)
2

Grven: a s an ntgca: Ih di tton But hotn

Atod

(o)
Opvetsine
de nit
and tortrg

Snu fven thatLz J = T], G]x and T*<a


(TUNJ ni
athmet oqatta catl Valu aro
cotl Valeu ar
By the propets
an
or atu el x & aloay anTmitga

báaHforalomigpoo 1
I.Proakotipatz
2. Proy by tontyasittonj TU ni
Count enamplu
3.
Proy i. T he 2

()
Atod

&
(TO2
(TO2)on J
fi
fi
Should be pwnt
Prod about t: :
no
Ru(sot) (Rus)o (RUT)nat larr
Thuorem:

Jut attn
be Statimet
in RU (snT) Gqverss 2
2. in R(r)2 Dfator iol

3. a n R (o%) Dyinttbn
a B n both ano T irtvsectBn,

trDetatton
uon.
a s în (RUT)

5.

T. a 8 în (Rus (RUT) inursection


youls
ony 1 pat:
a3 in (Rus) n (RuT)
Dnitton tnitvueonjpo
2.
in Rus
D4sitks 4nterutton
3. in in RUT

4. a s in R (or) a
4 → Diniton unn .8
fs in both S and T
Detinitton intretfon
5.
(so) Defniton
b. n s în R ulsor)
fi
Proay by Counte Enome: thun pat
pt mut be
tu,(Conlusfor mut byalse
Cdol,
Eramplu: Al pofmes au .Lqd
moita the slatamunt hypotun,
a pome

8 not odd - Coneuson yalse

Enamgl: thnumb &paet


sghaentonit ,odd.
Dipo: 4 a payut Agua
4 % not
and
and Bbkuchthat
Bbkuch thot o uid
Theorern:Jhe t no paPt e nbge
ad kb = b mod arvstqor1
a<b
Cae (), asb
Cael)
b 3 (+2,3 b: 2

a mod be +8+SA 1
a mod b
mod 3 2
mod a
b mod a 3 mod
a mod bt b moda
a mod b+ b mod a (s)

[ou(1)
a: 2 b2 abnt
mod
mod b wy
2 ()q
bmod'a 2 modR= l*)x
@ med b: b mod

(11)bN t&C1 :2114

(i0) (1li)
Jrductve Pro:
nuulhg0))
the 'statemunt irductn.
blba

t rudu ba Atps.
shar

step1: &tat e propotorg


als n wyna) Jorn
Base Caue

Sty 3: tomulat the tnduttre hypoti sdmnu t :spnen

.
ton
Steph: Pav oanduttu stept
sip 5: ktatr the conelton
jort
iru
nt natualhumbusl+2+3+ . n =
n(mti)
I. bum
sep I: Sat the propostfos:
d

H2+3 +.. . n nn+)

sep 2: Vaty the: Base cae:

n:l
LHS=J RHS (2) 1

LH$ = RHS

Enducte
tep &: tomulatt tu
n=k+1
Plk) tnu n (ht)
14243 ..
k : k(K+1)
=
2
(ki) (k+1+1)
Step4: Prou tu troucttnst :
LHS:
14 2434... k n
klktH)tk +)
k'+3k+2 (k+1)lK+:) (hotk141)
(htK4141) RHs
2
k(eH+ 2(kti) 2 2
Automata Jony 5o9l293
Automata Jhy s the Ahudy o abstact computt modulmachtnes
push

it-nol4 (OF)
oorodu
SI
pull
(sutd)

Apelfatior a Automata Jheog:

> Patan Motchtg Pasnord)


ched
o.

Notatfons a Autorata
osrrlara)
* Aymbols: Rap! alphabek a, bi, cI ... (o. . 2...)

* Alphabet : Collecton
E fo,i3
Colluetfon Aymbok ove an olphaket.

) ob
Lang : Coletton
a, b, ab, ba, aaa...
,
st a al Attng alphabetlur

di L =fa,b,ab,ba,
abb.y
* Klunsta: (3*) init st

* Kun closua: (+) Conai

E: *-
EI'Uz'UE Ų..,
ARtteAutomataovn a, )

NEA
DFA
Non-Detamnistfe ntAutomata
DetamnitR 4onitt Automata
12
DFA:(@,E, , qo.F) set° e by (a ot)
Q: Bet a all &tata
aon oiA
S: Inpt tuncton
J: Tarnton unckon, marri
o Tnttial state
Teral Atatr

1.Constuet a DFA. whehaccept al t Abtngs EN an alphabkt


*oiglo Iqo
stats with 'o

L: {o, oo, ol,o1o o l0, o llol,

t fo- Ttal Atat

odsd Atat

Tiasstton Table
2
i (*:)
ialent stotr
Pruent
s LoT
fi
22 Comtnet a DEA Whteh aceejots all s frgs OVu an alphakrt,
E: fo. iy stats with 'o

io,ott
(1 ,
olol, ollD,Ololo, oll .- 31
0) Statr

Transton table :

I↑0.

(dud stert)

DEAWktekstat Witn Ove tho fnput alpratetr


3) Costnct a DE
I: {a,b4Atats,o'uth'a!.
L a,ab,aa
abb,Qaa
... }

ab
) E : fo,b} - endi la'
Lfab, aab, bab, Qaab , abab .
. gO 1010, 1000
o
e

) :fo,14 whe 'ARng Containso' as substng


L fo, oi, to, ol,to1, olol, ...
.
Non. Ditrmnst Fnt Automata
(Ds stat no nend in FA
(@,E,S, . F)
I.ConstuetNFP, ulrehacceptk alktnso ovecanio
dlphabet Sa
heen the Atngs_Ktat with ol
yo4dGt s logp
L pI, o, oI0,O10,ono,o11, 10,-. yTaji

( tds beit)
Jkanstton stitt

Jaarchsva)

Eto,i ds}

all an
2) Constnut NEA nhe aceepte
lhen thu Atarg ende with 'oI. d P
stet s, loqo
LYo!, Dol Jo, o001,5O,1001, *

Trantion Btat Q .9..93


'o
4. f.,1
)ConctictNEA ahchaceptt attithetr knaott
2 Conseeute oi's Ovu analphabet E o,3
e
L tu,o,I1,o0, t, tot,'oi"..go Tig
2
Tranton Tabl
9+1E3sto

o
4,

.011 iatna ndedud


the stirg that endiT(
A Constet NEA ghth oaeepts, all

wth o. OVe an afphabt

o
e
TranatKon Tab, o
S
o
tath fhrorl
Q-99.

F
kroisd
5)(onstnmtan NEA wtthalphabstfo,1 h whteh i tollood (e
co'. VbussvC

L 11D0, o|lo0
Khost 5 stata
o,
vco)ti!
taHon statt

s
NFA in whh all thu contafs IO,

)Dn ange
L=10,tol, oito, 10, moi:. 2 aa) A
!}Idtglo
Isansiton sate

Co o
F
o
Laststatg si beband
) Conttut AFA tor
tor allbinasy tg Pn
wnehketordLart
stbsthgi
C
) onstnut
Do0 b,
L=o,, lb,||D, .
0,1

1,0
2oloal20s
DFA NEA

x EQ d 6OX,S
A Tsanattonod to
TansAbn stotr

bach TransTifon uacs to

acty on statr or th multçle stat.

rtamnistie)
hot allod,
Backtrocktng alloued. Bacrtae

(1of txarxtton

Emet tia (e)banaton in NE
alloeod
U notatlowgd n DE (
→NO isp hot kubset ol DFA
→DEA Y a subet NA
AConvet NFA to DEA in
tonpia')

>DFA s deeit Costuct


to conntruett

onyeusfon.
al.NFA to DFA
13 o
) 8 (9),:
OD, )
3(o) '%,
TiaittonTable o..) (4

96..3 8)3 (,o):


$t%.9%.4
Eautvaunt DFA

dse

.koaualla
pühestate?

Convesfon ND to DFA

s(o.) paia
hauals 2) J (%e.33,) -$(9, o)8l3,0)

hi)a
Jooto

(.(o%
1

) &(4.0)-#
Equtvalsnt DEA ,.

(o,
Co.s)se
O, 1

Tvasfon labu
9(w)
→o
((re))& -(w.p)

o.t.9nj to.3}ui9jut)
tooa0 ot

.9,9.4) fRo,9..3,3j0 Fo,i, 483uiy

{to,4,4 {o,igut43
196,%..:)

Egutvalent DEA
(210)

o Nol
Entendes Tzanon tuncfon e DFA
alol201

ransftn Funeton: S(,a)-P cep O o)


A
Erturod Tzanston unctfon : Sl4,w)p(an stau)
Basie: Sta, e): P (fom sau)
Jrsuton:S(4,w) p o ol9a
J(4,aa)u

8 (P.a){*
= Pivfrt$ (atej.s}o:?
Dasign a

o0,
oloy,oio,onco.-. T log

Tzaneton diogsam sų'loopCont:pat btoz, t orea odd

trlstug
ITarsttfon labl :

1(.t)
Qach prt olo
at

Rnput ymhol
stot)
Basfe :

Inducton :
(q no
1 :).)

A S(go.o).7:a, (.g)3
s(s.o,o,): (o,s)2

S(4,,1)
(oo,))s6.9n)s
(o$t:bu): s($(%, od)a
(o.)6o(o-#7:8(s, 1) sldt noļi hns| (
at.ssl.gn),

)
(9ourb) s(3(4%,om),o)

t(a'enio)
s(*».)
low))t- (oroa ono)
o) LFPial.Ato)(of)i
LFrola n
)o(o.*)o (o.nf
acaptd..)8
Ths
(1.(orard,,e) )3-(ero1o, 6f) &
(1Co,.tl3)8 - (9,)
Btndd Trang4fon Funtton NEA

Tsancttfenunctton: 8l.a) p
Erterded Trasttfon tuneton : S (9,w): P
:Siand
Baste: S (%,e)-p
Indue
kson:S (4, w)p(8 %,a)P (oo)2
$4,~)- $(j$ia, )a)
Psue: S (9,)= f, RR.. P f6

- S(t.a)us(a,a)oS Ca,a)....US tR,.)


o stotr

whthe the
(,oIO acuptzd by aivn NEA

f(o.o10)-(s(ao,o))

) Tsansifon
Quo

tablu
f)3):
'oi6si9. o)u s(,.0)
A

o o, (tno,of)'2) 3%.944)
(o,.9 ) oio1): d(3lo,o1),)

Radie:
(at)t
Iiductn: &t'%o,c) - s(Îl%o.4),0) Cod (%o, oto1o)33 (%,1o)b)
-J(%,)vsl,o)u s(.0
(%o)
S (9hero) -s( (2o,pib10),')

slu.) -
(9.,4-3n9.3
t*
&pstlon NFA 2\7|D23
e -NFA
M:(0. E, ,9o,F)

D FA ab" wh t tramrtbn L
a

Le
2)ENFAlhehaceptth staga 'or b C Y.ff P3)6
b

AD26 . 2) Ju
3) Wtn e hh accpt all.stsings Nu, thu apatet {o,6,e4
E-{o,b.3
whu Atfng cóoutr comtatnemultiple (A tolauondby
multfple B' tolload bay C's.

NFA:

Slp
E NFA TranstonTabl closue all stata

a b

r
ENFA DFA
Sep 3- Constnut DFA

e c laue (qy ) b (16.3.0) -M


f9.3.4} Fa.4}|9.9
i9..9:3

Tassedstal
S (19., ..9-}.a)
:eclonau
(S(to,4i,4,14))
e cleu(S(o,a u S(4,a)S (%,a

Closuul)
asalle
Spy:

Stp 1: e -NFA Sbpe:


e coas (9-)3o. h
S b

→o ao
e clasue (4)
{a..9.4

96,4,.
.,4,, (e) lszolg 9

Cclosue (3 (o, 4,), a)


(qo,an)
eeclosuu (8 (, a)u s(q,a))
Ouds
closus
(s(%.4) u(9-))Go lagl'2
(o) 2eclous(4.V40
=Gclou
L4o)Ụ.ecloe(2) b

Stup 4: DEA
(aGs)t)33-(4sp)'i

&psilon NFA to NFA wtthautEps on

) Fnd thet clouee


9 Find TaanHton or 0ch input tymol

(oS'(9,a) eclouu(8(e closus lv,a))


AA Sralsup3
3) F'FU l3 closu (40) i6 hating F member
fl
Tiarsitio

Oe closue
S(Ao.6)p3(93.b)
e closue

e
eloswe

close
(ai): {4,-4:} 3()t
sty 2:

S (4.al Cclosue (s(e cleuu (a-),a)))e) ls ec (S0,b) )


edosuse (S{6, ,, 4, 4,a) ) suF) olo ec (o)
e closu (S(%o,a) vs (a,) os(%.4))alb 3 9.,,4

9o.b) - ee (S lec (%6),b) J'l9.a) - ee (3le c (an),a )


:ec(3{4,9: ,a)
ecio9 -ec (4,)

'(3,.6)- 6c (S(tc4,3b) ec (s t9}a))


=ec (S f4, 4}, b}
Cto)

Equivaunt NEA b S'(nb) fo,}


a 4.) (G,)%,.4:
s'(b): 4 o,,}
b s(9,b) o,t
2bloal 2oz3
Untt- he Honsb

Roqulax
Requlau

enpruntn
npraton

dunota tu
ano

Longuoy
gs
t % apmsent tu

sg in an bt tom.
Regular
taprustonBdatnad sn potnonab a
I. e a RE Lfoy
B RE

3. →L:{y
ltarnguag
ae
RE

RE Oe t Lagg y)nithun
d Niw abro
Operakon On RE

dd
)Unfon:mt
nlhea

oh3 ai Lfo,10, yM. fe,ooi


LuM: o0,
1o, ,, co0 ,o31
Concatratfon
) :1.

LM: foo1,\o,l,oo101,
10001,10014
i) closuu: R* is RE (R)- (L())*

L- o, \,10,|0, 01,e S assollef


wtt
as
a RE dunolirg
ov an alphabct
a language with

: fa
A
sta hovtg ayMun ba

g
L: a,aa,a0a,aaaa,
RE osur
dnonttng havitg
a RE
dnontng a languagwith n av
numb a'6 and b's ve an alphaloct E - (a,b}

L- aa, bb,ab, aab, abb,abba,--..


and closue
RE (a4b)* Both uns

3.ae a REdunotngalangua wth the t that Statt with


a and ends with b.

L- {ab,aab, abb, aabb, abbb ,. 1


RE a (a+b)* b

A. Wot a RE wheh ends with 00

L: fo, oo0,100,
aIDO0. y
RE (o41)* 00

5. Wtt a RE nlhloh has any no a's golloed by any no oļ b4

bllbod by any no cs

RE: a * b*
6. Wiu a RE Weth atleast One a tollosed by atkast DYy b and

tollood by atuast onL


t
RE at btc
fl
RE lheh begind wtth 00 Or I|.
RE (oo+ n) (o)*
4teett, ttoo,0OT0,TTbT,o0011
RE Whch ends with 00

RE (o+H)* (o0+)

)Destan a RE staut chogactr Jom th therd alght end & a


OVu an al phabt fa.by

L: aa abag,
Qbabgakạab,.

RE ( as yt a )l a+b)(an)
an a RE wth
Qdd lengtn stg Ove

L= i, l, 1|, 11||..

Ardens
Jhaoren)
Juorem:
RE () * (or)(n)*|
p and tuoo Roqula
D d9
Even numbea + ) ->

dtas)
enprersfon and p
od

do
numbe

hot
hae thon th uaton R 2+Rp Which he untque
soutfon R=* 0
Proa
qiven R-Q+ Rp

R: @ +(ar )* p
Q4 op*p
alI+p*p)
a le +pp)→ RE (Ie)
+d.ptd,
R
Qp * → RE (p*p) p*
Convat t gtunDFA to Ragulae Enjorearon

b
to20

Jnomtng statu CAbpi)

4. : 4 a O

4,: 9,a+ 4,b

pa
h:e44.b49,a da ba(G - E. labta) +
Bub ond nO
*(n)RE
(ro)
labtha *7
4i et 4,(abtba)
R bno
Jke m
Rrlt nit
apinu
b
nottoA

Stpi: Tncomiog Statu

: e+4,at sa (1*9 + jo
4e 4.bt4,bt ,b (9g+) 0-
49a -
4. : 9.b+4, 84'.ab 4.b4 9.b + tib
4.b.(b+db)
Ardens bub 9 in
R-Q+ R)
RQP(*sI4), :4,bt9.(bta)
R Q+RP >R:OP
Qt Rp - R q,: b fbttb)*
qib-(btab) Kub in
thirn3
s4,b(btab)*a +
in
Jän LI
qs4ib(btab)*.
a v
alàtblhtah)*a')
sub,in ktuo pp*ohs
4e+ at q,b
»(biaby*o. a

=e+, (a+b(btab)*a)
klvon to lonil g

data

wod yorta
b

-Cbte a4,a
e (bta')+4sa
4a +e(bta)
a,a'i e(bta) (a*
(3

d,

Conat
Convatrg DEA, Rgule Exprton, ( 4ut*) ig
O DFA
9*iDt d)d,
to Rq ula
Eltmtnatng Atata

prumon uatng stata eteninatfon


dud pr
Shp'1:Taerálstatr sAhouldnothave
Thoming dy. I enatreate
statr and mak as intial stt
stut Hhes e
Stup tntt atomatac Ahould hav
Atat ererte uw Atutt and mae it as
4ral stutt
sep 3: inal totr <hould not haa
a new statt and mabe t es nal statt.
Step l4: Eeminat y state ons ate anothe

thally, ntte autorata should hae ory too statu, se


intealAat and inal stt.

O a+b

a
ab:
ampl
a
)
?niteal
lrg
slepi: Noincomin9 dg on
autornata,
sty: Nuttip Atat tor

steps: Nb
()
on
Ar 4:Eninat
)be

-
eltmtat
bt
a
de
RE a(btetd)

Sup i incomtg odg on Set nw Atat

0 o M
b
Sp : No muttpu irol statr
sbp & : I7onsiton 0n e creatr sstrtz
pr
e

Etintnati analepn

Ec *a a(aite)
RE ca (d+(bcxa))
Unit -I- Toptew oslo2023
Prpetu nd Parmgirg Lemma
→ Rgula cleted undle :

* Concatnaton
* Cormplurren
tt atrori
* TatueHon
Unfon
Closue
Klean Closeer

lı a
lang or RE R, thon Lt nalo
q Lwa a Rygular layag

b: Lia Li a*

Me fer a MJe to at
Coneatehatfon:

Li or RE R, ard La ia Q larg tor


RE R. ten Ls genratd byConcatinatton L and La

Ragelar lang L3>L Li s a sgule anguag


&:Li* a Li b Lga. b
a
gonaon
M tor a
MI torb MTe tr a.b
Unton:
L3L ULa a
gulaaa
ntaeton:
L L, a

Dtene Lal, -la a


omplemant gt" gualanguag. tentni3

(oxa)
O odd no a is
Qiven hum a o''s
shenoh nolanyo

Unfon: orth M
statr 4 (AD) tnal (D.)B
AC AP B¢ b) a
do
AP Ac Bo An Bor
Bc
Bo
BP
B3e
AC

Ap (
Tatzrkocton: Firal &tate = Be Dlune
inol Atot AD
O1

lemma:
Priyon- yguletty wg pmin len
→ Akumo lang ngula
Gtvun choose that atlsat legh p.
punpina
y Bhow how punp1 and splrtlng thu Athg dou not kattty the

pump
Lee
ContadrtopLar nol
Aeushat
Lemma :

in th languagy Can be pumpd'- y thy auat

Lest as logg a catatn + of qu

1*o|(140) 1*0(140)
O4lol2013
Convaston Rsgula Eaprnon to Atomata

Dåt Methad
a*
1. a a
2. ab
a b h.
(a4+)*: b
Conco ntfon
3A
3. a+b :

a
Enampl:
Qctomata
)Convat th gn RE o* 1o to
9, 0* Cconeotnol)

roMb = 0
)
o

b dta
)CönvatafvenRE lo+ (@+ ) o*1povpaol
sp i: 4 : to+ (o+u) o *|
ol

- (0+1)0*1 (0+)]o*
sp oTaA
(o) 04

(o4 O+
(
( dard

oleoch

ualsd

ThomsonConstnttbomtto
lonvutbn C RE to automata afone
Constautbn mrthod.
(or) suset
dlatsd RE auo, dhad

Hnfu automata.
Ahow that
L L(R) tor ke R
Pral: suppoše
l LE) torAorneeNFA(E) wtn dorolitbn;

Batr
I. rocty one Qc«pkiry
to te Pal satr
2. No aucs

3. No ucs out to th
Basts: Tb hardl tho enpreston

I. Th
Qubornata fe3
larga

+0-O
handu th npustin (nai)
-). T Ahowstho cotc ton ol
no patn Stantry s to
-ikets
acctg su
a
3. Jo handu th inprston

automla RE
a

Inductfon; 4fe
Tnduetfon shoon the balow
thaa patk

R+S CuNan)
LIR)U L(s) RS (ConeokratFon) L(R ).L(s)

v
R

kocltary
hv)
R*
(a)

sy yhoe
olA
D Constt a NFA tor RE T: o +0

1,= 1*o

Jdsl ndiarT

((xo)+o Oe P
2
(3)P
stetd

2) Convat thu RE (0+1)* 1 (o+1) to


(a)s ata
*)*1 (o+)
Stepi:
bni

-Oon
slp
Klun's Jheonm

Conveston FA to RE o1
DFA
Q, b

b
S
Tramitbn Tabu

9+(0
St t:
Atak : q, ()
nat statt : )

ndacirn:
man no statu: 2 lk)
*(40) t an
(R ) > R (Ho)(H1e
Step a:

R5ird i-!,j:, k
K: 2
(Rr;)k K=0 k=
Ru
R. R, Rus

Rs Rip

R R.* Ra R R
Res
Rf Rge Rss

k-0

Ri = at b unon k

RL

R e
R
R R R) R.
3*9 + ) t(3)(abo)
-te +(e+e)(+e)"(+e)st9)3(ap R
Cere)) e +RR* R
(5) * (d Fo
(4e (e+e* RRr* =R*
R,' = (C+e) Jon

Rr Ri. + R° (R.°)* R
• (a+b) (c+e)e+e* (atb)
- (a+b) (e + (te) (e+ ey)
(R+e)* =R*
Rn (a+b) lc+ ey*
Mirtimiying Rules tor RE
Rn - (a+b)Ce)*

K
Ro,'= Rs
R, o + R,°( (R) Ri
.+R=R AR

|R pR= R
|3 R RE R
= + (C+ e)*(e+e)
4,R+IR R
Ra =
5. R*R*R *
R. = R, + R. (y* R,° b.
abut
e + o (e+e)* (a+b) T KR R*
8 (R*)*- R*
T. E+RR* = et R*R k*
Res
o(Pay* p P(oP)*
n.(P+a)* (p*o*)* (p*+t
2. (P+o)R PR+RR
RA) RP+
RQ
When K= 2: 3) R*4e - R *
1

+(R,,'D(e,)* R,,
(a+b)(c)+(as)tc)*(ey* e )R*(atb)4
(atb)= *(a
16) R+RE R*R,
(a) (ey* (e + e *e)
Q4b)c* (e+e) )( t)(R+t)R R*l
R4e)
4b) c* Ce)-cx Rt(= -RE 1s)(R+e)te4e)* (2+e)- p*
i) +e -t
R =(a4b) * cr(atb) (+3) )
* (3+)
nal tabe:

Re k -o k=l ke2 9)
C*
B, +3)(9 +5) + (d4o)
Cat)e c(atb)
atb
(a+)db3)+ ) (4b)
Ra
*(33 (4 +s)
2) Convafon a FA to RE
+3
,
Aantiog
RE →
tut 'R "3
inal stut qL ard

Dgk *9 -*C*9)4
s
) +°
R R 4.,P
Jhacum
bom R.DFÐ A tun tsu a RE
L L(A)

Vsuch that L: L(R)

Roy:
Let L b t set acepbd y DEAand t k
M: ($9o,4., e, .. n,e, S,%6,F )
that
Lt Rif k olenota ttainet au trg such

S (%, *) -
tngs - buch trat w
Jhot R s th Aet
all
statt i o A
a label a pat om
JutMno J4M)
irteomoltat noo ohoxe numb
ard th pat
K -I + Ri k-(Rk ()* R lk)poulovr
(* )(6
*o (

Bosfes : k=o
tha
retstates
4 J(
4 or a
bove t Pest n ath the
hav no Frteo maoate stater at ar
becaue

s J N
t ut KRds path that
mabes Kueh a Condton

1. an ae om nod [ to nod
pat hrgto thatcontt, rdy nahi,

o
rot

!
must enamtne

and trd -those ?nput


Buçh ttat 2 tranitn

Aat i to stat om
doddonodog do
No bueh bymhel a?: thu % no tsensttos Rj
Rr:=
Ohe sueh Rg 4-1l,
mutp ymbls a,+as .
a, om tat t to statk
i) TT thss au
Rrf = ai+ata, ak
Arplfeatn RE

RE tor tntproutrgitn NLP n: Data cuantn

*WorktnA witth data tme, {eutuae .

E - maiI fom that document

* Leneal naly phan a a Compīleu,wd


d
* pattxnn in that
Algebra. laws tor Fagulatnptton P? M
Commutattv? A+B: B+A L+MM
a. AKsoctattty: (L+M)+N L4 (MHA)
LM)N LIMN). x P)2
3. Tdntty: +L: L4 L e.L= L.e L
4. Pnnhilatore: o7 3,NNO
Isciol
5. Dstbuttve lauss: L(MHn) LM4La (M+N): MLtNL
b. Toempotent law: L+L= L
1. Laws close:
i))L*
) * -e
v)LtL LL
3 wlhe L*L 4LL+LLL4...
LE 4L+LL+LLL+.
1Lb LE +LL+LLL +--
) € 4LL= e 4LL* L
i) L* L*4 e
hot to b
110

Purnm lenma: Lt L be
theaugulau languag, thn the
such hat tor
d g in Lbuchthat lwlEnte tans nto
thes t bueh that LoY t

?)yre G) y2n
fa b]noL a nottóg
uiaui
fab, a'b', asb a' 320-

fob, aabb,aaablob. .-. ma tdA ct i atot


L 3
ort
Dmum n 3 aleb|eg
aabb lwl-
àlda
3 Lwl- 4> n ay 4 3
w
Constraim:

i) yetyeabiTauevoLab] 2 te bg
hg Lal)
)aylsih la abT. 3n |9u eot

A2 ab ab e L

keli Qabb eL
k arabyhaaba bbaababb . knoJ JL nohia
el-peoslo banl
Jhe not
* B
L {at |p a a
not

L-o'.aa,a(,-- comtainti J :kueolsnal

1) L= {aa, 004, aaana ,...


Ro
)4s4e):
lpa)aal<n,24 3
) sdnf
W Qaa lwl 3 2tapn LooNR
<m ok+h;ata) ta aaa 3 jtn
)w alal a c lole
242yi at upra! K2;ala)'l)aa notin )
D,00 ,0, D000

Comatpn ()S
Lfast,atb?,ab,-
i)L= fabb,0abbb,aabbhb.-. io0,.o
): b 3 3;Tui
3

i)kournensnsu tsotqlo aoneol-4


w = abb twlbAq/s tet t notn
)o
w) s ab]b
3 3
Not Rsüle'
fi
Closuts propti l RigulaLanguag
Ksgulau languags au cleed undi unfon, oncatanatton,
Snuyctton letuy

du omplnt, dijwnu, uvesal,homomophtn and invu


|ol D
homDmorpht

UL 2 ts also
Unfon: L, and L too ogu tar langu
Magls , then

Lax . L2 b*

Coneatntfon: I LI andL: Concatnaben

Li.L to alo agu

Li at Lab* LyLe a *
Klen closue : kun closue (L*) is ako aegula

Lavb: (Li*abb)*

(
Jnty
sectton L andL a 4 sguaae laguage, ten s ntesctog
well ado bnequa
amb van b

Cornplumantatangusgs
lhich ae tn 4, trom
L(): fa"In
l
all
Can be
-then k
yound y
Complumnt
L )
sbtroy the strlg

Ravenal: 4ien a 1 s a whose aUAsalen


L- ool, looy L': o.to,oo hidos dddo0ddot
Homororphüm: Ahomomorphisn ib a alphabet a tunetons hatAa
mbo thot alpnabet. uf

hl)saaa
b
hl)
and homomoyph m on itr
a
largu
alphabel ton hle) = hw)lois ako a
Unit - M 9lrol03
and
Cortrtru ramro
:
Grammaa
Gsomma dafned whee G= (u,T P.)
V→Not tamiral>apialwLttaswgo i
T+ Jašral(Amal Latau)ilaiat 5
P
ht poductan hulu tor tuminal ahd non tu
s → stat symol.
o
S A9nYASn
N→NonTamital A, B,
A →aße7
B→koProuctfon,;
>Gamma råsA
| Gamma :
A

enumdek

eonnetty
Cot Soi
conte
is
3 &r A
Tyr
nileu
Automata
Gramma Logut
mackinu uviy No 9uctton,
Ona) (1
-o
mobu
Content- Senstt?ve Lna Bourded non-
delimfnatie maAtn
A

2 Corntst- fr &Nan dlennd

Regula 4ramrmadr-&<in automta AKAT


A→
Ksq ula Gamme

Rgulan Gamma genatu neh prut

5- (vr . s)
must contain oply ingl non tamial
has
pluxd tamiral yottaad hon taminal'andNTfel

ypu g Rgulaa..amm 2
1: Lqt Linar Groammau 2 Rognt Linea G6amna,
4-
Lqt Linean mma
A qranma o baid tb be Lyt irsas ati the producB
NT

tom A→ ba (tHt mat NT)


and
A→* Whe A,Be N
NT
?: S→ sbb lb ( bt mott NT6))
D→nb (ujtrmott (A))
Kight (EnaR ammaa
Jestn
A aammaa said to be Rraht Lirat 4 a tk prsdurtoa

-tha forrm A NT (gt at NT)


A→
S→ abslb (istmost- ts))

Dlonsidu t DFÐ giunbeao and astu Ryaa


gromma :

s) P- A →aA 3 A
v- fA,8}
B →aB B→a
stat
sh Bs B> B b
2) oa,b
d ferno

4- (V,T,Pais P aß A →b A
v:{p,B. c3 B → ac -> B→a (>1.T)
T: fa,by B→b A
C -> al > ca

Conveson} Rtght Linea Gramma to -fte Automata daurhra)


Consde th RLG wheh aupreent At oy au stry
AVO

Aenal stiti
NFP
Staty thot d upwith-oniral
withat uthe

p>ab| bb) Tfollmond


y
B → Qe bB

202 2

20 2p2.

to FA
Convesorn laht Lha omma
DA→Ba]Ab Jb Stepn AaB|bA b. to RL
B→ ea lBb B-acib8o

r
C→ AaJcb

a dsdod a dnded

T àtbmata. TaTsTA <-


Tod
TaTOd
ToTs
Contt aGamnaL [F]
toheh bo
(F4 is a fommal m ghsal all

os pateu ha gintoallaig
as 4- (v, T.P, s )
Poductons in t fomn a
A→ Ae v(NT)
e (vur)* (NTUT)r 7
1.

OVa
Gonstet

th ket S: fay
CF4 alhth atepts
t tng

L- ta. aa,aa4, Qaaa,

RE Q

CFG: 4- (v, T.P, s) shou

Produe kion ; S sas A->


S- sate
Coneidu aaaa
So
S sas
→sosoa's

→ea aas
→ eaaaa (henu
2) Constt CFY whrch
).
acceph atuat too a's ou
Efa,by L00, aba, bbaa, aab

RE (a+b)"a lo4 (a
Poodueton ne: STa TaT
T lLT) e
A
babab → babTat → boba b
S→ ToTa T
→ bab t aT
→ bTaTa T
→ beaTaT ba baT
→ baTa T
ba babT
→ bababe
CF4 for the numbee a's anol b's
Consturt
Ove thu hymbol Efa, by

RE (a) +
Paooucton:sddA
Selasl bs
To da,b}
Let atsume ababa
lteal ps aslbsle
→ abs
>abQs bs
>aba bs
>ababas L Kaa bb obb t!
→ ababat
→ ababa
2) Constut CF4 for ta L -fab Inz
L- foba'b', a'b, . . Let alsune aabb
L ab, aabb, aaabbb-.. a asbb
8→asb
hssqpa
RE
aabsL
Produrtton mae: n numby
→ aabe b mo
S→aśb|e
aabb
3)Contut CF4 tor telanguage L: {a b ln i
L- ab', a'b' a'bb, a, 8 ?
-Lat Kue
L fabb, 0abbbb,Q00
bbbbbb... aabbbb
Productfon uu
s>asbb S→ asbb
S >as bb S→ aasbb tofsbb
S as&bsle S→Qa bsbb
> da be bbh
→aaboSbb
aabbbb
asbb
4) Constauet CFG yor th palindltomu vu a,b}
a bba
1
1: fa,b, Qa,bb, aba, bab,..
a sa
Produeon → a bsb a
S alblasalb S ble > abebainiosa b
sabba
5)
5)CConkidu
oncidnthu
the gamimau E→ tE|E* El () lra to atv strng

E → E+E (E→E4E )
>E+ E*E E E )
→ E*E (E-) 3DelooD

idtfaE (E-)
mart Defvafon
Lqt And Rramt Jont

Lqt Mast Defvoton :


aeplaud with proclut toa
KCanned and
inipt
trom at to g
E E +E E→E-E Ealb d2
5l2de
Juchno
E→Et
E(E
a-E+E (E )
s ddn?

(E→B}?<
CESay-2
dd2a
mast deivatbn:

To nt mat luvaton thu tnpt &,KCanner and poutton

aaplaud om ght to yt.


E+E+E E→t -E aiA <2
sP : a-bta
9ao<-A
E E-E

)
→E- E+E (E E!wna lno latlg0
E-E taeE
ba (É→)
aba,(E )
Datvete Atg ato at met and Roghtmat aug)soi
(so-N go01
A →aB B → sb
S→ASle (al3) &tool
LMD sal(oo RMD
( l1001<-
S→APB -→ A sb
→ aB8
> asbB aBb
> asbsb asbB a Sbb
aeb sbyaebB
aebeb absb PARO? tu abb.
→ a bb →abGb
abb. bair
mot and iet tng barh
Dafe
B→ OBIB sARO toa
S→ Ae ANB A -→ OA le
RMD Jond
LMD
→ A10B tikrah
→ OA IB AIOI8oB uiavo)
)→Atole slalpold
A 101
→0o10B OA101
ded&
→oO 101B 00AO)
→ o0 to1e ddsdd -2
→ ooelo1
->00l01 → o010|
Senttmerntal orns
A Anttuntal om stng daratu Atast

S→ A1B
A→O9 le
B→ oBl1Ble anol de? ve LD 2 RriD

RMD 3
LMD S+AB
S> AlB →D1OB(B->oB )
→ DiooB(B→o8)
→ 10B (g-→oB) → Aioo1B( B→ iB)
→I00B(B0B) → Aloo1e (B>e)
>1001B(B-→18) -→ |oo)
->|o1t (B→t)
→ lool JA

Passe Tea
ded2
Posse
Posse Tre 'a qaphlal aayvu ntatbn ymbol,

Tamiral Non Tamral, Ta Pasing the


bi dd
darted wtng stet ynkol.
→ Root o the pase too is tat ymkol -Non Tamnal,
Taniral
hode Kloh Tamtral
SIA
En Corsidu tha A TammAL aven below S→ bsb }al b

Stfrg: bbabb 3101 4 a100


313 00
S→ bso 5 8oto
10140\:
S→ bbSbb
S-→ bbabb
) s ABle
A→ aB
B→sb
Defve ' aa bbbb

b
S→ AB
aBB
a sbB S

→ aaBbB
aaBBbB
(3)
a
>aaSbBLB
> aaebBLB S

> aabSbbB
→ a abebbB
→ aa bbbŠb M
aabbb
>aabbbb
aMA
3I
Lypu el Datvaton o Parse Trea
3+I*&
Lqt Mct Deivaton

LMD: Jhe procs al a leļt most NT


deai
y paah stap is Calld oi LMD

Ba: SaB tbA 3*S aB


aslbAn la 33 QaBB
B bs]aBB lb 3* hit aoa
BBI3
DuRn: w- Q0ababba
>aaabaßBB )
tu mast NT on Rach
RD: Jhpoocees
Right most Datvateor

Dntsgtou gammu 1ddds


CFG & Sad to be- amiajiau
thete mn than bn
LMD and RND, 8A
LMD

: E→I
E→E+E
E E +É
E+
7 E É +E (EE*E) Et5
E →E * E TE+E
E→ () 34 E+E,
I→eloli ..14
Datve:5+5 2+E
3 * 245
LMD
add)ds0
moe Bhan LMD ard ss
E→EE has
Called
→EI+E) RMD ft
→ 3 * E+ E ammat.
→ 3 * I+E
3 2+

73 *2+5
n: E→E+E E E+E

E→EE E→idtE tEtE*E Eat


E→E* E E→ idE E
E →E|E
E→ îd >(d4id* idanso.Tad id

LMD.
E
26|1o30
Nosnal Fome or CFG

Eyay Cpatat Fru o


Fru Language oithout Eis gnonatıd

Cortat Tu Gamman in whah al praluctto


p d m
(or) A A

wlhezs A.8 and C lon Tamiral (


a is Teminal

calud chomtty Normal Förm

wseleu mbol

2 Atrnira tirg wing e|nult prducton io

3. Eliminatng untt prduton.


aa4
syinkol.

Can be waeK it does not appau


doce not tab pat in
and
te RHs prnducbion
Ado (
doivaton
Elmiroud

AB4 i) S→ A8 X
S→ b8 6 not iA

Useles beox Aramml

S-→ ABX
B has no la miral

S→ a
Smpeed cFH
A→b
) 28 T oababaaaT ) T-aab Toab B( »s)
Bab] b
e→ a d T>a00a b
Srmpd Ggmma
T aaB T→oaB aaT
T→ aa T B→ab |L

X )e→ ad B abo4
B→ b

3) 3→9a laB€ S→ aAatoineA


P>aslD
A) B→aBa
C→ abb DD
B→b
D→ aDo
A) C→ablo
N-ABc G mamma
DD Simplted
3→ apa aBe 214
)D→aDa B→aBa b
C→ abb

X3A
)Aomiat Wing e lNull prod tion:
( ta3) ilorvolaeo
)s→aI Gaammn

Ö) 4aMb
ai rg amb

i) $→xyx SmpIrfed mme:

X→0xJE )x→ox S-→ xylyx| xyxly lxx


Y→oye x fo
Aas w) y oy yoy|o
y y→e
untt Prdatehia 2195]

prducton in tom
Vatslu Nenlemtnak.s
Untt S80 Stmpitfed hmemme
S c X S→ OAl 1Bl 1.
A>0s|oo us B→ A X
- Ilosloo
C→ o)

produrtn A
Un
pdose B de Ta Jo A
BD C+D
D→E
B→D Bs' B->b X
D→E Simpit) Grammu
D b
E→b
C→d
s->ad
A→a

B→b
Chomsky Nomal Forma ( CaF) 3ıl1ol oas
chomsiy

ramm F ollowg po nty


stat Can hau e prodduetfon

Ainglu tamfnal
2.Jhe non- teomfral neattrg
A-Sa
(
3. Jhe n - tQmral glaxatrg two non- teemial

A→ Be
A→8C0X (A X
Conneston CFG to CNE:

1. Rarmat staat symbol in Rus


wh anothe NT ard mat

heo pmoducttn 3→ AsB


stat
'symbol sind
S → A3B
wels podutroo l2
Slaao
2 Ramo null poDduction -, unlt and

RHS with NT and Crate Neo productebn


3. Raplau Teuminat on

n→ B

A. Reduu -ta numbe o NT on RHS nw prducttbn

S ABC

X→AB
fi
)Convat ien CF4 to CNF
S→ As aB
A6|s Tpvedutton) onso
Rmove Nlull and un?t

slepI: S, →s stp 2: (No wrnprodutten)


S-ASB aB )&e (utlpndue
kon) ") p e (Nu)
S S>AselaB]psla|sslg
A→B]s S→AsBlaB |Ase|ae
S→9B]aB)Đs]a- A→BIs
B → ble
B→b S,→s
(Rurmove start
B b
2tmfhot Uftprodutttoy iiyAYA
1) Syy s
S,→ASB aB |As la) sB
g+Ase|as
lase l s →ASB) aB] sla Jse
)B laslAsla|se
8 b B b
B b

i) 9→s Slep 3:
(Ryplace Tesmfnal
on BHSwttm nt)
S,→AS8JaB |ns]a lsB

B >b Sy )sB| XBlÐs|al s3


Đ lASBI
XBĐsla)
se
sup B→ b
numbao NT)
(Radue the
Xa
S → yB| XBlAs] a | sB
p→ blYB| XB) As) a|sE
B→b
|Fbal CAr
y AS
Gatbach lomal Form (4NF)
GNF Shauld Batߥid thu tollowtrg Conditn.
aala2 b
symkol gnttn e
2 Non-Tamfnal gal singe Tamial p+a

3 NT enatrg T fotlowtl b arny no Tard NT 4PBB

Convsion F4
in
to
F
2 Replau NT wtth numaR Nasabus

which they appeaa..

(or) B, 8 Bs
kubstittion moto
3.Consan9r a 4iKJ shouldwe
BubsttutBn methol and
ií,Ahauld
4. Rmove Let Reeuron
the produeton tollo.aig 4AF Aules,
Copvsfon ol CF4 to 4nlF l2028

B b l3B

l→b
) Sp i : ir 'ts' Nr
in
Jhe gn 3am ma

Stup 2: Ronom T
S A
BA b |e,0, ismst
A, b

A a

4
b 9, Ay
or
Substitutenmtho 3vom
Substiftfon

A b4,A, )
D, b | AaA |P, A, Ay
(D, →b)
eusforn
LR

t-f (utmeuron) 94alb


Rmove
A'→9le
sep :Rornaenullproducton

GNE
al so
Strp fAate pseouettonvete otth tum tra
boy stu tt

sub 2 fn
A → bAs
(Dia)
gub Ay in A

with tuminal.
in GNF all struttrg

NETec
Pamni Lemmagot

Punslerima d topove that the

hot Corrtentu. ple


I Ais a contnt yrulangugg,thenA haspirmplng
buch any tatng s nlhen |sl p may be
legth 'p'
Afvdud
divtded înto ve pleces that sting S= u Suh
that l
the toltoo?ng condtionk, must be tru

uv'nH z in A or evi ? -o
2. yl>o
3- |vayl sp
&roto lonteatte for
Jo poove that thi targug
ard
lemma.
B
I. Asume that A Contexte
P
2. t has to hae punpi "
Jord
tan be purnped e lsly p
3. AIL stigs torg than P,
Suahthat sl2p
4-NouPrd tg
5. DRvide S irnto uvyz

b. Show that oelor tola


y'2 da4,not belor
ome

trlde katty al the pempihg


8. Show that no ne o
oneiton tor harne tr.
q.8 Cannot be pump
L-fa" b'e ] nyo not cornlvt
cor e.
oGo, 1l1,abe,aabbci,
aaebi
Slep 1: Dssume L Cort e obble

tralh
Step 2: Pum (Con be Urgta)
Step8: Śa b,c i:
Stp 4: P 4 in S a
Sa002 bbbb cece (Dvo fnto uvmyi
a bbbbc pniuale
St5. Qa

CasI V z

slep b: uvi ny'z


hen f:I→ur' y'2
aa a bbbbc

when ? :2 =) uv'yZ
abbbb cutee Esual noo abe
a aaaa
2

(n notb in lagunge

when 90 uv my°z
kn, on
a abbbb e
2
(atu hot
hhi
be
2.
,lan)
Qa aab bbb
CaeT: ds/dor
uv'y'ziAvgl2o ?Vals should'beoqvatatraoo,

aat) bbb() ce cn uonto&

No o a's Ao ikis
n
Alo o C's
tortn 3.P
losue poopata O CFL
unolu wnion, concatonabo
contzntFaLanquoges Aeclece
Klen
maag closuu
anol (ogt) toroh
CL is noticlosel nge lntu seetíon and Cornplumertat

nion amDr0
I LiandLa au CFL
fugm
Liv2 isako a CEL
A09 AJSNIA

L,: l a"l ny oy L2 bho


La: Lị VLa
{a,aa, aaa, b, bh,bbb - no dA
Concatenation: 1|T)
T L arod La ae too CFLGthenconiatenatina

LiLa atso FLa sin) i


L,Tan|hy Ly (b?ln2 o}
Ls L.La
e,a,aa aaa, b, bb, bbb... 4
lostna
Kuon closeus sbab2
in CF L then
L* aso oeq
CFL

L ay
L# fa,aa, aaa,
Un-4
Push Doun Automata ard hatrg Machne sioo

Push Doon Dutomata(PDp)


to mentCEQo a
A PDA s a
ammet.
to dastgn DFA or gula

an Semembea nie arnount ol nfomatton


ON
PDA Can hermembe infhPtt amount R inomo ton.

* PDA can be dafhua as

Finit tat machi t staca.


PDA has thau Component

1. Inpt Tape (T|P Ahia

Control'unt
2 (pushpop))ot J v l
3. A sazk with intnit siy (Eumersts

may not eạd tm Irpot yokol but


* PDA may L

Rt has to head to al th tacb in


to ey tanstton.

Tabes
To P niteConttol
Un?l
→ pceept Rfut
-to stack
JD
1 push |por

*
b

Trput a

Tape y stak
* PDA is daineo ustng tuples

(o,E, S, 3, to,t, F
Q- tink Nlumba stata 8- Taanatbr
tunton (il98))
S-Iopt nbol oo- InfalStatr
S - stat Aymbol I Ralstatigyobo)
1so F-] kralstatz
Gaaphtal Klotatdsiso
G'so ttept a →nput ym bol also ateejt
a,b→c 'o o olA
B) b → top qstolk
Stack.
→push,4to R
tne
aL
Enampk:
Constuet t oPDA tox
(us)(es.o.o4)3
Lorga
L {a6 |h4
(0.9)2
L fab aabh, aaa bbb, .... 1 (i90,) (9,d,oe
ODjaent ymholsoustat
No
Alo a No bis (D,ůne:b) o)
oSame,suymbol 4 Somestak
T[p sting Qagbbb bJe (eo,a) 'go'
S(os ao)- (o,a7z) ) Mel
Top a
ntBat
)&
S (%e,a, a : (.,a0 Zo) zo Pushrop
Stack
(te, a,a) - (4.,a00Lo ,stpak
b
S (to,b,a) (,.eep
S ( b.a) : (% e
S (9.. b, a) - (%, e}pop

s(an e): (. e)p


POP Rsmeve Zo
: fo,4.,9:4 T+ Zo

((oeS {Zo, ay insa

)ConstrtDA.orLag
L {ab" en lnyimi
2 3
L: fabe, aabbce, a bbe, aabcc ,bet 0abbb cesraaabbeee...

No a's No o c's

eas66LL Tip string:aabę

s(3o,a,z.)- (9o,a z.) push ar


(.,a, a) (%,aaž.)puch a
Zo Zo

3 (e,b, a) (4,. aa z.) puss aZo aazo


QaZ

Ls unchand Readao Rota Rod


S(..ca) (4,e) por
g(3..c,a) (,e) Je
Ruod e Riidef)2

TZ60)- (0 )2
(3 ) (saco)
(3
(3ot)
Constauet
) PDA o est 3 o.3,)

L iam\ni4
L:fab',a*bt ab )
LE
ab',ab, abb, ..3
L:fabb, aa
bbbb,aaa
bbbbbb. .Y pop

PDA Input stafrg (aa hbbb a

sltoa)z) -(teaaz) a

| z.°so
S(.,4).) (ve,paaato ) QaZo

s(9.b,a):.e),.
aZo

a
& (a,b a) (a.e). a

3 (4,, b, a) (u,e)
s ba ) (., e)
hal
S(3,. E.). (4s.e)
daeds
d Zo s8,4,76, F
PDA{t o, 4s).abj, izo,a
toosmsd
Tranttton Daą sam
trgt Adoaa,
b,aleop

vart
fnput topstaik

Jaano
9) Constet a PDA trat ateyts
poltndro 20°% tsae
L{ww |w: aso (o)*
e, E S Zo Zo

0, lot .do
b, olt'pop
1,0 | ro
Zo

0t tot
1, zerz5

Strps pop
1. Onsaciáveha.o on kap on On he stack

ano, atthusu tme hothr Auached


reond
haly)
input btrirg hot
last eement
2.2. teachedto tn 6bing

then uh that lyt eument ontop t stack -ardq o1


anelemontcheeb l Stan ts aro
scan. io
kymbolstackSoan. o thear
tasboP
kp o.
top o stack au
un pop te eument om top t
stacb s a ko o the n pop
the
to deoo end.
Aace mou
unt trng(eeomed njy.
4 .Rpeat th step
Zo anol stack donot
5. Check bymtok Kta
move
to tial stete ehe mge,o
Contaln
elemnt tun
to deo sta
Eaaaenu o CFG and Paah Donln Autornata.(Pop)

Jhovcm
Loguag
is cortat Iru and ony tome l2 eo
push oown utomata eeogntya L

Paod PDA that


a
CFG
CF4
Ahaw how,to contnuct a PD t
part I: Gnen
et.
PDO Shouo houw to y contnct
PDA
a CF4 that T4
Port2:qn
sam
langns 9. )2 |:tlao
Ca,4) (o,0) 7
Convason GF4 to PDA :

Rules:

ta NonTamfral
S (9, c,6): ,«) 2:TA
2. For Taminal
do T do 2
S

PDA
) Corstmet

13rsli
T:0, I
NT:S,A, B .) (sdo)&-d
o)
S→n8, &lai,e, s) (a.,At.)
A oso; 9 (,.e, n): (4, os))
n→o St,,t,n) (.,o)
Bis; (.e, s)(9..1s)
B -→; 3(..e, B) 4,, 1)
lamtnal:
os Sl41,o,o): ( e)
Atonotws
mau
2) Constt PDA tor to
OBB NT: S, B

AT: S +OB8 . S(VEs) ( one ).


os |slo, 3 (4.e, B) (%, as)|.1s)|(%.o)
T: oy S (, o, o) (,e)
I> s(.,1): (,e)
3) constmct PDA

S → asb NT: S
T.a bt,t Ca..)
Nr: S→asby s(4,e, ) - (,asb) o)2
s→alble,3(4e.s)-(%.a)|.+)l8,e)
o
T: a S, a,a) : (y,e) AA : TIA
b:>3(»,b, b)l.e). tle4
ts(9,e ) (y.) -(e,5,8)&
(o,.$) (a.3 )3
(1)C
(r e) (a
e)6
giEaitvalinàtF4 andPDA k ufrva)(
)s-OB8 d dd
6-os|1sl
S→ oBe (
2.B-→oslıslo:8(%,¢.B (,0:)|t4,s)|.o)}.3
3. T:o S(4,0,o)- (9,e )
T:I S(4.1,1) (qe)
check O10= Ol00O0
s(9.ooooo, s) F (.giooo. pa)) Ri

Ea (a,to000,BB Rs.T 2
R
J (4, o00o S6)

so00oOB8B)Rt
(4, d a

H S(9,o0, BBB )s)- R &


+ S(a,oo0,CBB)) R )& dT
+ 3(ay, o0, BB)
FS(, o0,
4
oB)
R ddsdd

ddsdis 4

)
ddsddo)1

(adod)
49 aad.dodsd,f 6
)ContnctPbA o ollosig tF and tut ahthe t b
*abbkbb " ts in th lopqua

4:($3.p},
V

4,by.P, } ) ( p)b
3.p)2
gllao
P.{s yppa. 19.}12)b letoa
(3.0) -(o,0,#)&
Pt: (o.E S,, o.ZoF)
: (fey, tab}.{s3.8.to. Zo, F} 3000/0 =Or0 Ass
Produton me:

S→a : s (,e, s) l,a).ó )


2. A→ SA :

8.. T: a :3(,a,a) -(4, e) on9,p)&


4. T: b :
s (9,6,6) :(%, O00,d 1

abbabb
(as .00)4
a(4,abbabb,s)t slo,abbabbDa)
F S|4,abbabh
,
pop

bh ) →
ES(4.ba
E S (9. babb, SA)→2
FS (4,babb,AÐÐ )>R,
Sl9, baob,boa) ,
(a4
E(abb, SR) 2

t s (a,bb AtiRA0 o
C

+ (, b,b)→ R 2
(a
F&(,e) R,.ait]
L Frraly stack 3 Om
Convaor PDA to CF4

Je qrammer G an loe daled as

te 6tat stack

y-{3. [.}3.1
and Z &
ulula and. Lemnt

Rule1: Stat symbol roductin sg vin by


s→ [vo, Zo. V J wn eR

Rue 2: TT PDA 9;2)%.


tun
3(4;.4,z) (ye) that
productan me or CFa Is
OFG: [,z. .
Kulk3: T po o th fon
thon prdictan
3 (,a,2) :(3;. Đ)
CFo: [4:.2,9%1a
Dand atQ andQ
[%.p.J[.6.
au statz n B.
e
(a
tom

8(:.a,z): ;,)
[ze]→ «l3;, Đ.94]
dso12

) Conet tu PDA P (teaj. to. tx3, 3, 9.z. ) to CF4


8 bAen, la,, z) - (3,z.)e
arpD
8. SÅ4, o,x): tP.X3e

5
oe}e
x)P.e) ee
.} -
lodrr
Ls(.o,2.) {,z.
S→ a,Zo, 44
2.S(4:,o,) -t; e)
i)(%ex} {4y
,x,4]e
[e]-|
halob,
-→(9, 2,*,)a[a;,..](.b.]
a a [P;2..ed.of)
,.
2
(.Z.,9F I[o4Jl, za]|1 [a,.
A→
ppnS (, l x)- (4,*r)

4)& (4:,4, z (,9) > (Rr,z, )→a [a,,.


ons9. ,o, *) : (P.*) 3.b

nd
A }
a o

on Slr,o, z.)- (4, Zo)


(P,Zo9)→o[%,x, J/o [.*,p]
(e.Zo,P o[,x, 9]7oC, *,p2
9
v8|1||2o14
)Obtaln CFG for POA btow:

S(.,o.. z.) {o,Azy


S (..a,a): 4o.93
(o, b,A)
S (ae, 2)
Ralel CFq-(VT, Ps)

Rudes

Ca.f)(3e)
Crg [:, 2, a
en S(%, b, Þ') z
(oz) (9f. e) (
[,A,4]→.
On

,z, →e
& l4:,a,z)

on Sla, zo) {,Dz4

>|9.,zo,o] [o.0,v:][.,2, J
→(o2.,4,] [o).z. ]
Rule

Tuatng Machtes a Detevnstte


On
Tuatrg machin constst o a tape a nanîu largtn
nhsch and att operatnsCanke pormud.
nheh lach cal)
The tape sit o} Fnftntte call On
blank.
Contain OY apetal gmtl alleal
t aso
aho Cowt d headpotitonnhechpofntetD wlet
and ?t Can movellhoboth dietfon.sdo
blng ortn

Lal a. anb. ba UHant ymbo,'o13-


Contio
heool
Read ulu
Contafnd( tupls
(a,T B.E,S,4 F)
stat of
alheh Can b utun on
T→ Tag alphabet.mbo
B Biant 4mbol
$→ Trptalphabet
→→
Tzomttbn
tuncton
(8:axT TI3
Qo Lnttal statr srant ort
F Set o Fal stats
a Tuentnq Machn hfh Rrcoyr

L-ouo,DIMO,oo,

elyreluuualylylulu )
olxR
A ol x, R
B

uluk

olo.R
(Ap)
) Digr Machtneori on iKot
aohr
L ?l, o1, b00, o0) oo0011

plEloolul
1 R
dolaauu

Chang "o " to 'x

Move RrghttoFst " Rearhid


nou Rsect Blank.

Changyi to 'y
Moe Lyt
o's dsds
Ripeat th abe steps unt no mom

Ion
Mae no mone I% fumain ,
olx»R

ylv,R
olo Yly p brohved(

(accapt)
Fyto4|u}2039
a lufng amachin ttrat acceptk en ralhdom

Ltabba, adbbaa abaaba.4

Consides

ala,
D]u, bl4,fulfe b]b, L

Aupt
ulu,R
ala,l
aJ,p blu,t b|b,
b| b,R

to
JConstrurt tang muchins to acept h ang

L{anb^en|niy
Le {abe, aa bbce, aaablb cec
a→ x
Condu:
b→y Auu
(p
ala)2 b]bzl2,k aa,L
(yIy R
alk,R bly,e D
o Alb,L
yly,L
ockdnt

x, R
Pyly,
z|, 12 -L

copt)) FredState

Stotus
* Blont(u)
Sata 2 u

1.uk

You might also like