In computational complexity theory, the language TQBF is a formal language consisting of the true quantified Boolean formulas. A (fully) quantified Boolean formula is a formula in quantified propositional logic (also known as Second-order propositional logic) where every variable is quantified (or bound), using either existential or universal quantifiers, at the beginning of the sentence. Such a formula is equivalent to either true or false (since there are no free variables). If such a formula evaluates to true, then that formula is in the language TQBF. It is also known as QSAT (Quantified SAT).
In computational complexity theory, the quantified Boolean formula problem (QBF) is a generalization of the Boolean satisfiability problem in which both existential quantifiers and universal quantifiers can be applied to each variable. Put another way, it asks whether a quantified sentential form over a set of Boolean variables is true or false. For example, the following is an instance of QBF:
\forallx \existsy \existsz ((x\lorz)\landy)
QBF is the canonical complete problem for PSPACE, the class of problems solvable by a deterministic or nondeterministic Turing machine in polynomial space and unlimited time.[1] Given the formula in the form of an abstract syntax tree, the problem can be solved easily by a set of mutually recursive procedures which evaluate the formula. Such an algorithm uses space proportional to the height of the tree, which is linear in the worst case, but uses time exponential in the number of quantifiers.
Provided that MA ⊊ PSPACE, which is widely believed, QBF cannot be solved, nor can a given solution even be verified, in either deterministic or probabilistic polynomial time (in fact, unlike the satisfiability problem, there's no known way to specify a solution succinctly). It can be solved using an alternating Turing machine in linear time, since AP = PSPACE, where AP is the class of problems alternating machines can solve in polynomial time.[2]
When the seminal result IP = PSPACE was shown (see interactive proof system), it was done by exhibiting an interactive proof system that could solve QBF by solving a particular arithmetization of the problem.[3]
QBF formulas have a number of useful canonical forms. For example, it can be shown that there is a polynomial-time many-one reduction that will move all quantifiers to the front of the formula and make them alternate between universal and existential quantifiers. There is another reduction that proved useful in the IP = PSPACE proof where no more than one universal quantifier is placed between each variable's use and the quantifier binding that variable. This was critical in limiting the number of products in certain subexpressions of the arithmetization.
A fully quantified Boolean formula can be assumed to have a very specific form, called prenex normal form. It has two basic parts: a portion containing only quantifiers and a portion containing an unquantified Boolean formula usually denoted as
\displaystyle\phi
\displaystylen
\displaystyle\existsx1\forallx2\existsx3 … Qnxn\phi(x1,x2,x3,...,xn)
where every variable falls within the scope of some quantifier. By introducing dummy variables, any formula in prenex normal form can be converted into a sentence where existential and universal quantifiers alternate. Using the dummy variable
\displaystyley1
\displaystyle\existsx1\existsx2\phi(x1,x2) \mapsto \existsx1\forally1\existsx2\phi(x1,x2)
The second sentence has the same truth value but follows the restricted syntax. Assuming fully quantified Boolean formulas to be in prenex normal form is a frequent feature of proofs.
There is a simple recursive algorithm for determining whether a QBF is in TQBF (i.e. is true). Given some QBF
Q1x1Q2x2 … Qnxn\phi(x1,x2,...,xn).
If the formula contains no quantifiers, we can just return the formula. Otherwise, we take off the first quantifier and check both possible values for the first variable:
A=Q2x2 … Qnxn\phi(0,x2,...,xn),
B=Q2x2 … Qnxn\phi(1,x2,...,xn).
If
Q1=\exists
A\lorB
Q1=\forall
A\landB
How fast does this algorithm run?For every quantifier in the initial QBF, the algorithm makes two recursive calls on only a linearly smaller subproblem. This gives the algorithm an exponential runtime O(2n).
How much space does this algorithm use?Within each invocation of the algorithm, it needs to store the intermediate results of computing A and B. Every recursive call takes off one quantifier, so the total recursive depth is linear in the number of quantifiers. Formulas that lack quantifiers can be evaluated in space logarithmic in the number of variables. The initial QBF was fully quantified, so there are at least as many quantifiers as variables. Thus, this algorithm uses O(n + log n) = O(n) space. This makes the TQBF language part of the PSPACE complexity class.
Despite the PSPACE-completeness of QBF, many solvers have been developed to solve these instances. (This is analogous to the situation with SAT, the single existential quantifier version; even though it is NP-complete, it is still possible to solve many SAT instances heuristically.)[4] [5] The case where there are only 2 quantifiers, known as 2QBF, has received special attention.[6]
The QBF solver competition QBFEVAL has been running more-or-less annually since 2004; solvers are required to read instances in QDIMACS format and either the QCIR or QAIGER formats.[7] High-performing QBF solvers generally use QDPLL (a generalization of DPLL) or CEGAR. Research into QBF solving began with the development of backtracking DPLL for QBF in 1998, followed by the introduction of clause learning and variable elimination in 2002;[8] thus, as compared to SAT solving, which has been under development since the 1960s, QBF is a relatively young field of research as of 2017.
Some prominent QBF solvers include:
QBF solvers can be applied to planning (in artificial intelligence), including safe planning; the latter is critical in applications of robotics.[11] QBF solvers can also be applied to bounded model checking as they provide a shorter encoding than would be needed for a SAT-based solver.
The evaluation of a QBF can be seen as a two-player game between a player who controls existentially quantified variables and a player who controls universally quantified variables. This makes QBFs suitable for encoding reactive synthesis problems. Similarly, QBF solvers can be used to model adversarial games in game theory. For example, QBF solvers can be used to find winning strategies for games of geography, which can then be automatically played interactively.[12]
QBF solvers can be used for formal equivalence checking, and can also be used to synthesize Boolean functions.
Other types of problems that can be encoded as QBFs include:
In QBFEVAL 2020, a "DQBF Track" was introduced where instances were allowed to have Henkin quantifiers (expressed in DQDIMACS format).
The TQBF language serves in complexity theory as the canonical PSPACE-complete problem. Being PSPACE-complete means that a language is in PSPACE and that the language is also PSPACE-hard. The algorithm above shows that TQBF is in PSPACE.Showing that TQBF is PSPACE-hard requires showing that any language in the complexity class PSPACE can be reduced to TQBF in polynomial time. I.e.,
\forallL\inPSPACE,L\leqpTQBF.
This means that, for a PSPACE language L, whether an input is in L can be decided by checking whether
f(x)
x\inL\ifff(x)\inTQBF.
Proving that TQBF is PSPACE-hard, requires specification of .
So, suppose that L is a PSPACE language. This means that L can be decided by a polynomial space deterministic Turing machine (DTM). This is very important for the reduction of L to TQBF, because the configurations of any such Turing Machine can be represented as Boolean formulas, with Boolean variables representing the state of the machine as well as the contents of each cell on the Turing Machine tape, with the position of the Turing Machine head encoded in the formula by the formula's ordering. In particular, our reduction will use the variables
c1
c2
\phi | |
c1,c2,t |
c1
c2
\phi | |
cstart,caccept,T |
cstart
caccept
caccept
caccept
At this stage of the proof, we have already reduced the question of whether an input formula (encoded, of course, in
cstart
\phi | |
cstart,caccept,T |
f(w)
For
t=1
\phi | |
c1,c2,t |
For
t>1
\phi | |
c1,c2,t |
m1
\phi | |
c1,c2,t |
=\existsm1(\phi
c1,m1,\lceilt/2\rceil |
\wedge\phi | |
m1,c2,\lceilt/2\rceil |
).
This converts the question of whether
c1
c2
c1
m1
t/2
c2
t/2
Now, t is only bounded by T, which is exponential (and so not polynomial) in the length of the input. Additionally, each recursive layer virtually doubles the length of the formula. (The variable
m1
\phi | |
c1,c2,t |
c3
c4
\{(c1,m1),(m1,c2)\}
\phi | |
c1,c2,t |
\phi | |
c1,c2,t |
=\existsm1\forall(c3,c4)\in\{(c1,m1),(m1,c2)\}(\phi
c3,c4,\lceilt/2\rceil |
).
This version of the formula can indeed be computed in polynomial time, since any one instance of it can be computed in polynomial time. The universally quantified ordered pair simply tells us that whichever choice of
(c3,c4)
\phi | |
c1,c2,t |
\iff\phi | |
c3,c4,\lceilt/2\rceil |
Thus,
\forallL\inPSPACE,L\leqpTQBF
(This proof follows Sipser 2006 pp. 310–313 in all essentials. Papadimitriou 1994 also includes a proof.)
\phi
\exists\vec{x1}\forall\vec{x2} … Qi\vec{xi} \phi(\vec{x1},\vec{x2},...,\vec{xi}) = 1
\vec{xi}