# Thread: Grammar Problem In Simple English

1. ## Grammar Problem In Simple English

Describe (in simple English) the set of strings that this grammar describes:

Here is the grammar:

S X Y
X x
Y Y y
Y y

Here is the answer I've come up with:

The language that accepts anything with x and more than one y

And here is the example I put in as well:

1. The S is replaced with XY (by rule 1). So then we’re left with XY.
2. The X in XY turns into x by rule 2. This leaves xY.
3. The Y in XY becomes Yy by rule 3. This leaves us with xYy.
4. The Y in Yy is replaced with y by rule 4 which leaves us with yy. So now we have xyy

2. ## Re: Grammar Problem In Simple English

Originally Posted by marsandfruit
The language that accepts anything with x and more than one [I]y
Yes, that is correct. With one caveat. It is $x$ followed by one or more $y$'s. Note that instead of using rule 3, you could have skipped right to rule 4. This would give you xy (an x followed by exactly one y).