79352095

Date: 2025-01-13 11:58:57
Score: 1
Natty:
Report link

As a point of interest, we can also say something similar in reverse. That is, all boolean expressions can be expressed as graph coloring problems.

To do this, take an arbitrary boolean expression (a satisfiability problem), and write it out in 3-conjunctive normal form. From this, we can convert the latter expression into a graph that is 3-colorable if and only if the original expression is satisfiable. This proves that the graph 3-coloring problem in NP-complete.

Here's an example based on the proof of Karp (1972). (Karp, M. "Complexity of Computer Computations", Reducibility Among Combinatorial Problems, pages 85–103. Plenum, New York, 1972.)

3-CNF Converted to 3-coloring

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Rhyd Lewis