As I understand it the Quine-McCluskey method allows you to start with a set of maxterms (or minterms), and combine them pairwise in a systematic way into a smaller set of clauses with a smaller set of variables in some (hopefully most) of the clauses. I understand how to apply the method, given a set of maxterms.
My question is: if I start not with a set of maxterms, but with an arbitrary set of clauses in a CNF (analogously in a DNF), can I apply the same approach to "combine" compatible terms? Or must I first expand the CNF into product of maxterms? The latter would make the algorithm exponential in worst case, and the former would seem to be quadratic in best case.
When I look at the QM method, it is not immediately obvious to me which part of the algorithm really depend on the initial set of clauses being maxterms.