Construct context-free grammars that generate the given set of strings. If the grammar has more than one variable, we will ask to create a sentence describing what sets of strings expect each variable in the grammar to generate. For example, if the grammar was:I could say “C generates binary strings of length one, E generates (non-empty) even length binary strings, and O generates odd length binary strings.” It is also fine to use a regular expression, rather than English, to describe the strings generated by a variable (assuming such a regular expression exists). (a) Binary strings matching the regular expression “(1 ? 01 ? 001)? (0 ? ?)”. Hint: use the procedure described in lecture to convert the RE to a CFG
Set of strings
Custom Papers
We will write a custom paper for you
Free title page
Free reference page
Free formatting
Unlimited revisons