regular-languagepumping-lemma

Regular languages and pumping lemma


I'm struggling to solve the following problems. I'm supposed to use the pumping lemma or regular language closures, but I just can't come up with a solution for these 2 problems. Any insight would be highly appreciate it. Thanks.

For each language below prove that it is regular or prove that it is non-regular:

1) {a^m b^n c^k: m>n>k}

2) {u that belong to {0,1}^* : u begins with 1001 and does not end with 0010}

My hypothesis when it comes to number 1 is that the reverse of the given language must also be regular. I can then use the pumping lemma to prove that it is not regular, and therefore, the original language is non-regular. Would that be a valid approach?

I honestly have no idea how to approach number 2.


Solution

  • Actually 2) is quite simple. A regular expression for the words of length 8 and longer is

    1001 · {0,1}^* · {all words of length 4 except 0010}
    

    Then you think of all the shorter words that fulfill the definition and take the union.

    For 1) If you know the closure under reversal, use this and the pumping lemma. The reversal takes c^k to the front, and if you pump within this block then you obviously leave the language.

    Otherwise take the complement and intersect it with a b^+ c^+. You get

    {a^m b^n c^k: m=1 AND (m<n OR n<k)}
    

    which is

    {a b^n c^k: n<k }.
    

    Now you can pump within the b block to leave the language.