Exercise 13:

CFG for {an0ban1banm1banmm1i{1,,m}:(n0=ni)}\{ a^{n_0} b a^{n_1} b \ldots a^{n_{m-1}} b a^{n_m} \mid m\geq 1 \wedge \exists i\in\{1,\ldots,m\}: (n_0 = n_i) \}
Write a CFG (which will be ambiguous) generating the words of the form an0ban1banm1banma^{n_0}ba^{n_1}b\ldots a^{n_{m-1}} b a^{n_m} for which there exists an i{1,,m}i\in\{1,\ldots,m\} such that n0=nin_0=n_i.
Authors: Guillem Godoy / Documentation:
To be able to submit you need to either log in, register, or become a guest.