I need to formulate a context free grammar for $A =\{(ab)^n(ab)^n | n ≥ 1 \}$.
My try:
$S → abS|abT$
$T → abS|ε $
I am not sure if this production is correct. I am new to the subject.
I need to formulate a context free grammar for $A =\{(ab)^n(ab)^n | n ≥ 1 \}$.
My try:
$S → abS|abT$
$T → abS|ε $
I am not sure if this production is correct. I am new to the subject.
Copyright © 2021 JogjaFile Inc.
Hint: Use $S \rightarrow abTab$ as your start rule, and make the rule for $T$ very similar, only that $T$ needs to be able to terminate the derivation.