Quine–McCluskey algorithm http://en.wikipedia.org/wiki/Quine%E2%80%93McCluskey_algorithm