Homework Assignment Number 6 due Friday October 8

advertisement
Homework Assignment Number 6 due Friday October 8
Write a context-free grammar for each of the following sets
1.
wcw
2.
a ba
n
R
| w   a  b  *
2n
b | n  0
3. All strings of a’s and b’s where there are at least twice as many a’s as b’s.
4.
a b
5.
a b c
i
i
j
j
| i  j  2i
k
| i  j or i  k 
6. The set of all strings of a’s, b’s, and c’s not contained in wcwR | w   a  b  *
7. All strings of a’s and b’s not contained in ww | w   a  b  *
Download