0
$\begingroup$

so I know that this language is not regular, however, can you still define the language using BNF? This is the problem:

{a^n b^n |n>0}
$\endgroup$

1 Answer 1

1
$\begingroup$

This is a classic example of a context-free language. See How to prove that a language is context-free? for how to find the corresponding context-free grammar. Then once you have a context-free grammar, you can write it down in BNF.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.