Aye, it's homework time.
But I simply don't get how to correctly display the context-free grammar for this context-free language:
L = { x | x ∈ {0,1}* and | x | = 3 }
Here's the regular expression:
(0+1)^3
I know I could probably get away with:
S -> 000 | 001 | 010 | 011 | 100 | 101 | 110 | 111
But that's major failure. So how do I express the '+' ?
More importantly, how do make the length exactly 3 ?
I seriously couldn't find this anywhere after searching for over 30 minutes.:thumbsdown:
But I simply don't get how to correctly display the context-free grammar for this context-free language:
L = { x | x ∈ {0,1}* and | x | = 3 }
Here's the regular expression:
(0+1)^3
I know I could probably get away with:
S -> 000 | 001 | 010 | 011 | 100 | 101 | 110 | 111
But that's major failure. So how do I express the '+' ?
More importantly, how do make the length exactly 3 ?
I seriously couldn't find this anywhere after searching for over 30 minutes.:thumbsdown:
Last edited:
