xyplus recursive language

42 Views Asked by At

For {x, y, +}, the language XYPlus is shown recursively as:

(1) x and y are in XYPlus .

(2) So if a and b are words in XYPlus , so are ab and a+b.

Which of these would be true or false ?

xyx+xy, y+yx+yy, xy++yx+x, +xxy+yyx, y+xyy+xy+.

is it saying if it contains xy+ in any of them it will be true, so the only one that is gonna be true is xxy+yyb ?

1

There are 1 best solutions below

5
On BEST ANSWER

There is no concept of true here. They are asking if you can construct each string by following the rules above. $+$ would not be a word in XYPlus because there is no way to generate it from the rules (implicitly, anything not constructible from these rules is not a word in XYPlus). But x+y+xy is a word in XYPlus: by rule 1 we have x and y, by rule 2 we have x+y and xy, then applying rule 2 to these we have x+y+xy.