Search code examples
algorithmmathlogicdiscrete-mathematics

Complexity for converting any propositional formula to CNF format


What is the complexity for converting any propositional formula to CNF format? Is it an NP-complete problem?


Solution

  • The standard algorithm to transform a general Well-Formed Formula to an equivalent CNF has an exponential run time, since in the worst case a n-clauses WFF is equivalento to a 2^n-clauses CNF.

    However, you can transform in polynomial time an arbitrary boolean formula into a CNF that is not stricty equivalent, but satisfable only if the boolean formula is satisfable. This is the standard reduction used to prove that 3CNF is NP-complete, givent that the more general SAT is NP-complete. See here.