2

I want to show that $L = \{a^n b^m a^{n+m} \mid n, m \geq 0\}$ is not regular.

Can I say that the complement of $L$ intersected with $a^*b^*$ equals $\{a^n b^n \mid n \geq 0\}$ and since I know that $\{a^n b^n \mid n \geq 0\}$ is not regular, then $L$ is not regular?

Or would I have to use the pumping lemma?

Raphael
  • 72,336
  • 29
  • 179
  • 389
user270494
  • 151
  • 4

2 Answers2

2

That line of reasoning can work in principle; you are trying to use closure properties of REG for a proof of contradiction. Make sure you understand that that's what you're doing.

Unfortunately, you do not get $\{a^nb^n\}$. For instance, $a^3 b^4 \in \overline{L} \cap a^*b^*$. Check out our reference question for more techniques you can try.

Raphael
  • 72,336
  • 29
  • 179
  • 389
2

Hint: What do you get when you intersect $L$ with the language denoted by $b^*a^*$? It won't be quite what you need, but it's close. You can then get the $b^ma^m$ language by subtracting (i.e., set difference) some regular language from that.

Rick Decker
  • 14,826
  • 5
  • 42
  • 54