Mixing Left and Right Regular Rules
If mixing of left-regular and right-regular rules is allowed, we still have a linear grammar, but not necessarily a regular one. What is more, such a grammar need not generate a regular language: all linear grammars can be easily brought into this form, and hence, such grammars can generate exactly all linear languages, including nonregular ones.
For instance, the grammar G with N = {S, A}, Σ = {a, b}, P with start symbol S and rules
- S → aA
- A → Sb
- S → ε
generates, the paradigmatic non-regular linear language.
Read more about this topic: Regular Grammar
Famous quotes containing the words mixing, left, regular and/or rules:
“Political image is like mixing cement. When its wet, you can move it around and shape it, but at some point it hardens and theres almost nothing you can do to reshape it.”
—Walter F. Mondale (b. 1928)
“Wealth brings many friends, but the poor are left friendless.”
—Bible: Hebrew, Proverbs 19:4.
“While youre playing cards with a regular guy or having a bite to eat with him, he seems a peaceable, good-humoured and not entirely dense person. But just begin a conversation with him about something inedible, politics or science, for instance, and he ends up in a deadend or starts in on such an obtuse and base philosophy that you can only wave your hand and leave.”
—Anton Pavlovich Chekhov (18601904)
“Trust men, and they will be true to you; treat them greatly, and they will show themselves great, though they make an exception in your favor to all their rules of trade.”
—Ralph Waldo Emerson (18031882)