-2
 S → AB | C
 A → aAb | ab
 B → cBd | cd
 C → aCd | aDd
 D → bDc | bc

How can I prove that this language is regular or not? I need your help. It also has two leftmost derivations. Does this help me to prove it?

Raphael
  • 72,336
  • 29
  • 179
  • 389
Mert Şen
  • 3
  • 2
  • 3
    So, what language is generated? This would be a start in answering your question. – Hendrik Jan May 24 '15 at 23:21
  • 2
    Please see our reference questions. The formal languages section should contain most of what you need. If it doesn't, please ask a more specific question about the part where you got stuck. – David Richerby May 24 '15 at 23:37
  • What do you mean by: "It also has two leftmost derivations". That is something you say of a word in the language, not of the language itself. What will help you is the first comment you received. Then the second one will help too. – babou May 24 '15 at 23:46

1 Answers1

0

The language denoted by your grammar is:

$L=\{a^nb^nc^md^m | n\geq 1,m \geq 1\}\cup \{a^nb^mc^md^n | n\geq 1,m \geq 1\}$

Hint: You can prove that this language is not regular using the pumping lemma.

Spoiler alert:

Use the word $\sigma= a^Nb^Mc^Md^N$ with $N\neq M$ and $K=N+M$ your pumping lemma constant.

Renato Sanhueza
  • 1,335
  • 8
  • 21
  • You have a typo in your definiton of $L$. – babou May 25 '15 at 09:41
  • I edited the definition. If it is still incorrect feel free too edit my answer if you want. – Renato Sanhueza May 25 '15 at 15:44
  • Sorry, actually it was fine .. my eyesight is not. The last exponent $n$ is so closed to the $d$ in $d^n$ that the vertical bar of the $d$ made it look like an $m$. Hope you did not spend too much time on this. Next time [:)], I will be more precise, so that it is clear when I am wrong. – babou May 25 '15 at 17:01