We show that all the possible SC-CFGs in CNF consistent with the congruence classes directly correspond to all the solutions of a boolean formula built upon the congruence classes, where the variables of this formula correspond to nonterminals (and, with some minor adjustments, production rules as well).
finding the smallest possible grammar directly translates into finding a solution which has the smallest possible amount of true variables.