Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Context-sensitive grammar
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== ''a<sup>n</sup>b<sup>n</sup>c<sup>n</sup>'' === The following context-sensitive grammar, with start symbol ''S'', generates the canonical non-[[context-free language]] { ''a<sup>n</sup>b<sup>n</sup>c<sup>n</sup>'' | ''n'' β₯ 1 } :{{cn|date=January 2022}} {| |- | 1. || || ''S'' || β || ''a'' || ''B'' || ''C'' |- | 2. || || ''S'' || β || ''a'' || ''S'' || ''B'' || ''C'' |- | 3. || ''C'' || ''B'' || β || ''C'' || ''Z'' |- | 4. || ''C'' || ''Z'' || β || ''W'' || ''Z'' |- | 5. || ''W'' || ''Z'' || β || ''W'' || ''C'' |- | 6. || ''W'' || ''C'' || β || ''B'' || ''C'' |- | 7. || ''a'' || ''B'' || β || ''a'' || ''b'' |- | 8. || ''b'' || ''B'' || β || ''b'' || ''b'' | |- | 9. || ''b'' || ''C'' || β || ''b'' || ''c'' |- |10. || ''c'' || ''C'' || β || ''c'' || ''c'' |} <!--- # ''S'' β ''aSBC'' # ''S'' β ''aBC'' # ''CB'' β ''HB'' # ''HB'' β ''HC'' # ''HC'' β ''BC'' # ''aB'' β ''ab'' # ''bB'' β ''bb'' # ''bC'' β ''bc'' # ''cC'' β ''cc'' ---> Rules 1 and 2 allow for blowing-up ''S'' to ''a''<sup>''n''</sup>''BC''(''BC'')<sup>''n''β1</sup>; rules 3 to 6 allow for successively exchanging each ''CB'' to ''BC'' ([[Revesz' trick|four rules]] are needed for that since a rule ''CB'' β ''BC'' wouldn't fit into the scheme Ξ±''A''Ξ² β Ξ±Ξ³Ξ²); rules 7β10 allow replacing a non-terminal ''B'' or ''C'' with its corresponding terminal ''b'' or ''c'', respectively, provided it is in the right place. A generation chain for ''{{not a typo|aaabbbccc}}'' is: : ''S'' : β<sub>2</sub> {{not a typo|'''aSBC'''}} : β<sub>2</sub> {{not a typo|''a'''aSBC'''BC''}} : β<sub>1</sub> {{not a typo|''aa'''aBC'''BCBC''}} : β<sub>3</sub> {{not a typo|''aaaB'''CZ'''CBC''}} : β<sub>4</sub> {{not a typo|''aaaB'''WZ'''CBC''}} : β<sub>5</sub> {{not a typo|''aaaB'''WC'''CBC''}} : β<sub>6</sub> {{not a typo|''aaaB'''BC'''CBC''}} : β<sub>3</sub> {{not a typo|''aaaBBC'''CZ'''C''}} : β<sub>4</sub> {{not a typo|''aaaBBC'''WZ'''C''}} : β<sub>5</sub> {{not a typo|''aaaBBC'''WC'''C''}} : β<sub>6</sub> {{not a typo|''aaaBBC'''BC'''C''}} : β<sub>3</sub> {{not a typo|''aaaBB'''CZ'''CC''}} : β<sub>4</sub> {{not a typo|''aaaBB'''WZ'''CC''}} : β<sub>5</sub> {{not a typo|''aaaBB'''WC'''CC''}} : β<sub>6</sub> {{not a typo|''aaaBB'''BC'''CC''}} : β<sub>7</sub> {{not a typo|''aa'''ab'''BBCCC''}} : β<sub>8</sub> {{not a typo|''aaa'''bb'''BCCC''}} : β<sub>8</sub> {{not a typo|''aaab'''bb'''CCC''}} : β<sub>9</sub> {{not a typo|''aaabb'''bc'''CC''}} : β<sub>10</sub> {{not a typo|''aaabbb'''cc'''C''}} : β<sub>10</sub> {{not a typo|''aaabbbc'''cc'''''}} :
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)