Been having some trouble trying to come up with a CFG for this language: all binary strings that contain least 2 1's and at most 2 0's
So far, I've come up with this:
S --> T | 0T | T0 | T0T | 00TT | TT00 | 0T0T | T0T0 | 0TT0 | T00T
T--> 1T | V
V--> 11Z | 1Z1 | Z11
Z--> 1Z | epsilon
I realize this is mostly likely incorrect/redundant, so any feedback would be extremely helpful. Thank you!