True quantified Boolean formula

Last updated

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 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:

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.

Prenex normal form

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 . If there are Boolean variables, the entire formula can be written as

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 ,

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.

QBF solvers


There is a simple recursive algorithm for determining whether a QBF is in TQBF (i.e. is true). Given some QBF

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:

If , then return . If , then return . [4]

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).[ citation needed ]

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.[ citation needed ]

State of the art

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.) [5] [6] The case where there are only 2 quantifiers, known as 2QBF, has received special attention. [7] [ weasel words ]

The QBF solver competition QBFEVAL has been running more-or-less annually since 2004; [5] [6] solvers are required to read instances in QDIMACS format and either the QCIR or QAIGER formats. [8] High-performing QBF solvers generally use QDPLL (a generalization of DPLL) or CEGAR. [5] [6] [7] 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; [9] 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. [9] [ weasel words ]

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. [14] 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. [14]

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. [14] 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. [15]

QBF solvers can be used for formal equivalence checking, and can also be used to synthesize Boolean functions. [14]

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). [8]


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.,

This means that, for a PSPACE language L, whether an input x is in L can be decided by checking whether is in TQBF, for some function f that is required to run in polynomial time (relative to the length of the input). Symbolically,

Proving that TQBF is PSPACE-hard, requires specification of f.

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 and , which represent two possible configurations of the DTM for L, and a natural number t, in constructing a QBF which is true if and only if the DTM for L can go from the configuration encoded in to the configuration encoded in in no more than t steps. The function f, then, will construct from the DTM for L a QBF , where is the DTM's starting configuration, is the DTM's accepting configuration, and T is the maximum number of steps the DTM could need to move from one configuration to the other. We know that T = O(exp(n)), where n is the length of the input, because this bounds the total number of possible configurations of the relevant DTM. Of course, it cannot take the DTM more steps than there are possible configurations to reach unless it enters a loop, in which case it will never reach anyway.

At this stage of the proof, we have already reduced the question of whether an input formula w (encoded, of course, in ) is in L to the question of whether the QBF , i.e., , is in TQBF. The remainder of this proof proves that f can be computed in polynomial time.

For , computation of is straightforward—either one of the configurations changes to the other in one step or it does not. Since the Turing Machine that our formula represents is deterministic, this presents no problem.

For , computation of involves a recursive evaluation, looking for a so-called "middle point" . In this case, we rewrite the formula as follows:

This converts the question of whether can reach in t steps to the question of whether reaches a middle point in steps, which itself reaches in steps. The answer to the latter question of course gives the answer to the former.

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 is only one midpoint—for greater t, there are more stops along the way, so to speak.) So the time required to recursively evaluate in this manner could be exponential as well, simply because the formula could become exponentially large. This problem is solved by universally quantifying using variables and over the configuration pairs (e.g., ), which prevents the length of the formula from expanding due to recursive layers. This yields the following interpretation of :

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 is made, .

Thus, , so TQBF is PSPACE-hard. Together with the above result that TQBF is in PSPACE, this completes the proof that TQBF is a PSPACE-complete language.

(This proof follows Sipser 2006 pp. 310–313 in all essentials. Papadimitriou 1994 also includes a proof.)


Notes and references

  1. M. Garey & D. Johnson (1979). Computers and Intractability: A Guide to the Theory of NP-Completeness. W. H. Freeman, San Francisco, California. ISBN   0-7167-1045-5.
  2. A. Chandra, D. Kozen, and L. Stockmeyer (1981). "Alternation". Journal of the ACM. 28 (1): 114–133. doi:10.1145/322234.322243.CS1 maint: multiple names: authors list (link)
  3. Adi Shamir (1992). "Ip = Pspace". Journal of the ACM. 39 (4): 869–877. doi:10.1145/146585.146609. S2CID   315182.
  4. Arora, Sanjeev; Barak, Boaz (2009), "Space complexity", Computational Complexity, Cambridge: Cambridge University Press, pp. 78–94, doi:10.1017/cbo9780511804090.007, ISBN   978-0-511-80409-0 , retrieved 2021-05-26
  5. 1 2 3 "QBFEVAL Home Page". Retrieved 2021-02-13.
  6. 1 2 3 "QBF Solvers | Beyond NP". Retrieved 2021-02-13.
  7. 1 2 Balabanov, Valeriy; Roland Jiang, Jie-Hong; Scholl, Christoph; Mishchenko, Alan; K. Brayton, Robert (2016). "2QBF: Challenges and Solutions" (PDF). International Conference on Theory and Applications of Satisfiability Testing: 453–459. Archived (PDF) from the original on 13 February 2021 via SpringerLink.
  8. 1 2 "QBFEVAL'20". Retrieved 2021-05-29.
  9. 1 2 3 4 5 6 7 8 9 Lonsing, Florian (December 2017). "An Introduction to QBF Solving" (PDF). Retrieved 29 May 2021.
  10. Rabe, Markus N. (2021-04-15), MarkusRabe/cadet , retrieved 2021-05-06
  11. Tentrup, Leander (2021-05-06), ltentrup/caqe , retrieved 2021-05-06
  12. "DepQBF Solver". Retrieved 2021-05-06.
  13. "sKizzo - a QBF solver". Retrieved 2021-05-06.
  14. 1 2 3 4 Shukla, Ankit; Biere, Armin; Seidl, Martina; Pulina, Luca (2019). A Survey on Applications of Quantified Boolean Formulas (PDF). 2019 IEEE 31st International Conference on Tools for Artificial Intelligence. pp. 78–84. doi:10.1109/ICTAI.2019.00020 . Retrieved 29 May 2021.
  15. Shen, Zhihe. Using QBF Solvers to Solve Games and Puzzles (PDF) (Thesis). Boston College.
  16. 1 2 Janota, Mikoláš; Marques-Silva, Joao (2011). On Deciding MUS Membership with QBF. Principles and Practice of Constraint Programming – CP 2011. 6876. pp. 414–428. doi:10.1007/978-3-642-23786-7_32. ISBN   978-3-642-23786-7.
  17. Krom, Melven R. (1967). "The Decision Problem for a Class of First-Order Formulas in Which all Disjunctions are Binary". Zeitschrift für Mathematische Logik und Grundlagen der Mathematik. 13 (1–2): 15–20. doi:10.1002/malq.19670130104..
  18. Aspvall, Bengt; Plass, Michael F.; Tarjan, Robert E. (1979). "A linear-time algorithm for testing the truth of certain quantified boolean formulas" (PDF). Information Processing Letters . 8 (3): 121–123. doi:10.1016/0020-0190(79)90002-4..
  19. Chen, Hubie (December 2009). "A Rendezvous of Logic, Complexity, and Algebra". ACM Computing Surveys. ACM. 42 (1): 1–32. arXiv: cs/0611018 . doi:10.1145/1592451.1592453. S2CID   11975818.
  20. Lichtenstein, David (1982-05-01). "Planar Formulae and Their Uses". SIAM Journal on Computing. 11 (2): 329–343. doi:10.1137/0211025. ISSN   0097-5397.

See also

Related Research Articles

In logic and computer science, the Boolean satisfiability problem is the problem of determining if there exists an interpretation that satisfies a given Boolean formula. In other words, it asks whether the variables of a given Boolean formula can be consistently replaced by the values TRUE or FALSE in such a way that the formula evaluates to TRUE. If this is the case, the formula is called satisfiable. On the other hand, if no such assignment exists, the function expressed by the formula is FALSE for all possible variable assignments and the formula is unsatisfiable. For example, the formula "a AND NOT b" is satisfiable because one can find the values a = TRUE and b = FALSE, which make = TRUE. In contrast, "a AND NOT a" is unsatisfiable.

First-order logic—also known as predicate logic, quantificational logic, and first-order predicate calculus—is a collection of formal systems used in mathematics, philosophy, linguistics, and computer science. First-order logic uses quantified variables over non-logical objects, and allows the use of sentences that contain variables, so that rather than propositions such as "Socrates is a man", one can have expressions in the form "there exists x such that x is Socrates and x is a man", where "there exists" is a quantifier, while x is a variable. This distinguishes it from propositional logic, which does not use quantifiers or relations; in this sense, propositional logic is the foundation of first-order logic.

Original proof of Gödels completeness theorem

The proof of Gödel's completeness theorem given by Kurt Gödel in his doctoral dissertation of 1929 is not easy to read today; it uses concepts and formalisms that are no longer used and terminology that is often obscure. The version given below attempts to represent all the steps in the proof and all the important ideas faithfully, while restating the proof in the modern language of mathematical logic. This outline should not be considered a rigorous proof of the theorem.

In mathematical logic, model theory is the study of the relationship between formal theories, and their models, taken as interpretations that satisfy the sentences of that theory. The aspects investigated include the number and size of models of a theory, the relationship of different models to each other, and their interaction with the formal language itself. In particular, model theorists also investigate the sets that can be defined in a model of a theory, and the relationship of such definable sets to each other. As a separate discipline, model theory goes back to Alfred Tarski, who first used the term "Theory of Models" in publication in 1954. Since the 1970s, the subject has been shaped decisively by Saharon Shelah's stability theory. The relative emphasis placed on the class of models of a theory as opposed to the class of definable sets within a model fluctuated in the history of the subject, and the two directions are summarised by the pithy characterisations from 1973 and 1997 respectively:

In computational complexity theory, a decision problem is PSPACE-complete if it can be solved using an amount of memory that is polynomial in the input length and if every other problem that can be solved in polynomial space can be transformed to it in polynomial time. The problems that are PSPACE-complete can be thought of as the hardest problems in PSPACE, because a solution to any one such problem could easily be used to solve any other problem in PSPACE.

In Boolean logic, a formula is in conjunctive normal form (CNF) or clausal normal form if it is a conjunction of one or more clauses, where a clause is a disjunction of literals; otherwise put, it is a product of sums or an AND of ORs. As a canonical normal form, it is useful in automated theorem proving and circuit theory.

In mathematical logic, propositional logic and predicate logic, a well-formed formula, abbreviated WFF or wff, often simply formula, is a finite sequence of symbols from a given alphabet that is part of a formal language. A formal language can be identified with the set of formulas in the language.

In mathematical logic, a formula of first-order logic is in Skolem normal form if it is in prenex normal form with only universal first-order quantifiers.

In computational complexity theory, the polynomial hierarchy is a hierarchy of complexity classes that generalize the classes NP and co-NP. Each class in the hierarchy is contained within PSPACE. The hierarchy can be defined using oracle machines or alternating Turing machines. It is a resource-bounded counterpart to the arithmetical hierarchy and analytical hierarchy from mathematical logic. The union of the classes in the hierarchy is denoted PH.

In computational complexity theory, a function problem is a computational problem where a single output is expected for every input, but the output is more complex than that of a decision problem. For function problems, the output is not simply 'yes' or 'no'.

In computational complexity theory, an alternating Turing machine (ATM) is a non-deterministic Turing machine (NTM) with a rule for accepting computations that generalizes the rules used in the definition of the complexity classes NP and co-NP. The concept of an ATM was set forth by Chandra and Stockmeyer and independently by Kozen in 1976, with a joint journal publication in 1981.

Computation tree logic (CTL) is a branching-time logic, meaning that its model of time is a tree-like structure in which the future is not determined; there are different paths in the future, any one of which might be an actual path that is realized. It is used in formal verification of software or hardware artifacts, typically by software applications known as model checkers, which determine if a given artifact possesses safety or liveness properties. For example, CTL can specify that when some initial condition is satisfied, then all possible executions of a program avoid some undesirable condition. In this example, the safety property could be verified by a model checker that explores all possible transitions out of program states satisfying the initial condition and ensures that all such executions satisfy the property. Computation tree logic belongs to a class of temporal logics that includes linear temporal logic (LTL). Although there are properties expressible only in CTL and properties expressible only in LTL, all properties expressible in either logic can also be expressed in CTL*.

Independence-friendly logic is an extension of classical first-order logic (FOL) by means of slashed quantifiers of the form and , where is a finite set of variables. The intended reading of is "there is a which is functionally independent from the variables in ". IF logic allows one to express more general patterns of dependence between variables than those which are implicit in first-order logic. This greater level of generality leads to an actual increase in expressive power; the set of IF sentences can characterize the same classes of structures as existential second-order logic. For example, it can express branching quantifier sentences, such as the formula which expresses infinity in the empty signature; this cannot be done in FOL. Therefore, first-order logic cannot, in general, express this pattern of dependency, in which depends only on and , and depends only on and . IF logic is more general than branching quantifiers, for example in that it can express dependencies that are not transitive, such as in the quantifier prefix , which expresses that depends on , and depends on , but does not depend on .

IP (complexity)

In computational complexity theory, the class IP is the class of problems solvable by an interactive proof system. It is equal to the class PSPACE. The result was established in a series of papers: the first by Lund, Karloff, Fortnow, and Nisan showed that co-NP had multiple prover interactive proofs; and the second, by Shamir, employed their technique to establish that IP=PSPACE. The result is a famous example where the proof does not relativize.

In complexity theory, the Karp–Lipton theorem states that if the Boolean satisfiability problem (SAT) can be solved by Boolean circuits with a polynomial number of logic gates, then

In model theory and related areas of mathematics, a type is an object that describes how a element or finite collection of elements in a mathematical structure might behave. More precisely, it is a set of first-order formulas in a language L with free variables x1, x2,…, xn that are true of a sequence of elements of an L-structure . Depending on the context, types can be complete or partial and they may use a fixed set of constants, A, from the structure . The question of which types represent actual elements of leads to the ideas of saturated models and omitting types.

In the study of formal theories in mathematical logic, bounded quantifiers are often included in a formal language in addition to the standard quantifiers "∀" and "∃". Bounded quantifiers differ from "∀" and "∃" in that bounded quantifiers restrict the range of the quantified variable. The study of bounded quantifiers is motivated by the fact that determining whether a sentence with only bounded quantifiers is true is often not as difficult as determining whether an arbitrary sentence is true.

In descriptive complexity, a branch of computational complexity, FO is a complexity class of structures that can be recognized by formulas of first-order logic, and also equals the complexity class AC0. Descriptive complexity uses the formalism of logic, but does not use several key notions associated with logic such as proof theory or axiomatization.

Dependence logic is a logical formalism, created by Jouko Väänänen, which adds dependence atoms to the language of first-order logic. A dependence atom is an expression of the form , where are terms, and corresponds to the statement that the value of is functionally dependent on the values of .

Bounded arithmetic is a collective name for a family of weak subtheories of Peano arithmetic. Such theories are typically obtained by requiring that quantifiers be bounded in the induction axiom or equivalent postulates. The main purpose is to characterize one or another class of computational complexity in the sense that a function is provably total if and only if it belongs to a given complexity class. Further, theories of bounded arithmetic present uniform counterparts to standard propositional proof systems such as Frege system and are, in particular, useful for constructing polynomial-size proofs in these systems. The characterization of standard complexity classes and correspondence to propositional proof systems allows to interpret theories of bounded arithmetic as formal systems capturing various levels of feasible reasoning.