Remember only the part {0 ^ n 1 ^ n} for a second. Replace 0 with ( and 1 with ) , and you have a language of simple nested parentheses, which is a dead kick, that the language is not regular.
Adding the final 0 ^ n makes it context-sensitive (i.e. not contextual). Keep in mind that CFG can be solved using an end-state computer with a single stack as the only data structure. If you see 0, this will cause the character to be pushed onto the stack and see how 1 appears from the stack. This ensures that the number 0 is 1, but there is no way to match more than 0.
source share