Implementation of Quine-McCluskey algorithm