Redirected
in Digital Logic edited by
1,248 views
4 votes
4 votes

What is the time complexity for checking whether an assignment of truth values to variables $x_1,\dots ,x_n$ satisfies a given formula $f(x_1\dots,x_n)$?

  1. $O(2^n)$
  2. $O(g(n))$ where $g$ is a polynomial
  3. $O(log(n))$
  4. None of the above
in Digital Logic edited by
1.2k views

4 Comments

edited by
.Yes it is B
0
0
is it option D ?
0
0
Answer is B
0
0

This problem is Boolean satisfiablility problem (SAT) and SAT problem is proven to be NP Complete by Cook's theorem. That means it is solvable in Non-deterministic polynomial time. So, option B is correct. Please refer below links for better understanding:

https://www.geeksforgeeks.org/2-satisfiability-2-sat-problem/

https://en.wikipedia.org/wiki/Boolean_satisfiability_problem

https://en.wikipedia.org/wiki/Cook%E2%80%93Levin_theorem

 

3
3

3 Answers

0 votes
0 votes
If i'd have to check whether assigning a true value to each of $x_1,x_2,....x_n$ satisfies the formula or not can be done in polynomial time. i.e option B.
edited by

4 Comments

Look at my next comment, i hope it'd be clear now. Let me modify the answer as well.
0
0
to check whether assigning a true value to each ---why you are considering by own.In question  it is not mention right ?
0
0
Yes that was my mistake. I've edited now.
0
0
0 votes
0 votes
Since , the formula is given , we are to check whether assignment of truth value to all the variables satisfies the formula , this can be done in polynomial time. i.e Option B.
0 votes
0 votes

Answer : B

its 2-SAT problem

2-SAT is a special case of Boolean Satisfiability Problem and can be solved
in polynomial time.

Related questions