edited by
365 views
1 votes
1 votes

Let Σ = {a, b}. For a word w ∈ Σ* , let na(x) denote the number of a’s in w and let nb(x) denote the number of b’s in w. Consider the following language:

L := {xy | x, y ∈ Σ* , na(x) = nb(y)}
What can we say about L?

  1. L is regular, but not context-free.
  2. L is context-free, but not regular.
  3. L is Σ*.
  4. None of these.
edited by

1 Answer

Best answer
1 votes
1 votes

See its saying that number of a's in x should be equal to number b's in y. So it will represent the $\sum $*.

Because every string comparable with any one. like X is having $\epsilon$ then Y can have any number of a's and if there is one a in X then you can generate Y with one b and any numbers of a's in Y and if there is two a's in X then you can generate Y with 2 b's & any number of a's in Y. So like wise every string can be generated.

So Option C.

 

selected by

Related questions

655
views
2 answers
1 votes
aditi19 asked Mar 24, 2019
655 views
If $L = \Bigl \{ x \mid x \in \{ a, b, c \}^*, \text{The length of $x$ is a square } \Bigr \}$ then $L$ isRegularRecursive but not context freeContext Free but not regula...
608
views
2 answers
4 votes
Utsav09 asked Jan 27, 2018
608 views
Let $L$ be a given context-free language over the alphabet $\{a, b\}$. Construct $L1, L2$ as follows.Let $L1 = L − \{xyx \mid x, y \in \{a, b\}^*\}$,and $L2 = L·L$. Th...
3.5k
views
3 answers
9 votes
Amit Pal asked Oct 24, 2016
3,484 views
Let A be a regular set . Consider the two sets below:L1 = {$x \mid \exists{n}\geq 0 , \exists{y} \in A : y =x^{n}$}L2 = {$x \mid \exists{n}\geq 0 , \exists{y} \in A : x =...
751
views
1 answers
3 votes
sourav. asked Feb 3, 2016
751 views
Let $L_1$ and $L_2$ be two arbitrary languages, choose incorrect statement(s)$\text{if}\; L_1.L_2\;\text{ is regular then }L_2.L_1\;\text{ is also regular.}$$L_1 = L_2 \;...