Professional Documents
Culture Documents
LCSG
LCFG
A language L is type-0 if and only if there is a type-0 grammar G such that L(G) = L
Example:
G = (V, Σ , S, P) where
P = {S→XA, A→ AB|b, bB→Bbb, XB→X, X→ ∈}
Language: Machine:
Recursively enumerable language Turing Machine
23-04-2021 Dept. of CSE 4
Type-1 (Context Sensitive Grammar)
Definition:
A Grammar G = (V, Σ , S, P), V∩Σ = ɸ is of type-1, if the productions have the form
α→β
For α ∈ (V U Σ)*V(V U Σ)*, β ∈ (V U Σ)*, |α| < |β|
Example:
G = (V, Σ , S, P) where
P = {S→aSBC | abC, CB→DB, DB→DE, DE→DC, DC→BC, bB→bb, C→c }
Language: Machine:
Context Sensitive language Linear bound automata
23-04-2021 Dept. of CSE 5
Type-2 (Context Free Grammar)
Definition:
A Grammar G = (V, Σ , S, P), V∩Σ = ɸ is of type-2, if the productions have the form
A→β
For A ∈ V, β ∈ (V U Σ)*
A language L is type-2 if and only if there is a type-2 grammar G such that L(G) = L
Example:
G = (V, Σ , S, P) where
P = {S→aSb | ∈}
Language: Machine:
Context Free Language Push down automata
23-04-2021 Dept. of CSE 6
Type-3 (Regular Grammar)
Definition:
A Grammar G = (V, Σ , S, P), V∩Σ = ɸ is of type-3 or right linear or left linear, if the productions have the
form
A → xB | x (or) A → Bx | x
For A, B ∈ V, x ∈ Σ*
A language L is type-2 if and only if there is a type-2 grammar G such that L(G) = L
Example:
G = (V, Σ , S, P) where
P = {S→aS | ∈}
Language: Machine:
Regular Language Finite automata
23-04-2021 Dept. of CSE 7
Chomsky Hierarchy
LRE
• All Language accepted by Finite
Automata are recognized by
LCSG
PDA & TM
• Language accepted by TM need
LCFG
not be accepted by Finite
automata