edited by
9,761 views
31 votes
31 votes

Let $L$ be a regular language. Consider the constructions on $L$ below:

  1. repeat $(L) = \{ww \mid  w \in  L\}$
  2. prefix $(L) = \{u \mid ∃v : uv \in L\}$
  3. suffix $(L) = \{v \mid  ∃u : uv \in L\}$
  4. half $(L) = \{u \mid ∃v : | v | = | u | \text{ and } uv \in L\}$

Which of the constructions could lead to a non-regular language?

  1. Both I and IV
  2. Only I
  3. Only IV
  4. Both II and III
edited by

2 Answers

Best answer
22 votes
22 votes

Correct answer is B. Only $I$.

Repeat $(L) = \{ww \mid w \in L\}$ is non regular language

Half$(L)$, suffix$(L)$, and prefix$(L)$ are regular languages

Reference:

https://gateoverflow.in/3637/gate2006-it_81

edited by
22 votes
22 votes
  • repeat(L) should not be confused with concatenation as there is a specific order to it. Only same strings are concatenated with each other and not all. Moreover, double word language is not even a CFG [non-regular].
  • prefix(L) is a regular language – all the states in L’s DFA could be made final, giving result to a DFA which would accept prefix(L) [regular]
  • suffix(L) is a regular language as a NFA could be constructed which would accept suffix(L). Every state in L’s DFA can get an incident # – edge from start state – this NFA would accept suffix(L) [regular].
  • half(L) is a regular language. It is just a language containing even length strings
  • so answer is B
Answer:

Related questions

11.7k
views
4 answers
41 votes
Ishrat Jahan asked Nov 1, 2014
11,652 views
Let $L$ be a regular language. Consider the constructions on $L$ below:$\text{repeat} (L) = \{ww \mid w \in L\}$ ... b)^*$\{\epsilon, a, ab, bab\}$(ab)^*$\{a^nb^n \mid n \geq 0\}$
8.2k
views
1 answers
29 votes
Ishrat Jahan asked Oct 31, 2014
8,219 views
Which of the following statements about regular languages is NOT true ?Every language has a regular supersetEvery language has a regular subsetEvery subset of a regular language is regularEvery subset of a finite language is regular
8.6k
views
4 answers
46 votes
Ishrat Jahan asked Oct 31, 2014
8,563 views
For a state machine with the following state diagram the expression for the next state $S^+$ in terms of the current state $S$ and the input variables $x$ and $y$ is$S^+ = S' . y' + S . x$ ... $S^+ = S' . y + S . x'$
8.3k
views
5 answers
34 votes
Ishrat Jahan asked Oct 31, 2014
8,260 views
In the context-free grammar below, $S$ is the start symbol, $a$ and $b$ are terminals, and $\epsilon$ denotes the empty string.$S \to aSAb \mid \epsilon$ ... $a^* b^*$