• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Context-free grammar

Status
Not open for further replies.

Yeem

Member
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:
 
Last edited:
Status
Not open for further replies.
Back
Top