GATE 2006 Computer Science and Information Technology (CS) Questions with Solutions

GATE 2006

191 questions

MCQ 1911-mark 191

Questions 126–130 of 191

Q126Regular Language1 markMCQ−0.33 if wrong
Let L be a regular language. Consider the constructions on L below:
I. repeat(L)={ww∣w∈L}\text{repeat} (L) = \{ww \mid w \in L\}
II. prefix(L)={u∣∃v:uv∈L}\text{prefix} (L) = \{u \mid \exists v : uv \in L\}
III. suffix(L)={v∣∃u:uv∈L}\text{suffix} (L) = \{v \mid \exists u: uv \in L\}
IV. half(L)={u∣∃v:∣v∣=∣u∣ and uv∈L}\text{half} (L) = \{u \mid \exists v: | v | = | u | \text{ and } uv \in L\}
Which of the constructions could lead to a non-regular language?

Q127Regular Language1 markMCQ−0.33 if wrong
Which of the following statements about regular languages is NOT true ?

Q128Regular Language1 markMCQ−0.33 if wrong
If s is a string over (0+1)*, then let n0(s)n_0 (s) denote the number of 0's in s and n1(s)n_1 (s) the number of 1's in s. Which one of the following languages is not regular?

Q129Context Free Grammar1 markMCQ−0.33 if wrong
In the context-free grammar below, S is the start symbol, a and b are terminals, and ϵ\epsilon denotes the empty string.
S→aSAb∣ϵS \to aSAb \mid \epsilon
A→bA∣ϵA \to bA \mid \epsilon
The grammar generates the language

Q130Context Free Grammar1 markMCQ−0.33 if wrong
In the context-free grammar below, S is the start symbol, a and b are terminals, andϵ\epsilon denotes the empty string
S→aSa∣bSb∣a∣b∣ϵS \rightarrow aSa \mid bSb \mid a \mid b \mid \epsilon
Which of the following strings is NOT generated by the grammar?