edited by
314 views
0 votes
0 votes

Design context-free grammars for the following languages$:$

  1. The set $\{0^{n}1^{n}|n\geq 1,\}$that is the set of all strings of one or more $0's$ followed by an equal number of $1's.$
  2. The set  $\{a^{i}b^{j}c^{k}|i\neq j or j\neq k\},$that is ,the set of strings of $a's$ followed by $b's$ followed by $c's,$ such that there are either a different number of $a's$ and $b's$ or a different number of $b's$ and $c's,$ or both.
  3. The set of all strings of $a's$ and $b's$ that are not of the form $ww,$ that is, not equal to any string repeated.
  4. The set of all strings with twice as many $0's$ as $1's.$ 
edited by

Please log in or register to answer this question.

Related questions

0 votes
0 votes
0 answers
4