Solutions to Assignment 4 - Computer Science

Exercise 3 Give context-free grammars that generate the following languages. 1. fwjwcontains at least three 1’sg 2. fwjwstarts and ends with the same symbolg 3. fwjthe length of wis oddg 4. fwjthe length of wis odd and its middle is 0g 5. fwjwcontains more 1’s than 0’sg 6. fwjwis a palindrome, i.e., w= wRg 7. The empty set Solution 1. ................
................