What is a Context-Sensitive Grammar/Language? + Example
Вставка
- Опубліковано 6 жов 2024
- Here we define a context-sensitive grammar and language, as well as give an example of a language that is context-sensitive but not context-free: {a^n b^n c^n : n at least 0}. The idea is that a CSG can do exactly what a CFG can do, except that it enforces a "context" in which the rule can be applied.
If you like this content, please consider subscribing to my channel: / @easytheory
▶SEND ME THEORY QUESTIONS◀
ryan.e.dougherty@icloud.com
▶ABOUT ME◀
I am a professor of Computer Science, and am passionate about CS theory. I have taught many courses at several different universities, including several sections of undergraduate and graduate theory-level classes.
I’ve been attempting to understand CFGs and CSGs a bit better for a while now, and within the first few minutes of your explanation, a lightbulb went on. Thank you!
This was very helpful! Thank you. My professor and textbook provide almost no examples, so this was very demonstrative.
Nice and clear explanation! Thank you a lot
Awesome video my teacher should really watch this his being fucking up my course
Thanks for the explanation
Thank you!! This helped a lot with my paper
Thank you, better explanation than my prof's by a long shot
worlds most complex example expressed verbally for extra difficulty
im more confused.
That's probably because of the algebraic symbols that soon entered the play
thank you for helping
🙏
explain so well!
Great
This got me thinking about quaternions i^2 j^2 k^2-> iijjkk-> i(ij)(jk)k->ikik->(ik)^2->(-j)^2->1 so this is context sensitive
(-j)^2 = -1