Simplify the Boolean Expressions up to the given number of literals