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

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!

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.