Search code examples
subsetdfa

How to prove language L is not regular? L = {a^3^k | k element N} is subset of {a,b}*


L = {a^3^k | k element N} is subset of {a,b}*

I have to prove that the language L is not regular, but I don't know what the subset means for the proof.

{a^3^k | k element N} should be regular because I can draw a DFA and I also can draw a DFA of {a, b}.

enter image description here


Solution

  • It's not regular. In fact a very good rule of thumb to tell at a glance is if the language is trying to count characters in a non-repeatable fashion.

    You can't count with a single regular expression a sequence like 1, 3, 9, 27 while making sure all the other counts fail, you need something repeatable like \d{5} in normal regex notation.

    I'll leave the proof up to you since this is obviously homework, just clarifying the misconception that this is regular because you can draw the first two elements. Sure you can, but you can't draw the generic term in a general way!