via hruff: a^i b^j c^k | i=j or i=k S -> TC | U T -> aTb | emp C -> cC | emp U -> aUc | B B -> bB | emp remove empty strings: S -> TC | U | C | T | emp T -> aTb | ab C -> cC | c U -> aUc | B | ac B -> bB | b continued via sramsey: Removing Unit rule U->B gives the new rule for U: U-> aUc | bB | b | ac (just replace the right hand side of B in for U->B) doing this for the whole grammar yields: S -> TC | aUc | bB | b | ac | cC | c | aTb | ab | emp T -> aTb | ab C -> cC | c U -> aUc | bB | b | ac B -> bB | b No more unit rules exist. Now we replace any rules with more than 2 things on the right hand side. These all involve aU or aT, So I'll make new rules M -> aU and N -> aT S -> TC | Mc | bB | b | ac | cC | c | Nb | ab | emp T -> Nb | ab C -> cC | c U -> Mc | bB | b | ac B -> bB | b M -> aU N -> aT Now new rules to go to terminals S -> TC | MR | QB | b | AR | RC | c | NQ | AQ | emp T -> NQ | AQ C -> RC | c U -> MR | QB | b | AR B -> QB | b M -> AU N -> AT A -> a Q -> b R -> c A string like aabbcc in this language should derive in 11 steps. 5 produce vars and 6 produce terms. S -> TC -> NQC -> ATQC -> AAQQC -> AAQQRC -> aAQQRC -> ...-> aabbcc This grammar is ambiguous because we can also choose another parse for some string (and this string in particular as well) S -> MR -> AUR -> AMRR -> AAURR -> AAQBRR -> aAQBRR -> .... -> aabbcc (This is a drastically different parse through the hierarchy - mostly because in the first parse it is the a's and b's that are being matched and in the bottom it is the a's and c's are being matched.) It turns out, all grammars are ambiguous for this language. That's why this language is inherently ambiguous.