Flat m2
Flat m2
Ja Conshuet
Gramas
he en
CAIF Rules:
1) dat Remeve nul) produetony
Remove Untt prodactony
39 Remove wle ss productiony
theae s that type of produetios,so
ven frammas
CNÀ Rules:
A’AB
B’a
A ’ aa
SDaaads
Sui thi
S ’ aaaa
No Let A’ a C)
Consides
Substftuete fn S
S AAAA:
Now let (B AA()
S’ BB s
sB8[CNr] (By th Pulei]
NouYBS (3)
8-8Y
S-BB
also must be
/The Condrtions we teke
S’BB
the
steuc
Recedusal steps: all a's tnto the stot.
|: Tnttfally psush
. wheneves change the state Pop a;
from the stace.
3 the step-2 until sace is empy
a pto
UNIT-M
ADPDA NDPDA
NPDA
-wwweots}.
PDA jo lomquaqe -4
Iabba, abad ba aobaa,
a botob a
6,2olbzo b ble
azoh2o b,bl a,a/e
a, a/e
95]ab
b,a/ba
a,a Joo t
b, b, /bb
(q'qob)3
oolib)3 (3'b)
-
LAtim accept
to
a Macire
alodoes.
BBB B B
halt
B/BR
'b/bL
b/B,L
afa,R
blb,R 13/B/R
B/8,R
bab
843 abB
F Ba b z8
F B 9s a B B
tenanalg +z2,3tamindL tutemoa
teminas(digit).
lamquage. nen
oYaiables ules. Boundad
Graee
6emgbve
Contet Cvut)t
foroducton one E
contain
miÌMum ex).
(aot
Aab. (not
cs).
x
Sensitive anea
(captal) Poroducáon
ey nt ky
Set Set contaun
Contet T= f- et should aterted
must
gb) Riglat a Ás
let
rules R
J
cccbbbccc.
bbeC
A
Qabec.
aab aa
A Bbccc
bb
cc
aBbb
abBbcc Qabb
Acc bb
aaA.
aal
ab
Ac abB
fa'b'e/ c
Ab a
cc
Bb Bb aaabbbCCe.
a a
S’
ACbB QB
inals x)not
inal
2 3
oign turing machine for sbtraction ot tuo
io unoy notation .
asb
O,0,R
I,B,R
(u
BB, R
bsa:
t,B,R
BB,
UNIT-V
Chomsky Hicrarchy
Chomsky Hicrarchy represents the class of languages that are accepted by the
diflerent machinc. The category of language in Chomsky's Hierarchy is as given
below:
Unrestrlcted Granmar
Type o
Context: Sensitive Grammar
Context Free Gramna
Type
Relar Ype s
Grammar
Type 0 Grammar:
For example:
bAa ’ aa
S’s
Type 1 Grammar:
The context sensitive grammar may have more than one symbol on the left
hand side of their production rules.
The number of symbols on the left-hand side must not exceed the number of
symbols on the right-hand side.
The rule of the form A ’ [ is not allowed unless A is a start symbol. It does
not occur on the right-hand side of any rule.
The Type lgrammar should be Type 0. In type 1, Production is in the form of
V’T
For example:
S’AT
T’Xy
A ’a
Type 2 Grammar:
Type 2 Grammar is known as Context Free Grammar. Context free languages are the
languages which can be represented by the context free grammar (CFG). Type 2
should be type 1. The production rule is of the form
A ’a
Where A is any single non-terminal and is any combination of terminals and non
terminals.
For example:
A’ aBb
A ’b
B’a
Type 3 Grammar:
Regular languages are those
Type 3 Grammar is known as Regular Grammar.
which can be described using regular expressions. These languages can be
languages
modeled by NFA or DFA.
V’T*V/T*
"NP-poblems;
* Np-roblen a;ca b:prolbl ens that can e soved
by Non-dtlerionstit algonttns is a pdyromil tmne ptr')
www.Jntufastupdates.com 25
kadner's theore:
P+Np
Np-protblems 'Np-hard
(PPrblon
N-Coete
NP
p.
P=Np
Np-hard
p=Np=
Np-codet