0

I am having difficulty understanding what a SAT problem is asking. The answer given by com here says the answer to a SAT problem is YES or NO and we don't care about the satisfying values for the literals. If this is the case can someone link me to either the definitions (preferably for 3 SAT) stating this or work showing why this is the most useful way to think about these problems?

La Fon
  • 1
  • "Most" useful depends on what you actually want to use it for. But yes / no problems are relatively simple to reason theoretically about, especially when it comes to comparing different problems. That might be one reason. – Arthur Jun 04 '19 at 22:23
  • @Arthur Thank you, but I still don't understand which one it is. Do you know which one a 3 SAT problem is? To ask is a formula is satisfyable and to ask what is there a solution to this formula seem like very different questions since the solution to the latter contains the answer to the first, but not the other way around. I would mostly just like to know which one SAT is. – La Fon Jun 04 '19 at 22:31
  • "Is there a solution to the formula" (where "solution" means a choice of variables which makes the formula evaluate to true) and "Is the formula satisfiable" (where "satisfiable" means there is a choice of variables which makes the formula evaluate to true) seems to me like they are exactly the same question. – Arthur Jun 04 '19 at 22:44
  • @Arthur sorry my English is bad. It was supposed to say; is a formula is satisfyable, and what is a solution to this formula. – La Fon Jun 04 '19 at 22:47
  • Yes, those are two somewhat different questions. The yes / no question is the typical one (at least according to wikipedia), but currently, as far as I'm aware, we know of no way of answering it without also answering the other one. – Arthur Jun 04 '19 at 22:55

1 Answers1

2

The answer is TRUE / FALSE according to wikipedia: https://en.wikipedia.org/wiki/Boolean_satisfiability_problem

But you can easily use an algorithm that provides a yes/no answer to find a satisfying solution, if one exists. Simply fix one of the variables to be TRUE and use your algorithm to see if there is still a satisfying solution. If not, it means that variable must be FALSE. You can then repeat with the next variable until all your variables are fixed, which takes $O(n)$ calls to your algorithm.

Frank
  • 121
  • I found the answer to the question I was trying to ask (but very badly worded). In general we only do care about if a solution exists and not what that solution might be. This becomes more obvious when you reduce a real world equivalent problem to 3SAT or similar.

    Regarding your proposed algorithm, I believe there is an error in that logic. I'm not 100% confident I understand what you mean but regardless there is no know algorithm to answer general SAT problems in O(n).

    – La Fon Mar 08 '21 at 16:09
  • My point was that if you have an algorithm to find a yes/no answer, you can use it ~$n$ times to find a satisfying solution. This is not $O(n)$ total time, but $O(n)$ calls of the yes/no algorithm, of which the best we know runs in exponential time (like you say). I've edited the answer to hopefully make it a bit clearer. – Frank Mar 08 '21 at 18:11