Question: Consider the following type 0 grammar over the alphabet = {a}. (i) Draw the total language tree of this language to find all words
Consider the following type 0 grammar over the alphabet Σ = {a}.

(i) Draw the total language tree of this language to find all words of five or fewer letters generated by this grammar.
(ii) Generate the word a9 = aaaaaaaaa.
(iii) Show that for any n = 1, 2, . . . , we can derive the working string
AnBnD
(iv) From AnBnD. show that we can derive the working string
an2BnAnD
(v) Show that the working string in part (iv) generates the word
a(n+1)2
(vi) Show that the language of this grammar is
SQUARE = {an2 where n = 1 2 3 . . .}
= {a aaaa a9 a16 • • •}
PROD 1 PROD 2 PROD 3 C PROD 4 PROD 5 PROD 6 PROD 7 PROD 8 PROD 9 S -a S CD PROD 10 PROD 11 ACB CAB AB - aBA Aa aA Ba aB AD Da BD Ea BE Ea Ea
Step by Step Solution
3.39 Rating (165 Votes )
There are 3 Steps involved in it
i To draw the total language tree we can start by expanding the root node S and following the production rules The production rules are S aS S aA A B ... View full answer
Get step-by-step solutions from verified subject matter experts
