1
$\begingroup$

I don't understand what this regular language is asking for? Find a grammar for L(G) = {w || w | is odd,∑ = (0, 1) }. What does the " || " mean I know a single " | " means or.

$\endgroup$
2
$\begingroup$

Yup, I can see why that would be confusing. The typesetting is probably making this harder to follow. I'm guessing what's written is $\{w \mid |w| \text{ is odd}, \ldots\}$. This is the set of all $w$ such that $|w|$ is odd etc. Here $|w|$ typically represents the length of the word $w$.

It might have been clearer if the author had used a colon instead of a vertical line in our set builder notation: then it would have been written $\{w : |w| \text{ is odd}, \ldots\}$, and maybe it would be easier to see what is going on..

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.