0
$\begingroup$

I came across this proof-question to check the regularity of the following language:

$A= \{w \in \{a, b\}^∗ \mid \text{length of $a \leqslant 5$ and length of $b \leqslant 20$}\}$

I tried first checking its regularity with pumping lemma to see whether it satisfies the conditions or not, but got stuck at pumping it because of the length limit of a's and b's. I am not sure how I can further proceed with this question.

Any help would be greatly appreciated. Thank you!

$\endgroup$
0
$\begingroup$

If you have a word on the alphabet $\{a,b\}$ with at most $m$ occurrences of $a$ and at most $n$ occurrences of $b$, then the length of your word is at most $m + n$, right? Consequently, your language is finite and hence regular.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.