Is the Complexity of Satisfiable Boolean Expressions in NP?

Click For Summary
SUMMARY

The complexity of satisfiable Boolean expressions is established to be in the complexity class $\mathcal{NP}$. The language $L$, consisting of strings representing satisfiable Boolean expressions, can be accepted by a nondeterministic algorithm that guesses a satisfying assignment of binary values to the variables. The evaluation of the resulting expression can be performed in polynomial time, specifically in $O(n^2)$ steps, confirming that determining satisfiability is feasible within this complexity class. This conclusion is supported by the use of nondeterministic Turing machines and polynomial time complexity analysis.

PREREQUISITES
  • Understanding of Boolean algebra and expressions
  • Familiarity with complexity classes, particularly $\mathcal{NP}$
  • Knowledge of nondeterministic algorithms and Turing machines
  • Basic programming skills for implementing evaluation algorithms
NEXT STEPS
  • Study the concept of nondeterministic Turing machines and their applications
  • Learn about polynomial time complexity and its significance in computational theory
  • Explore Boolean satisfiability problem (SAT) and its implications in computer science
  • Implement a satisfiability algorithm in a programming language of choice
USEFUL FOR

This discussion is beneficial for computer scientists, particularly those interested in computational complexity, algorithm design, and theoretical computer science. It is also valuable for students studying algorithms and complexity theory.

mathmari
Gold Member
MHB
Messages
4,984
Reaction score
7
Hey! :o

The Boolean expression $(p_1+p_2)*p_3$ can be represented by the string $(1+2)3$, where integer $i$ represents variable $p_i$.

Consider the language $L$ consisting of all strings representing satisiable Boolean expressions (those for which some assignment of $0$'s and $1$;1 to the variables gives the expression the value 1).

We claim that $L$ is in $\mathcal{NP}$.

A nondeterministic algorithm to accept $L$ begins by "guessing" a satisfying assignment of $0$'s and $1$'s to the propositional variables in an input string, if such an assignment exists.
Then, the value ($0$ or $1$) of each variable is substituted for the variable wherever it occurs in the input string.
Some shifting of the string will be needed to close up gaps when the single symbol $0$ or $1$ is substituted for a decimal representationm of a propositional variable.
Then the resulting expression is evaluated to verify that it has the value $1$.
The evaluation can be done in time proportional to its length by a number of parsing algorithms.
Even without using an efficient parsing algorithm, the reader should have a little trouble evaluating a proposition in $O(n^2)$ steps.
Hence there is a nondeterministic Turing machine of polynomial time complexity to accept satisfiable Boolean expressions, and thus the problem of determining whether a Boolean expression is satisfiable is in $\mathcal{NP}$.Could you explain me how we have shown that there is a nondeterministic Turing machine of polynomial time complexity to accept satisfiable Boolean expressions?? (Wondering)

I haven't understood it...
 
Technology news on Phys.org
The details are a bit messy, but the idea is the following.

(1) Nondeterministically choose a sequence of $n$ zeros and ones where $n$ is the number of variables in the expression.

(2) Substitute chosen values for variables. The result is an expression containing 0, 1 and operations.

(3) Evaluate the resulting expression.

(4) Accept if the result is 1.

With some handwaving one can show that this requires polynomial time. I recommend understanding this first if you write this algorithm using not a Turing machine, but your favorite programming languages with all data structures (such as trees) and standard functions available.
 

Similar threads

Replies
52
Views
4K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
7
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
Replies
29
Views
5K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 17 ·
Replies
17
Views
4K
  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
9
Views
3K