0
R -> XRX | S
S -> aTb | bTa
T -> XTX | X | ε (empty string)
X -> a | b
  1. $T \Rightarrow T$
  2. $T \stackrel{*}{\Rightarrow} T$

I know the first one is false since you cannot derived it to T but for the second one my friend said it is true while I thought it is false. I was wondering how do you eventually derived from T to T.

Qezzz
  • 3

1 Answers1

2

The star in $\overset{*}\Rightarrow$ works like the Kleene star in regular expressions: it includes $\overset{n}\Rightarrow$ for all $n\ge 0$, so it includes $0$-step derivations $u\Rightarrow v$ in which $u=v$. You’re correct in thinking that there is no derivation of $T$ from $T$ that actually uses at least one production.

Brian M. Scott
  • 616,228