Simplify functions with Karnaugh maps and account for unused input combinations. Compare implementations by gate count, logic depth, and clarity.