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

Flat m2

Uploaded by

chocojithin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views

Flat m2

Uploaded by

chocojithin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

Mid TL

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

fn CNF Rue [0, (2),(3)]/.


No
BAA

S’BB
the

Sol; tuples pren blotion.


Corutnucting longage
t ab', ab,ab, a"b,
-

L-5 ab, aabb, uaabbb,--f


wW aaabbh

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

6(20,a,a) (0, aazo)


S(ao, a,a) = (q0, oaa ,zo)
S(qo,b,a) (2e)
6(41bya) (%0é)
t(a,,a)
(
balE
aalaa
A3

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

put Smbe on the uent


n
Aame ovfng dyfeumt sat
to tuoo
Stet Loe
NSPDA
)3 ob): (40.

(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:

1. Type 0 known as Unrestricted Grammar.


2. Type I known as Context Sensitive Grammar.
3. Type 2 known as Context Free Grammar.
4. Type 3 Regular Grammar.

Unrestrlcted Granmar
Type o
Context: Sensitive Grammar
Context Free Gramna
Type
Relar Ype s
Grammar

Fig1 Chomaky Hierarchy

This is a hierarchy. Therefore every language of type 3 is also of type 2, 1 and 0.


Similarly, every language of type 2 is also of type 1and type 0, ctc.

Type 0 Grammar:

Type 0 grammar is known as Unrestricted grammar. There is no restriction on the


grammar rules of these types of languages. These languages can be efficiently
modeled by Turing machines.

For example:

bAa ’ aa
S’s

Type 1 Grammar:

Type 1 grammar is known as Context Sensitive Grammar. The context sensitive


grammar is used to represent context sensitive language. The context sensitive
grammar follows the following rules:

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

Where the count of symbol in V is less than or equal to 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.

is most restricted form of grammar. The Type 3 grammar should be Type 2


Type 3
and Type 1. Type 3 should be in the form of

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')

*Np-problems Cosste of alarguage aceeptd by Ndtu


mnistic turing. ahne that 'yuns n a
tine
-n Tavellng eales man Probleno.
Np-proslen Chen ited ntotoo tyPe&
i) Np hard problen.
i) Np- Cople problim,
"Np-bard pro6 len:.
lorquage x Quch tat eviy lang
y. n Np can be oynoni ally rednceable to xiand w
Cannot aoe. tat x is Np. then x s. Baid to Ix Np-hat
photde.
-Gy Tuirg rmachne hat roble.
Ne- Cooct roben
TtHhere is a.. largyag x Stuch that evey Langg

www.Jntufastupdates.com 25

Can be pctynei aly yeduccable to x a tie


.e0 pove that x s m. Np. thes.x, is said to be Np
tonplete Phoblens.
ai-jThav ellg Sales mon prcles.
2)
Sulbqraph isemorphicm

kadner's theore:
P+Np

Np-protblems 'Np-hard
(PPrblon
N-Coete
NP
p.

P=Np

Np-hard

p=Np=
Np-codet

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy