Consider the following statements.

S1: Since every CFL is recursive, so we can use a Turing Machine to recognize a CFL.

S2: A language generated by type 2 grammar must be CFL and it cannot be regular.

Select the correct option.

Both S1 and S2 are true.
S1 is true while S2 is false.
S1 is false while S2 is true.
Both S1 and S2 are false.
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33
Consider the following grammars.

G1: S→AB, A→a, B→b

G2: S→AB, A→a, B→C, C→b

Select the correct option.

Both grammar have unit productions
Both are in CNF form.
G1 and G2 are not equivalent.
Both are not in GNF form
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33

Consider a grammar G such that

S→aSb | bSa | ε

Suppose G1 is a grammar in CNF, equivalent to grammar G.

The number of steps required to derive the string “aaababbb” by the grammar G1 are _____

15
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.00
Consider the definition of pumping lemma for context free language, which is given below.

Let L be a context free language. Then there exists a constant “n” (whose value depends upon L) such that for every string “z” belonging to the language L and |z| ≥ n, “z” can be broken into five parts “u”, “v”, “w”, “x” and “y” such that z=uvwxy and the three conditions. Select the three conditions from options.

Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33
Let “G” be a CFG in Greibach Normal Form (GNF) and “L” be the corresponding CFL. Let there be a string z∈L. The number of steps used in deriving “z” is:
|z|
2|z|
|z| + 1
|z| - 1
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33
Consider a language, L={ (ab)^n ab (ab)^n | n >0}. Select the correct option about L.
L is CSL but not CFL.
L is CFL but not DCFL.
L is DCFL but not regular.
L is regular
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
Consider the following unrestricted grammar (Type 0 grammar).

S→AB

A→aAb

bB→bbbB

aAb→aa

B→ε

Select the correct language generated by this grammar from the options.

Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
Consider the following PDA over ∑={a,b} (Here, A is initial as well as Final state)

Select the correct option :

It will accept {L= a^n | n > 0}
It will accept {L= a^n | n >= 0} ∪ {L= b^n | n >=0}
It will accept {L= a^n | n > 0} ∪ { a^nbb | n >= 0 }
It will accept {L= a^n | n >= 0} ∪ { a^nbb | n >= 0 } ∪ {a^nb | n>=0}
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
Consider the following languages:

L1 is CFL but not DCFL and L2 is DCFL but not regular.
Both L1 and L2 are CFL but not DCFL.
Both L1 and L2 are CSL but not CFL.
None of these
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
Consider the following languages

L1= {ww | w ε {a,b} }

L2= {ww | w ε {a,b}* }

Select the correct option

Both are CSL but not CFL
L1 is CFL but not regular and L2 is CSL but not CFL
L1 is regular and L2 is CSL but not CFL
None of these
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
Consider the following languages

L1= {ww | w ε {a,b}* }

L2= complement (L1)

Select the correct option

Both are CSL but not CFL
L1 is CFL but not regular and L2 is CSL but not CFL
L2 is CFL and L1 is CSL but not CFL
None of these
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
Consider the following languages

Both L1 and L2 are regular
L1 is regular and L2 is CFL but not regular
L1 is CFL but not regular and L2 is regular
Both L1 and L2 are CFL but not regular
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
Consider the following language L={a^(2n) b^n | n > 0}. Select the correct grammar which generates L from options.
S → aaBb | aab, B → aaBb | aab
S → aaBb | ∊, B → aaBb | aab
S → aaBb | aab | ∊, B → aaBb | aab
None of the above
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
Consider the following language

L = {x#w| x is prefix of w, where w∈{a,b}* }

Select the correct option.

L is CFL but not DCFL.
L is DCFL but not regular.
L is CSL but not CFL.
None of these
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
Consider the given below Turing Machine

If the input “aabbb” is given to Turing Machine then, what will be output and position of head when TM reaches a HALT state? Assume highlighted and underlined character depicts the head position at end and β represents a blank symbol.

Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66