Why is this problem in $P$?
Given a boolen polynomial $p$ with at most $k$ (positive integer $> 0$) clauses in CNF determine if $p$ is satisfable.
Why is this problem in $P$?
Given a boolen polynomial $p$ with at most $k$ (positive integer $> 0$) clauses in CNF determine if $p$ is satisfable.
Copyright © 2021 JogjaFile Inc.
Let $n$ be the length of the input. Then there are at most $n$ literals per clause. A clause is true precisely when at least one of its literals is true. So it suffices to check all combinations of precisely one literal per clause to see if there are contradictions (i.e. if each such combination contains both $p, \neg p$ for some propositional letter $p$). But there are only $\mathcal O(n^k)$ such combinations, which is a polynomial in the input size $n$.