Exercises — PSPACE — Quantified Boolean Formula
Two more symbols carry this whole page, so let us re-anchor them in plain words before we start:
We evaluate a formula by drawing its game tree: one branching level per variable, ∃-levels combine children with OR, ∀-levels combine with AND. The figure below fixes that vocabulary once.
Figure s01 — game tree of . The amber root is the move; its two cyan children are the nodes reached by choosing (left) or (right); the four white leaves plug in both values of and compute . Reading it: each node ANDs its two leaves, and the root ORs its two children. On the right branch () both leaves equal , so that -node is TRUE, and one true child is all the -root needs ⇒ the whole formula is TRUE. (If the image fails to load, the alt-text is "game tree with an OR-root over two AND-nodes over four leaves".)

L1 · Recognition
Exercise 1.1
Which of these are QBF in prenex form (as defined in PSPACE — Quantified Boolean Formula)? For each, say if it is a closed formula (no free variables), and if so give its truth value.
(a)
(b)
(c)
Recall Solution 1.1
A prenex QBF is all quantifiers up front, then a quantifier-free body; closed means every variable is bound by some quantifier.
(a) Prenex ✔. Closed ✔ ( is bound). Value: ; already one true branch, and OR, so TRUE.
(b) Prenex ✔ but NOT closed: is free (no quantifier binds it). A formula with a free variable is not a QBF you can assign a truth value to — its answer depends on . So it has no single truth value.
(c) Prenex ✔. Closed ✔. Evaluate: try , then : , , both hold. ∃ found a good ⇒ TRUE.
L2 · Application
Exercise 2.1
Evaluate by unrolling the recursion. Show both ∀-branches. ( means " equals ": true when both bits match.)
Recall Solution 2.1
AND over , so we must check both branches and AND them.
- : need . Pick : . ∃ succeeds ⇒ T.
- : need . Pick : . ∃ succeeds ⇒ T.
Both ∀-branches true, TRUE.
Notice the choice of depended on (). That dependency is exactly what order allows.
Exercise 2.2
Evaluate .
Recall Solution 2.2
- : . For : ; for : . Every value gives , so ∃ (an OR over both) F.
- One ∀-branch already false. is an AND, so FALSE.
We may stop early: ∀ needs all branches true; the first failure decides it.
L3 · Analysis
Exercise 3.1
Are these two formulas equivalent? Decide each and explain the difference.
Recall Solution 3.1
: ∃ commits to one first, then it must beat every .
- : = T for and . ⇒ A is TRUE.
: ∀ moves first, then ∃ picks knowing .
- : pick ⇒ . T.
- : pick ⇒ . T. ⇒ B is TRUE.
Both true here — but that is a coincidence of this body. The order still matters in general (see 3.2). In , may depend on ; in one fixed must work for all .
Exercise 3.2
Give a body over the booleans where . State both truth values.
Recall Solution 3.2
Take (" equals ").
: ∃ fixes one that must equal every .
- : fails at . : fails at . No fixed works ⇒ FALSE.
: ∀ picks , then ∃ picks .
- : T. : T. ⇒ TRUE.
So : swapping and changed the answer. The mechanism: in , the winning is a function of ; in it must be one constant.
L4 · Synthesis
Exercise 4.1
A QBF with variables has a game tree of depth . State (i) how many leaves the tree has, (ii) the time the recursive evaluator takes, and (iii) the space it uses. Explain why space time. (Here denotes the quantifier-free body of the formula, and is its size — the number of symbols we must store to evaluate one leaf.)
Recall Solution 4.1
Each variable branches into values, over levels. Throughout, is the size of the quantifier-free body — the fixed chunk of text we keep in memory to compute any single leaf.
- (i) Leaves: .
- (ii) Time: we visit essentially every node ⇒ work (times per leaf eval).
- (iii) Space: the recursion evaluates the first child, keeps one bit of its result, then reuses the same memory for the second child. Only the current root-to-node path lives in memory. Depth is , each frame stores , so
Why space time: we never hold two subtrees at once — we overwrite. Time must still touch all leaves, but space only needs one path of length . This memory-reuse is precisely why . See PSPACE and Polynomial Space.
Figure s02 — space vs time on a depth- tree. The full cyan binary tree ( shown) has leaves at the bottom; visiting them all is the time cost. The single amber path from root to one leaf is the only thing held in memory at any instant — depth , reused (overwritten) for every branch. So the picture literally shows a fat tree (time) versus one thin path (space). (If the image fails to load, the alt-text is "large binary tree with one highlighted root-to-leaf path".)

Exercise 4.2
Write on the clause set as a member of TQBF and confirm membership. (Recall from SAT and NP-completeness that SAT is the all-∃ case.)
Recall Solution 4.2
Find one satisfying assignment: try : clause 1 ; clause 2 . Both clauses true ⇒ the all-∃ formula is TRUE ⇒ .
L5 · Mastery
Exercise 5.1
In the PSPACE-hardness reduction we encode reachability as a QBF. The naïve rule is Let be the formula size. Write the recurrence for , solve it, and say why the reduction fails. Then state the Savitch -folded fix and its size recurrence.
Recall Solution 5.1
Setup and notation. Suppose the original PSPACE machine runs in space , where is the input length and is the constant exponent from . A configuration (full machine state) fits in bits, so there are at most configurations, and any accepting run has length . We build meaning "config reaches config in steps"; we need it up to levels.
Two pieces of notation used below, spelled out:
- means two nested universals — one quantifier per coordinate of the pair. It is pure shorthand; the scope of both covers the whole bracket that follows. (Each of is itself a block of bits encoding a configuration; " over a configuration" is in turn shorthand for over each of its bits.)
- is pair-equality, itself a Boolean formula: it is — every bit of matches the corresponding bit of AND every bit of matches . So " on pairs" is just a big conjunction of bit-wise ; nothing new is assumed.
Naïve size. appears twice, so Unrolling: . With that is — exponential formula size. A reduction must run in polynomial time and thus produce a polynomial-size output, so this fails.
Savitch fix (∀-folding). Reuse a single copy of by quantifying a generic endpoint pair with : Now appears once, so Polynomial in . This is Savitch's Theorem written in quantifiers: the lets one subformula serve both halves of the divide-and-conquer.
Exercise 5.2
For the naïve rule with and , compute exactly. Then for the folded rule with , compute . Compare.
Recall Solution 5.2
Naïve : this is .
- .
Folded : linear, .
- .
vs at just . The gap is -vs-; at the naïve one is astronomically larger. This single design choice is the difference between a valid poly-time reduction and a broken exponential one.
Exercise 5.3
Interpret as a 2-player game (see Two-Player Games and Game Trees). Who moves when, and what does the formula being true mean? Connect this to the Polynomial Hierarchy.
Recall Solution 5.3
Turns (read left to right): the ∃-player (Prover) sets ; the ∀-player (Spoiler) then sets trying to break ; the Prover sets in response. Perfect information, fixed length.
Truth = winning strategy: the formula is true the ∃-player has a strategy that makes hold no matter how the Spoiler plays . Concretely: such that for all there exists with true.
Hierarchy link: a fixed number of quantifier alternations defines the levels of the Polynomial Hierarchy. Allowing unboundedly many alternations (as full QBF does) is what lifts the problem all the way up to PSPACE-completeness.
Self-test recap
Recall One-line answers
∃ combines children with? ::: OR (true if at least one branch is true). ∀ combines children with? ::: AND (true only if both branches are true). Why is a formula with a free variable not in TQBF? ::: Its truth value depends on that variable; TQBF needs closed formulas. Space used by the recursive evaluator on vars? ::: — one reused root-to-leaf path. Time used? ::: — it visits all leaves. Naïve size? ::: — exponential, reduction fails. Folded size? ::: per your glue, polynomial overall — reduction works. What does abbreviate? ::: Two nested universals , one per pair coordinate. Truth of an alternating QBF as a game? ::: The ∃-player has a winning strategy.