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:
“It was not till the middle of the second dance, when, from some pauses in the movement wherein they all seemed to look up, I fancied I could distinguish an elevation of spirit different from that which is the cause or the effect of simple jollity.In a word, I thought I beheld Religion mixing in the dance.”
—Laurence Sterne (17131768)
“Soldiers may grow a soul when turned to fronds,
But here the things best left at home with friends.”
—Wilfred Owen (18931918)
“My attitude toward punctuation is that it ought to be as conventional as possible. The game of golf would lose a good deal if croquet mallets and billiard cues were allowed on the putting green. You ought to be able to show that you can do it a good deal better than anyone else with the regular tools before you have a license to bring in your own improvements.”
—Ernest Hemingway (18991961)
“... geometry became a symbol for human relations, except that it was better, because in geometry things never go bad. If certain things occur, if certain lines meet, an angle is born. You cannot fail. Its not going to fail; it is eternal. I found in rules of mathematics a peace and a trust that I could not place in human beings. This sublimation was total and remained total. Thus, Im able to avoid or manipulate or process pain.”
—Louise Bourgeois (b. 1911)