Theory of Computation and Compilers - Context free languages

61.  If L1 = {x  | x is a palindrome in (0 + 1)*}
                 L2 = {letter (letter + digit)* };
                 L3 = (0n 1n 2n | n > 1}
                 L4 = {ambnam+n | m, n > 1}
then which of the following statement is correct ?

Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *


62. A grammar to generate
{ (ab)n I n ≥ 1 } ∪ { (ba)n I n ≥ 1 }
is constructed as

Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *


63. Consider the grammar
                             S ---> PQ | SQ | PS
                             P ---> x
                             Q-->   y
To get a string of n terminals, the number of productions to be used is

Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *


64. What is the highest type number which can be applied to the following grammar?
S —> Aa, A —> Ba, B —> abc

Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *


65. Following syntax-directed translation scheme is used with a shift reduction (bottom up) parser that perform the action in braces immediately after a reduction by the corresponding production
A —> aB {print “(1)” A —> c {print “1”),
B —> Ab {print *2”}.
When parser is aaacbbb, then string printed

Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *