Is a*b* regular?

后端 未结 4 1090
名媛妹妹
名媛妹妹 2020-11-27 22:19

I know anbn for n > 0 is not regular by the pumping lemma but I would imagine a*b* to be regular since both a,b don\'t have to be the same

4条回答
  •  被撕碎了的回忆
    2020-11-27 22:41

    To prove that a language is regular, it is sufficient to show either:

    1) There exists some DFA that recognizes it. In this case, the DFA is trivial.

    2) The language can be expressed as a regular expression, as mentioned in another answer. a*b* is a regular expression to recognize this language.

提交回复
热议问题