0 ratings0% found this document useful (0 votes) 65 views16 pagesAssignment 2
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here.
Available Formats
Download as PDF or read online on Scribd
\ a Madhumttha 2
I Toc assignment -2 1£2206053
A tO
Deive format dytnetfon eg ppA? Bulld & ee
thn by f
PLEepe the following wangaiape — ALtupttn g ona
| Stare bY Showtng ft Gnapriuu Reprusentettt on
| Show ia % StAIng we"anbbe"?
| beSa‘ote® tion [ry
| 2eeintrfon
|
® eon ar op Nlon- cutenminise? c
Fintte Autom cere, ULE th % tnansitfon permitted ancl
tutth
One acbeLftfonaL Cop ability cwect
TE con cron oo Sening J STOUR a Symbol ~ Ct) fon moe
intron pon ts dyined by
M=(a,s, 5, oY oF
SEEK on spl
oh) une
R= ter o fintre Non-empty sre ¢
Ze Sermo finfee non-empty enput Symioo
@ 20 > stant
Symp L OL State
Vo = Stant state
Fo: Finar srace
F = stacte fymbot
£7 Ox (rue) er © G xp
— LScat bl ck Le=jyq
| € C40, 0,20) = Ly a)
| { Cyo,a,a) = Cayo saa)
f Cqyo,b,0) > aie)
§ (ay sbib)_= Cave)(C
&
&
Nt» C,2o) = Cayo,z0)
(2 &s20) = (ay ,Z0)
Cy2,€,20) = CayeZe)
¥lq2,¢,20) = C4220)
Eo» 20) = Coyr,z0) l= |-0)
A
Flan + €,20) = C44, 20) (e2j 4 zo, k=0)
Elaos£ 20) = (years) Ci= jek 20)
pai gl Kang
Fl¥,4,z6) = Layo, 20)
& (yo, 6,20) - (a1 sb20)
Fla sb,b) = Cen
Flv, cb) > cq, €)
& ly, Gb) - (aya, €)
Flaya,e, 20) = VE 520)
Elqyos€,20) -
Coy, 20) Cisj-k =) on (t= 0, j=k+0)
Latadck |
Ef On) feng
F Lao ,a,20)
*Cao,a), (43,20)
FCao,a,a) = ayo, aa)
ECyorb,0) ra, ,¢)
FC) 1b,0) = CH.)
§ C4110, 20) =(Y2,20)incrantaneo Ye pavupttoh
w= aabb &
(wo, wabbe, 20) f~ (qo, abbe, azo)
F Cayo, bbe,» aazo)
F (yi, be » 20)
F Coys, c , 20)
|
Fax, ¢€ 120)
@
LCays, € ,20) Accepted
Pon:
Pe $4 eyosay Va 39 VA? VEY Y a faryos GY, EE a by,
Yo ,Syry, ze ¥
| 2) peine Dererminisefe PPA? Tranilore the gnomman
a
tO0 push clot cuctomen ce thee accept the Scme
lan gquay win 4 empty Staeek mut cL?
S2an
n> aABce[bB/o
Bob
coe
Delnitfon:
Rh cuterminfsthe Ppa fs a 6 tuple ag,
Ys 8, Wo sF) wnwu ,4
(ly 2,¢,20) = (ysyt0)
§CV2,€ ,70) - C yy 170)
{ (wo €, 20) = ¢qarze)
§ C1, &, 20) = (yqt)
YC qor€,z0) * (gy. 20)
flab, 20) * Coq bz0)
(C44 bib) = Cay sb»)
Flvq Gb) = Cys,e)
(
§ dvs sc,b) = Cys €)
Ely,.8,20) = “VF20)
&Cqya,e, 20) = CA 4 »20)
ECyorbi20) = Cwar bro) tf-0)
Gnophtcat Peprsertant’ on -asset op Stata,
4 = input atparu,
Y= Stave ctypheab et
FraxcCexete)er to Caxr)
VYoea ty stant cree
Few Ts See acetpe SUCH C
Yme Grammer ts
2) From gnamman
vet sn, Bscy
T* faypicy
@
con df tions
Df ¢CamA x) hor
aimost onmEM bh
fon au 4 in @ sain
Zon
a=e und xin nr
"» PCa a,x) % non
empty fon some a
thos trun § Cove, x) mu
be umpty.
in GNF Fonn?
Pe ELV, Caso ict, $ AB ase, 8s SF
tuwu «Pfs
Vlve,s) «
clined cu,
= CQ, OA)
{Cov ts0) = (ay, anpe)d, Coy dB), Cara
{Cu €,8) = (oy,b)
SCarerc) > Cac)
Fry oa) We)
tl a,b,b) =Ca,¢)| Fc cc) =(y,¢) 1
| Tn stantance uw Der vit ptions
Cyaraabess) Rly, wae bes an)
J Cg aabt A)
F (ay Wabe,AnBe)
Kly» ‘abt, ABU
HE(qy, abe ,d8¢)
Fly, be ,» BU |
| t-elw , ‘be , bo)
Ktivw.,. c¢ , Co)
F Cw. ¢, co
Focy, €,¢)
| Ls empty Stning 7s€
s String fs acecpted Sta.
| 3) Translate tre fottwiing Ppa into (Fy Uthou ¢
PEE Para $0515, £420), $20.20) mune 678
Pn by .
FCa,1,20) = Coy,vz)
| FCvs1,x) = Cay xx)
§ Cay,0,x) = CPx)
&ly,¢,x) Cave)
FORK) > CP¢)
| §CPOz0) = Cq,26)So uLtt on:
Voidble fen qiammear Gg Ts
VS LPxPT POT, CY x PI, Cay x yy, [Pz0PL
Cezoyd »PezoPT- Cy 20°35 7
32 Cy 20VI | Cy 20 PY
O Elis ze) = Cy,x 20)
Cy2oVvI SiLyxas Ly zoVI | 1 Cy xed Lez v5
Lay zoP Tai Cayxy CvzoP3 | 1fyxrJ Cp zp
@ EbWIA) = Carex)
Cava > 'LeyxvJ Laxey CayxelCexaJ
Caxey—ipyxayJ Laxp |i Cox rt cexey
@ pcao.x)= Cex)
Lwxyl >o Ppxqy
Loxe J > oCexrPy
@ Ftv, £4x) = Cy €)
LyoxyJ 7
© LCR 15x) =(Pe)
Te xpJ ai
© VCP, 0.207 = Cy, 20)
DaPzoqI > oCyzovI
CP zoe J + ofw z0PTTe W noted mat varre fpxy] Poe
Ny
ees wat the
7. DUE cipo ut pnoaiue™
nu pe cave. on 4 ey ae
i. The final Proeteett
s>[yzoaJ |Coy zo PI | axed (oll
[azovJ +1 Lyxeys [a 2° pd
Lazo PI Lyxv cayz0P | IpamPIEP20°3
| ¢€
| Leyxqd > tLe I Cyne
CaxP] 1 pax ay LaxP]
TNXPT > of pxel
LaxwJ se
Texpy -y1
Cpe20qI 0 La rzovJ
© 20P] 5 oCarzoPJ e
i4) pefine thomsky lo nmal fonm mania ¢ tu
| following FG to (NF
| sa ASB) &
APAAS|Q
| B>sbS Ja |ob
| homtty oma fom
ewry non empty cre ufithout ¢ hal a Plammar
G@ fn wntth dub Pnoduttion au in on #2
Simple fonm etthen.n Aye, z
n> BE we I% pd « L 5)
iy 7 CAW Vang ube
ah? a ,wwy 1s o vanieble and ao ty a
roimtn ob
unt G hos 0 wes Yymbot , sth aH
ss sand ID bE, fn chomstay Hoamot
gram mon * coe Creed: a
fonm on CNF.
step 1% aiminat’on Of €- ~Nodi-ttTon
a ow Newt Pno dusto nh
4 s Soe
s
fs 7s hulaple ¥
ar ontginat pnoduuton | New Procluutton
SOASB S> ASB/AB
A? ans}a Asanb] afan
B> Sb3 Jal bb B—>sbs /n |bb/sb/ bs)
3p 22 Utofinatton Q unit pnocrufon
: Agen Aminaiing »8+A unit proclirrtt’o
™N out pNodLiten’on
SS ASB/nB
A>ans|[a/an eB-3 sb3 [sb] vs]
step 3: ertmincaton 9 UCL’
old nue
& A,B
A,B
A,B)S
A,B.
Alo wee
Pp! n!
S?asp]oB [
A> ans alan a
B>SbS]shlb5}
ans/aa/bjalbe | %"?
". NO Wen Symbol
ProclLet’o h
A>ved
a bfalbb
S>AB
AxaAA
Banh
SDASB
A DaAs
B>3bs [Sb] bs uy
Sn tie yam man
st > a
4S convenion a CFG to WR
4) Renam? 9° Tenm%naLs
by vanlobin@
= $) 5,0 ,B,0,V,%/Y baby, PSY
js) so we thae tne Languay pep atbletzixfer tu
Language
Nol A tonrext —
Souutfon:
Jia bL ve
ie Nn pea cond ten L
a the
s)uce pean ntl cm? 5 [zlzn
4) sputt z-uvw*y
consider NN =2
peat bth oF 2 aa pbb O° ©
ber wea, vem webs Pea iF bh CES
pen and Jyxl2l
| wrote = | vw
fen tro, uv woe ty spews SY = abbb lee © 1
| fon t=2, uvrwxty =a (a)* Lb)? bb CCCs
= (ad bbb bb Cece fe
fon i=3 , av3 3
wry = aaaa bbbCwe ~b
2) Th i
Langage Js no€ fs Context Fre
Lon querge
| aim Usure propertly oO Cer nowt
| 4) Intenseetion
| iy 7
ute Hotnd i 12 ane ayo wneewe Frus langues e1,
n intensecton 11219 need not be contca b Fmt.* PUutt
onigtnal Trodterton auton
5-7 Asa] mB
3>A5p Ing -
5 ouns|/ ulun
Kans }alan supa PY Ve oa
B> sbo | sp} nsfans payy [Bows [sv]vs/
Huyploree AS | UB
aA |b] A|bb oeteatyaly
Yoh
5) Grouping Ruut
oe | Auton
ontginan Procuweton on gay [1B €
sass ]ap neplnup KSB
SR UX
A> UAS Jv] UR qreup| supa, | > ae
mby¥ yPAS
Bo ous [svlvs/ povsz]su/ US
uas} un v/v] w gnouprs by2 vat vjulvy
2?vs
: X7IB
fe The NE fon the (Fg TI
S> Ay/hp
X> 55
AS uy /u/ua
Y> As
Bosz/su/ys|uy/ un] v[u/vv
2> v6
X> SR
U>e&
y>b
“Oe CvToPy 3)fon evcumple,
Liv= dan br cM] nz 0 and mz04 ank
l= damp cr} neo and m2 oy
ba =p 1 2b? stan b> OM nzo y ma not be
tonteXt Fru
no 4 as shou be mutt to no oO} bls
ri SOYA
and 12 Sop no -oF bis Shout be cope |
@ no a cls - mun intersection Scuypt both wndition
no nud * pe four » but Porm can com pas ony
Bn. nN not
fe cannot >¢ ate a
tek
| typo, $0 ©
| gone fret
Cet qu not Unie =UNedLNn Cneersectton
4h) suppstt tucton:
| le sg be an atphaber and suppose
e
| thar fort cau | eauuy symbol in ain ZB, we
Choose LoNqUag Lo.
the thoos er language can be OME any
cuphapess » not nicely 3 and seme nits
choi Oy Language ayines oh funceron send,
Gn
ute thoul rupen Eola 04 (a) fon eath sgmol
if wea
=G,02.
702-..an to a sining in 3's tnen so)
js
1S the Language a
eae OE Ok stntn gd Li X2++-Xa $Uth
scat) foneh2-
Stn? °
“9 xe fs fn languageSOise, 0
Slw) ts me cwonuntenenon 4 Leng SC)
$5 (on)
+ su) fy the unto 4 $
(tw) for cul IAIN gy \
wo fn b
Sti) =facrbhy ,
Example: —5¢0) = Jan pa N24 ana Sli=k }
2 = fo, 13
Lee Wey, tun S(w) fx lon carenacloen
Cangagy si0) 6( 1) €
Now Suppose b= L (co), thin SL) = Colo}
Thay
Beda om ani bm. nk Brey fon
Keo
string = 22, 4abbaacn bhb-- “¥
Vi) Revs aw \
The CFL'S ane \auo chord UN suuoncal.
UL ConnoE tue the Supsereuaror MLoney | ¢
buc tucn yg smple wrienudton tulng
qgiommou.
Paootzeert= (4) fon CFL ge (Vt ,P,5)
(onsinuce Gh = (v7, P’, 5) whey
pR fs MWe O kath pnoduet' en 9G ty
Pipa Pe) Te hoy th ow productfon of. g
D
thin .
Azak f6 a pnocucaten a af.“3h A Ts an ecouy feaniconieton lng th 9 @
show [tyR)=.
duuicuton in 4 dnc Gt to
r
4) un- eleeracl eubPtity pnontun) prow that
| Ld PS nor neti LY
/ Enumotcuele
wUDALUE cleus LE _prob Lum:
A pnroblim 6s unaucanle Ff how ae
wwurtng raauabne Ries wr eusreigt Nas
Inpintt amount oy thm ro ue an 7
wr'Ya! on no’. An unde itcurle propiem aa :
argonithin to auccrrad ne tne ang at for & yur
Inpae -
e td oe ype Ol Oltou
W,wWr2 +66. be enupun ato h q an binary
string,
Mi Ma... be mumenation op au Tuning
lee Lo= fut Jai clos not aAeeype why
The 5 ‘
OEMs LA BY Nol & MLUVUAWLY erUmenabl ¢
ten guienge.
&
|
| Mashen &
|
»Wheoumspia ws n
Proof %
suppose La zt (mi) fon some TH me.
mis giva nise ro & nina dren. wrufdon
wn in ple senting wi
lunat nt peter cle OM
iy Me acept Wis mun
by olyint HW°on wt
annot be tn td.
iy Mi dom not creeepl Wh) thin by cuyptnit’on
wi th in Le
we must don wuthL the ro no wunning
wv ra
not meet 1T MLLY erm ct L¢
a
7