Type - 0 Grammar: Type-0 Grammars Generate Recursively Enumerable Languages. The
Type - 0 Grammar: Type-0 Grammars Generate Recursively Enumerable Languages. The
Type - 0 Grammar
Type-0 grammars generate recursively enumerable languages. The
productions have no restrictions. They are any phase structure grammar
including all formal grammars.
Example
S ACaB
Bc acB
CB DB
aD Db
Type - 1 Grammar
Type-1 grammars generate context-sensitive languages. The productions
must be in the form
The rule S is allowed if S does not appear on the right side of any rule.
The languages generated by these grammars are recognized by a linear
bounded automaton.
Example
AB AbBc
A bcA
Bb
Type - 2 Grammar
Type-2 grammars generate context-free languages.
Example
SXa
Xa
X aX
X abc
X
Type - 3 Grammar
Type-3 grammars generate regular languages. Type-3 grammars must
have a single non-terminal on the left-hand side and a right-hand side
consisting of a single terminal or single terminal followed by a single non-
terminal.
The rule S is allowed if S does not appear on the right side of any rule.
Example
X
Xa
X aY
2. State And prove the Adrens theorem for regular expressions.
Arden's Theorem
In order to find out a regular expression of a Finite Automaton, we use
Ardens Theorem along with the properties of regular expressions.
Statement
Proof
= Q + QP + RPP
When we put the value of R recursively again and again, we get the
following equation
R = Q + QP + QP2 + QP3..
R = Q ( + P + P2 + P3 + . )
Hence, proved.
Answer:
Example
Representation Technique
Xn
X2
X1