-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
  • 73,212
  • 30
  • 182
  • 400
Mert Şen
  • 3
  • 2

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,345
  • 8
  • 21