0

I have a weird feeling that finding a single feasible solution to the set cover problem is as hard as SAT problem.

I think that this might be wrong but I am not sure why. To illustrate my thinking, let us look through a toy example of a set cover problem:

$\begin{array}{*{20}{c}} {\min }&{{x_1} + {x_2} + {x_3} + {x_4}}\\ {{\rm{s}}{\rm{.t}}}&{{x_1} + {x_2} + {x_4} \ge 1}\\ {}&{{x_2} + {x_3} + {x_4} \ge 1}\\ {}&{{x_1} + {x_3} + {x_4} \ge 1}\\ {}&{{x_i} \in \left\{ {0,1} \right\}} \end{array}$

The issue of finding the feasible set for this problem could be reformulated as finding an assignment such that the following boolean function $f\left( {{x_1},{x_2},{x_3},{x_4}} \right)$ can be evaluated to true:

$f\left( {{x_1},{x_2},{x_3},{x_4}} \right) = \underbrace {\left( {{x_1} \vee {x_2} \vee {x_4}} \right)}_{{\rm{constraint 1}}} \wedge \underbrace {\left( {{x_2} \vee {x_3} \vee {x_4}} \right)}_{{\rm{constraint 2}}} \wedge \underbrace {\left( {{x_1} \vee {x_3} \vee {x_4}} \right)}_{{\rm{constraint 3}}}$

This really look like a SAT problem for CNF (more like 3-SAT) but finding the assignment such that $f$ is true is very easy by just setting all of the variable $\left[ {\begin{array}{*{20}{c}} {{x_1}}\\ {{x_2}}\\ {{x_3}}\\ {{x_4}} \end{array}} \right] = \left[ {\begin{array}{*{20}{c}} 1\\ 1\\ 1\\ 1 \end{array}} \right]$.

Obviously, this can be done in linear time.

I have another idea is that although finding the feasible solution to the set cover problem looks like SAT. This is a very special instance of SAT with special structure (that I don't know the corresponding terminology to describe) that can be solved quickly.

Could you kindly help me to know where am I wrong ?

Thank you for your enthusiasm

1 Answers1

1

You are correct that the problem of "finding a single feasible solution to minimium set cover" (let's call this problem FS) as you've defined it is possible in linear time. If all we want is a feasible cover, just try all of the sets and see if it forms a cover. This runs in linear time, as you point out. So, this is a decision problem in $P$.

As you point out, there must be an issue in your thinking because SAT is NP-Complete. The issue in your line of thought here is the direction of the "hardness" reduction. If FS is as hard as SAT, then it should be the case that for every instance of SAT, we can define an instance of FS which encodes the SAT problem. You've gone the opposite way: you've demonstrated that FS can always be written as a SAT problem. This only shows that SAT is harder than FS, not that FS is harder than SAT.

For what it's worth: SAT is NP-Complete, which means that every problem contained in NP can be represented as a SAT problem. So it's a good sanity check that you can write FS as a SAT problem! The other way around would grant you fame and riches :)

  • Thank you, this sentence "If FS is as hard as SAT, then it should be the case that for every instance of SAT" enlighten me, so is there an instance of the SAT problem that cannot be written as FS ? – Tuong Nguyen Minh Jan 21 '24 at 15:34
  • 1
    Well, that's sort of a difficult question to answer. The informal answer is "yes", there are plenty of SAT problems that cannot be written as "similarly sized" FS instances. More precisely, if P != NP, then there are necessarily SAT problems that cannot be written as (similarly sized) FS. Note that it may be possible (I'm not sure) to encode SAT instance in an FS instance with exponentially many variables, in which case "linear time solution" doesn't get you anywhere. – Chris Harshaw Jan 21 '24 at 17:05
  • I also think it is a yes too but to actually finding an exact instance as an example is really difficult – Tuong Nguyen Minh Jan 21 '24 at 18:11
  • Oops! I made an error with my previous comment -- the exact same error that you made in the original post actually, so it happens to all of us :) What I meant to write was: if you can prove that an arbitrary SAT instance cannot be expressed as a poly-sized FS instance, then you've shown that P != NP. So indeed, it should be hard to rigorously establish this, even tho it feels clearly true. – Chris Harshaw Jan 23 '24 at 14:30