The Gateway to Computer Science Excellence

0 votes

Design grammars for the following languages:

- The set of all strings of $0's$ and $1's$ such that every $0$ is immediately followed by at least one $1$.
- The set of all strings of $0's$ and $1's$ that are palindromes; that is, the string reads the same backward as forward.
- The set of all strings of $0's$ and $1's$ with an equal number of $0's$ and $1's$.
- The set of all strings of $0's$ and $1's$ with an unequal number of $0's$ and $1's$.
- The set of all strings of $0's$ and $1's$ in which $011$ does not appear as a substring.
- The set of all strings of $0's$ and $1's$ of the form $xy$, where $x\neq y$ and $x$ and $y$ are of the same length.

52,315 questions

60,436 answers

201,769 comments

95,247 users