0% found this document useful (0 votes)
9 views

Toc Assignment

Uploaded by

ayush.mishraaa09
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Toc Assignment

Uploaded by

ayush.mishraaa09
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

amblyyas

Ko1) What Peonst

eder a qtomne =HSA?to, P, s) whoedekemine


þraduc Kon ules
pag rodveHon S>0A,s 00A,A0
he dangusge L(Ga).
|SoL:- Ambigoity selys
the conte x+ a qrammars donguage
Prfh he :goesoted
SPhugbon uhee a þastßoula sfrg
by he gYommas can hove m0re hon One þasse tree.
In to dve
wonds, Hee move than one way
*he sting usfrg the g+ven grommaM.

These

Hence
1t s Dot
ambguous gromm a4 .
too).

|aRte He ceo for the lloehg donguagas-(ony


L=(wwtlw é(a+s))
SoL' Ta achieve He dered danguage 4 you
on Use

`tecaHon r more
doonQutomahg or
Com plez machfnay ke 4a bush
Toming mchne
Hee's the donguage
S- as

The res
gram me% ensUres tat stng wwe qeneate d,
duhene can be qny shhg conshng a! o's and b's:

u) defan bn ce | k3


B bBc
The any SAfrg genented by
grammqr ensoe hat for
three cs a tor te
notching
te
genesates te longage dose|>s? þrove
| )det d1 be a CeL nd (2 be a tequao
that n L2 Js CeL
C)
() Corsde a CPG G(vn,, P,s) doheeN={s,A?,o, ,
ras AA, A AAA)Aj Asl61, S=fs?.Corctns oRMD ond
LMD s the 110D00 1 ond olso nd banse ee.
Sanguage
Sol;- dettmact Deßvoon
CAMD)
The
Ü) S-
S-’ AA (S AA)
(i7) AAA ( AAA)
A> 1AA (A’1A)
(v) A 11A (A’ 1A)
|v) A’ 11o (A’d)
(vi) A 1l06 (A’0)
(vi) A’ 1)00 olA» 0)
vi?) A 1j o0004 (A’ 1)
So, he
lettrmact doivahon tor the sting 1400001 ;
S’ AA AAA 1AA 1J A’ 910 ’ 9100’ll000
’ 1900001

No,
Riqht mast Dervobon CemD)
The gfven Sting Ps ’ 1100004.
(i) s AA (S AA)
(9) 1AIA (A’ AAA)
( ) A 1AA(A AAA)
((v) A AAA (A AAA)
(V) A’ 4A 4AOA (Ao)
(vì)- A’ JA JA 00 (As0)
Vi) A JAJ000 (A ’ o)
(vir) A 1400001 (A 1).
'he Riahtmast deivo Hon er stong I10000 IE
9AA0o
S’ AA’ 1A1A’ 1AA4 ’ 9ABAA’ JAJAoA

PaRsE TREe
-A A

The þase tree Pllusto tes houo


he S8g 1160001 P
deived trom the stast &ymbol s ol lowing t
deuivao n dtmat.
bY-’
supþose det
Ac B
CN. Not qab A’
ABa S’ Sol'
Ac. A>4ob,
3> ABa, L’
þroc Jhe CNA gromnes
h fn ollong Change
he |() |
Balb
on unit Remov?ng
USed Un
B’c]b
9 A
AB ’ Sol
D,D-E.6 6C/b,

n uAtemove 9. sdaey
whace grorma
G
brodyaon
ae bart. Ateqnbt (9)(02)
Subchtute Value
S’ABX Not fo eNe
Grommat
a, b, C în Gven Grom

A’ XXY
B’ AZ.4’ in eN f.

Hgaîn
det'
T’ AB

Subshhte Value in 0
S TX
A’ wY
B AZ

T’ AB
W XX
Noo
Hence 9romma
CN.
lent
() ConsPde a gromma 6 and obtafn an
equfve
JDom mastcontoPhrg aynbd A zy=/xy"

Sol'
A-2ye|

Remove Z om qrom ma
A

Y-syyelYz

YoyYy|X.
( ) Convert te
6s
follung qromynas oto GN. he qromnaH
delthed qs Ge(A1,A2, A33,o, bj,, A1 ), ohete P
Consists o! As ’ A2 A3, A2 A3 As]b, A3AJ A2 l9
1. Ifrnate
Ret ReeuYe'on
A1A2 A3
A2 A3 A4 |b
A3 ALA2|9

A J’A2 A3
A2> bA3 AAR
A3a A422

2.
deg+ qaclorirg
A1 A2 A3
A2 blaAsR
A3’a bA2
R E

3. Coyeyt to toN:
A1 bx 4y
A2 b laAS 2
A3 alb A22

X’ A3

Y ’AA3.

The (ammas no Pa orebach Nomal rm


Corsty claa peahon donguages? Boto
kye clasfea on schame organzes JargupouJ
Ufent tyes bned on thel fomol
çomol þrpowSes, Ihe mo
þropohes,
aned on helr
he l ules ond chzves they embloy
Chegoras g chomcky's dfaton
langu
ybe o darguagesfrecursvey Erunemble): Thesegenevotedby
Ihclude alu yosle tornol Qonguages wih no
AnPaons
Can

Un eshcted q ,duheh hove ules


Dn
gromna
Her abþiPca hon ae
2.
* ybe 1 dangvages (Gontext- Sensikve)' Thase anguage e
genealed dy contezh-Sensikve qramma9s, ehee sules nao|
te symal Sovayad
apbied based he Context g
dagung es ate obten cons id oved o be close ob tybe 1 longuages
eg a e geneaked
3.
ybe2 dong vaqec (contest-free): Thsce danguag es
byDyContet.
Con lext- free gramma, uhee Hule apby egad les
Costest (ee-qrammal consst tules thot mab
non - ermingl ym bo) o a teunhal ond (or non - termtno gymbols
4.
Tybe 3 danguoges (loyolo): These donguag& ome geneo re dby
tegul arom mak, duhe hoe te afmhlect hbe prma|
grammam. Regulax qromnmw congsh oy lec Such Gt
Hules ond egula enþreaion
Descbe decRion þro þe tes CL?
Some detfon brober hes CPLs G,determfre whe hes
.
Membexchib. belorgs
Gven a Shing, or a CeG G, by o
to he bgunge generoled CPL deccnbeg
|2.
Eopinessby broblen peltmineanyuohesthex
a Ce6 geneto tes shhg .
a qver
8 þroblem
con be

Colved by checking 4 ue stort aymbo! **


derive ony ternfngi hng normol orns and
3.
Cquvalence problem. Convgt both CPhs to
Check 4 Heir sets detvobon ee ase
7: Intersechen broblem: Constvch ane enphhess.
þresenk n boh lorguoges Ond 4en check for
S.
Ohvoality þroblem, veity e Jonguage
CeG Contans all þoco'b le shing h?te kerg%
Ovey ol bho bet.
6- Anbiguiky
Amb'quiy proßlem'. ThA þroblem
bsoblem con be 3olved by eahouvely
SeanchRrg or mubble de?vaton höeee br o
ghven shing
genesok
t. Aistenecs broblom. Constvct he Set 4 al pocble sngs
qll

by He cPG yb to a ceyto'n leng th ond chec k t


inite
8. Requlaity þroblem. check He ceh sohsfe Conditborx thar
deine egula lorgages
3)
Atermbt al þat moche
What dtlsente blo mealy and moor®
uoPA exomnble2.

Outþot debends Mealg


9.
on þresent state and prasent fn þut
2
lengh R lso
Lnpot shig o dengh 'n'’oot out

3
Mealg nhut asynchronous
4. Exorm ble :
ol ol 2

ol1

Moose
1. Gutout deben de on
an resent shote A & Brdeben dent
On nbot.
2

3. autsut % Synctrorous witM clocl .

4 Exom ble :
Qnd brove he adens theorem whot
appcohon:
SoL: X AX+8 X= AR

A’ *logne Closure
The esprecsi'on X
hesrem Stotes tat we hoe Heguha
yhe eguabon XAx+ B, we con sieonte x r
terms ! Aand Busing He conco tenahon opetohor and
he kleene closure ().
ohexatr
Pove'
and Q Regula ex þreac'ons.
P does not dontan null 3hng RÕ0+ RP has Unhue
Qolubon hot is p=gp*

= Q+ 9P+ RPP

Re g p*
Hen ce brovec

4. Regula expresclan ginpffooho,


2- (fnito Au omat ConstcAon
3- onguog e équ'valene ohecting h'e
y. Comble Oecign and o phmizo
S. Text þrocesing and baters motching
appilea
nho your of +xteCon
foonwsrk ,
ge, gromoirg alehendi'
teon ng vany may ves
mo
nulHeTOV*ng
) orslebs se spe the tat mfrd Pn
Keehves
terote andPevleo 6
Docomento
Non S-ubdahe
t hloroug
y Tect 4.
codeReteckr
Nececsity Evaluate 3.
2.
movel Nul Identy 1.
abþrocn ogenexal Here'
apþl's coNon.
dahendg methyourode, T
&bech coplert
t ond tGn
er noc >Remo
lowd hrougha done be con moves
moveS. Null Remove Ho
(C)

You might also like