in Theory of Computation
825 views
6 votes
6 votes
Which of the following is not a regular language?

a) $\{ w ( w_r )^* \mid w \in \{0,1\}^* \}$

b) $\{w^n w^m  \mid 0\leq n\leq m, w \in \{0,1\} \}$
in Theory of Computation
by
825 views

4 Comments

i think so anil.
0
0
Arjun Sir please explain this question..how to think it.
0
0
edited by

In ww as n can be zero thus, we can treat whole string as a second part i.e. wand thus which implies that m will either be zero in case of null string or m>=n as we are considering n=0. Thus it can accept any String which is (0*+1*). Hence it is Regular.

0
0

1 Answer

3 votes
3 votes
Best answer
This question is just application of logic and set theory and there are no short cuts or even systematic methods. Only thing one can do is to repeatedly look at the question and deduce the meaning.

a) $L  =\{ w ( w_r )^* \mid w \in \{0,1\}^* \}$

$w$ is any string over $\{0,1\}$ and it must be followed by its reverse repeated 0 or more times. Here, "0" is important as it is enough to ensure all strings are in $L$ $((0+1)^*)$. Hence, $L$ is regular.

b) $\{w^n w^m  \mid 0\leq n\leq m, w \in \{0,1\} \}$

Here, $w$ is either 0 or 1 (not a string but a character. Hence $L$ is nothing but $0^* + 1^*$ which is again regular.
selected by
by

3 Comments

In the second one, even if $w \in \{ 0, 1\} ^*$, it should be regular.

Because we can consider n = 0, and m = 1, and whole string comes under w. i.e $(0 + 1)^*$

Am I correct??
0
0
correct..
0
0
@Rishbah yes.
1
1

Related questions