How to find the grammar of this language: La = {ww^r: w e {0,1}^*, w ends with 1} ? r: is reverse
Here is my solution:
S -> 0S0|1S1| 0|1|E(epsilon)
What can I change here or is the solution the right one?
How to find the grammar of this language: La = {ww^r: w e {0,1}^*, w ends with 1} ? r: is reverse
Here is my solution:
S -> 0S0|1S1| 0|1|E(epsilon)
What can I change here or is the solution the right one?
Copyright © 2021 Jogjafile Inc.
The phrase
is not correct. "chomsky" is not a tool or approach that can be "used". Moreover, the proposed CFG is not correct for the language, because it can yield strings of odd length, and also strings in which
wends with 0. The following grammar works for the language. However, it is not in Chomsky Normal Form (CNF). You can readily convert it to a grammar that is in CNF if you want.This is an equivalent grammar that is in CNF: