Any string of terminals that can be generated by the following context free grammar (where S is start nonterminal symbol)

S → XY

→ 0X | 1X | 0

Y → Y0 | Y1 | 0

1
has at least one 1
2
should end with 0
3
has no consecutive 0’s or 1’s
4
has at least two 0’s

Sponsored

hivanix.in

Visit

This quiz is brought to you by hivanix.in

🌐 Web App Development

Quick Navigation