How is it possible that the language a^n b^2n is regular if and only if it was finite such that 100 => n <= 0?

1.5k Views Asked by At

how is it possible that the language a^n b^2n is regular if and only if it was finite such that 100 => n <= 0?

I know that a language in such a form of ( a^n b^n ) when n=>0 is not regular, since we need a temporary memory to keep track of the number of a's and b's, and I know every finite language is regular, but I do not understand what make a finite language in a similar form regular? how can we proof it? I need some clue, besides being able to get its equivalent regular expression, I want some more detailed explanation..

Thanx

1

There are 1 best solutions below

0
templatetypedef On

One idea is to think about building a regular expression for the language:

ε ∪ abb ∪ aabbbb ∪ aaabbbbbb ∪ ... ∪ a100b200.

You're right that all finite languages are regular, and since this particular language is finite, it's regular.

Note that it's not the case that this language is regular if and only if you restrict n such that 0 ≤ n ≤ 100. Rather, the language formed by adding in the restriction that 0 ≤ n ≤ 100 is regular. There are other things you can do to restrict the language so that it's regular - for example, you could use an upper bound of 1,000 or 100,000.