Peter van Emde Boas: Games and Complexity, Guangzhou 2009 THE PEBBLE GAME Games and Complexity Guangzhou 2009 Peter van Emde Boas References available.

Slides:



Advertisements
Similar presentations
Problems and Their Classes
Advertisements

Complexity Classes: P and NP
NP-Hard Nattee Niparnan.
1 Nondeterministic Space is Closed Under Complement Presented by Jing Zhang and Yingbo Wang Theory of Computation II Professor: Geoffrey Smith.
Complexity Theory Lecture 3 Lecturer: Moni Naor. Recap Last week: Non deterministic communication complexity Probabilistic communication complexity Their.
Determinization of Büchi Automata
Peter van Emde Boas: Games and Complexity Guangzhou 2009 Complexity, Speed-up and Compression Games and Complexity Peter van Emde Boas Guangzhou 2009 ©
NP-complete and NP-hard problems Transitivity of polynomial-time many-one reductions Concept of Completeness and hardness for a complexity class Definition.
1 NP-Complete Problems. 2 We discuss some hard problems:  how hard? (computational complexity)  what makes them hard?  any solutions? Definitions 
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen.
Peter van Emde Boas: Playing Savage SOFSEM 2000 Milovy PLAYING SAVITCH Peter van Emde Boas ILLC-FNWI-Univ. of Amsterdam Bronstee.com Software and Services.
Complexity 12-1 Complexity Andrei Bulatov Non-Deterministic Space.
Complexity 15-1 Complexity Andrei Bulatov Hierarchy Theorem.
Complexity 11-1 Complexity Andrei Bulatov Space Complexity.
1 Introduction to Computability Theory Lecture12: Reductions Prof. Amos Israeli.
Introduction to Computability Theory
Peter van Emde Boas: Games and Computer Science 1999 Speed-up and Compression Theoretical Models 1999 Peter van Emde Boas References available at:
P, NP, PS, and NPS By Muhannad Harrim. Class P P is the complexity class containing decision problems which can be solved by a Deterministic Turing machine.
NP-complete and NP-hard problems Transitivity of polynomial-time many-one reductions Definition of complexity class NP –Nondeterministic computation –Problems.
FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY Read sections 7.1 – 7.3 of the book for next time.
1 Polynomial Church-Turing thesis A decision problem can be solved in polynomial time by using a reasonable sequential model of computation if and only.
The Theory of NP-Completeness
NP-complete and NP-hard problems
Analysis of Algorithms CS 477/677
Chapter 11: Limitations of Algorithmic Power
Chapter 11 Limitations of Algorithm Power Copyright © 2007 Pearson Addison-Wesley. All rights reserved.
February 20, 2015CS21 Lecture 191 CS21 Decidability and Tractability Lecture 19 February 20, 2015.
Theory of Computing Lecture 19 MAS 714 Hartmut Klauck.
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
PSPACE-Completeness Section 8.3 Giorgi Japaridze Theory of Computability.
1 L is in NP means: There is a language L’ in P and a polynomial p so that L 1 ≤ L 2 means: For some polynomial time computable map r : x: x L 1 iff r(x)
Complexity Classes Kang Yu 1. NP NP : nondeterministic polynomial time NP-complete : 1.In NP (can be verified in polynomial time) 2.Every problem in NP.
Chapter 11 Limitations of Algorithm Power. Lower Bounds Lower bound: an estimate on a minimum amount of work needed to solve a given problem Examples:
Nattee Niparnan. Easy & Hard Problem What is “difficulty” of problem? Difficult for computer scientist to derive algorithm for the problem? Difficult.
February 18, 2015CS21 Lecture 181 CS21 Decidability and Tractability Lecture 18 February 18, 2015.
Theory of Computation, Feodor F. Dragan, Kent State University 1 NP-Completeness P: is the set of decision problems (or languages) that are solvable in.
Computational Complexity Theory Lecture 2: Reductions, NP-completeness, Cook-Levin theorem Indian Institute of Science.
Theory of Computing Lecture 17 MAS 714 Hartmut Klauck.
NP Complexity By Mussie Araya. What is NP Complexity? Formal Definition: NP is the set of decision problems solvable in polynomial time by a non- deterministic.
MCS 312: NP Completeness and Approximation algorthms Instructor Neelima Gupta
Week 10Complexity of Algorithms1 Hard Computational Problems Some computational problems are hard Despite a numerous attempts we do not know any efficient.
1 Lower Bounds Lower bound: an estimate on a minimum amount of work needed to solve a given problem Examples: b number of comparisons needed to find the.
1 P P := the class of decision problems (languages) decided by a Turing machine so that for some polynomial p and all x, the machine terminates after at.
NP-Complete Problems. Running Time v.s. Input Size Concern with problems whose complexity may be described by exponential functions. Tractable problems.
NP-COMPLETE PROBLEMS. Admin  Two more assignments…  No office hours on tomorrow.
A Problem That Is Complete for PSPACE (Polynomial Space) BY TEJA SUDHA GARIGANTI.
NP-completeness Section 7.4 Giorgi Japaridze Theory of Computability.
Strings Basic data type in computational biology A string is an ordered succession of characters or symbols from a finite set called an alphabet Sequence.
Fundamentals of Informatics Lecture 13 Reduction Bas Luttik.
Computability NP complete problems. Space complexity. Homework: [Post proposal]. Find PSPACE- Complete problems. Work on presentations.
The Pebble Game Geri Grolinger York University. The Pebble Game Used for studying time-space trade-off Used for studying time-space trade-off One player.
Chapter 11 Introduction to Computational Complexity Copyright © 2011 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1.
NPC.
CSCI 2670 Introduction to Theory of Computing December 2, 2004.
Given this 3-SAT problem: (x1 or x2 or x3) AND (¬x1 or ¬x2 or ¬x2) AND (¬x3 or ¬x1 or x2) 1. Draw the graph that you would use if you want to solve this.
1 1. Which of these sequences correspond to Hamilton cycles in the graph? (a) (b) (c) (d) (e)
COSC 3101A - Design and Analysis of Algorithms 14 NP-Completeness.
Theory of Computational Complexity Yuji Ishikawa Avis lab. M1.
The NP class. NP-completeness Lecture2. The NP-class The NP class is a class that contains all the problems that can be decided by a Non-Deterministic.
1 Design and Analysis of Algorithms Yoram Moses Lecture 13 June 17, 2010
Theory of Computational Complexity Probability and Computing Chapter Hikaru Inada Iwama and Ito lab M1.
The NP class. NP-completeness
P & NP.
Computability and Complexity
Complexity 6-1 The Class P Complexity Andrei Bulatov.
Instructor: Shengyu Zhang
Chapter 11 Limitations of Algorithm Power
CS21 Decidability and Tractability
CS21 Decidability and Tractability
Instructor: Aaron Roth
Presentation transcript:

Peter van Emde Boas: Games and Complexity, Guangzhou 2009 THE PEBBLE GAME Games and Complexity Guangzhou 2009 Peter van Emde Boas References available at: © Games Workshop

Peter van Emde Boas: Games and Complexity, Guangzhou 2009 Stoning of st Stephen Acts VIII Doré bible

Peter van Emde Boas: Games and Complexity, Guangzhou 2009 Origin Pebble Game 7 + (1+x)(5-z) - ((1+x)/(u-t) + 2z)/v / / - * * 7 1 x 5 z ut 2z v

Peter van Emde Boas: Games and Complexity, Guangzhou 2009 Origin Pebble Game / / - * * 7 1 x 5 z ut 2z v r1 = 1 r2 = x r3 = r1 + r2 r1 = 5 r2 = z r4 = r1 - r2 r1 = 7 r2 = r3 * r4 r5 = r1 + r2.... How to evaluate this expression on a Von Neuman Computer using few registers and little time?

Peter van Emde Boas: Games and Complexity, Guangzhou 2009 Formalization node input output Storing value in register = placing a pebble on the node

Peter van Emde Boas: Games and Complexity, Guangzhou 2009 Formalization Directed Acyclic Graph Bounded Indegree Multiple Outputs & Sharing

Peter van Emde Boas: Games and Complexity, Guangzhou 2009 Rules of the Pebble Game 1: You can always pebble an input 2: You can always remove a pebble 3: You may pebble a node provided its ancestors are pebbled 4: You must pebble all outputs at least once Use as few pebbles as possible Use as few moves as possible

Peter van Emde Boas: Games and Complexity, Guangzhou 2009 Interpretation 1: You can always pebble an input 2: You can always remove a pebble 3: You may pebble a node provided its ancestors are pebbled 4: You must pebble all outputs at least once Use as few pebbles as possible Use as few moves as possible load free compute # registers time results

Peter van Emde Boas: Games and Complexity, Guangzhou 2009 Alternative Version 3: You may pebble a node provided its ancestors are pebbled Ri = Rj § Rk 3a: You may shift a pebble from an ancestor to a node provided its ancestors are pebbled Ri = Ri § Rk

Peter van Emde Boas: Games and Complexity, Guangzhou 2009 Impact Alternative Rule 3a If the DAG entirely consists of isolated nodes both versions allow a pebbling with a single pebble in real time. In all other cases rule 3a saves exactly one pebble. Proof by transformation of pebbling strategies

Peter van Emde Boas: Games and Complexity, Guangzhou 2009 Impact Alternative Rule 3a G DAG; S(G): # pebbles reqired to pebble G in standard game S’(G): # pebbles requied to pebble G using rule 3a S(G) = S’(G) = 1 iff G is a collection of isolated nodes S(G) = S’(G) + 1 otherwise

Peter van Emde Boas: Games and Complexity, Guangzhou 2009 Proofs Isolated Nodes case : trivial S’(G) ≤ S(G) : don’t use 3a S(G) ≤ S’(G) + 1 : substitute shift by a place/remove combination of moves, S’(G) ≤ S(G) - 1, for non isolated case: follow an optimal standard play and remove the peaks in pebble consumption

Peter van Emde Boas: Games and Complexity, Guangzhou 2009 Proofs Move j requires peak consumption ( S(G) pebbles) so the next move j+1 removes a pebble; what sort of move was it: a: remove a pebble: not applicable : this can’t provoke peak consumption b: pebble a node (with ancestors): put x ; remove y, x ≠ y : if y is ancestor of x play a shift; otherwise interchange move j and move j+1 : this saves a pebble without loss of time c: pebble an input: put x ; remove x (only useful if x is also an output). Shift these moves to start of play. d: pebble an internal output: put x ; remove x : replace move by a shift (saving a pebble), and remove everything and start all over but forget output x. This saves a pebble but causes loss of time.

Peter van Emde Boas: Games and Complexity, Guangzhou 2009 Consequences In the worst case the transformed strategy requires an (almost complete) replay for every output. This may square the time of the play Worst case example is easy to obtain. in the standard game this DAG requires 2 pebbles and runs in real time. With rule 3a a single pebble suffices in quadratic time.

Peter van Emde Boas: Games and Complexity, Guangzhou 2009 Cook’s Pyramid C(7) THEOREM: C(k) requires precisely k pebbles

Peter van Emde Boas: Games and Complexity, Guangzhou 2009 Cook’s Pyramid input node blocking the last free path When the last free path to an input is blocked there are k-2 disjoint side paths, each having at least one pebble on it. This blocking places the k-1-th pebble The next move is a placement of the k-th pebble C(k) k=7

Peter van Emde Boas: Games and Complexity, Guangzhou 2009 Saving the last pebble? Saving the last pebble may require recomputation which requires possibly substantial time How bad can it be? T(G,k) : time needed for pebbling DAG G in the standard game using S(G) + k pebbles T’(G,k) : time needed for pebbling DAG G in the standard game using S’(G) + k pebbles T’(G,0)  T(G,0)  T’(G,1)  T(G,1) ..... T’(G,k)  T(G,k) ... less rules but extra pebble extra rule but same number of pebbles Eventually enough pebbles available for real time pebbling

Peter van Emde Boas: Games and Complexity, Guangzhou 2009 Exponential Gap G[ k + 1 ] G[ k ] u v T[ k+1 ] H[ k+1,k+1 ]

Peter van Emde Boas: Games and Complexity, Guangzhou 2009 Requirements G[ k ] can be pebbled in real time (shifting rules) with k+1 pebbles; doing it with k pebbles requires time > k! T[ k +1] : a component requiring k+1 pebbles to reach u H[ k+1,k+1 ] : with k+2 pebbles all outputs can be pebbled in any required order in real time with k+1 pebbles any output can be pebbled, but at this move all other outputs obtain free path to v Example components: T[k+1] node with k+1 inputs; H[k+1,k+1] complete bipartite graph on k +1 + k +1 nodes. These components are not binary!

Peter van Emde Boas: Games and Complexity, Guangzhou 2009 Proof by Induction Theorem: if G[ k ] satisfies the requirements so does G[ k+1 ] With k + 2 pebbles: pebble u ; keep a pebble on the path from u to v while pebbling G[k] with k+1 pebbles in real time. Having reached v pebble the k+1 successors. Remove the pebble from v and use it on the k+1 outputs.

Peter van Emde Boas: Games and Complexity, Guangzhou 2009 Proof by Induction Theorem: if G[ k ] satisfies the requirements so does G[ k+1 ] With k + 1 pebbles: pebble u ; keep a pebble on the path from u to v while pebbling G[k] with k pebbles. This now requires time > k!. Having reached v pebble the k+1 successors, with a shift for the last one. Next use a shift to pebble an output. Now v becomes visible (and so u and its inputs) and we must start to repebble u which requires all our pebbles. Consequently we have to pebble the embedded G[k] k+1 times using k pebbles. Total time > (k+1)k! = (k+1)!

Peter van Emde Boas: Games and Complexity, Guangzhou 2009 Binary Components For T[ k ] : Take Cook’s Pyramid C(k+1) with base k (requires k pebbles in the shifting game) For H[k,k] : a pyramidal grid of height k*(k+1) Properness condition: pebbles stay “close” together. When violated free paths are created.

Peter van Emde Boas: Games and Complexity, Guangzhou 2009 A General Upper Bound Given a DAG G with n nodes and max indegree k; How many pebbles may be required in the worst case? S k (G)  n (trivial bound) without bound on the indegree this can’t be improved! THEOREM: S k (G)  Cn / log(n) where the constant C depends on k S k (G) = O( n/ log(n) ) n-1

Peter van Emde Boas: Games and Complexity, Guangzhou 2009 A General Upper Bound Equivalent Formulation: R k (m) := least number of edges in a DAG with max indegree k which requires m pebbles. THEOREM: R k (m)  D m log(m) where the constant D depends on k R k (m) =  ( m log(m) ) R’ k (m) := least number of nodes in a DAG with max indegree k which requires m pebbles. R’ k (m)  R k (m)  k R’ k (m)

Peter van Emde Boas: Games and Complexity, Guangzhou 2009 Equivalence? G n nodes max indegree k requiring m pebbles m  C n / log(n) n  1/C m * log(n) n  D m * log(m) provided log(n)  log(m) for these worst case DAGs Evidently m  n, but the Cook Pyramid already provides us with examples where m   n showing that for the worst case m, log(m)  log(n)/2 so indeed log(n)  log(m)

Peter van Emde Boas: Games and Complexity, Guangzhou 2009 Proof by induction inputs output G cheap part expensive part

Peter van Emde Boas: Games and Complexity, Guangzhou 2009 Induction inputs output G cheap part: G1 expensive part: G2 G requires m pebbles cheap part: nodes can be pebbles with  m/2 pebbles expensive part: nodes require > m/2 pebbles. three classes of edges: edges within G1 : E1 edges within G2 : E2 edges from G1 to G2 : D no edges from G2 to G1

Peter van Emde Boas: Games and Complexity, Guangzhou 2009 Induction inputs output G cheap part: G1 expensive part: G2 Some node in G1 needs at least m/2 - k pebbles, otherwise an “input” of G2 becomes “cheap” So G1 contains at least R k (m/2 - k) edges. Some node in G2 (in isolation) requires m/2 - k pebbles, otherwise the entire G can be pebbled with <m pebbles. So G2 contains at least R k (m/2 - k) edges.

Peter van Emde Boas: Games and Complexity, Guangzhou 2009 Counting cross edges in D inputs output G cheap part: G1 expensive part: G2 Two cases: A: D contains > m/4 edges B:D contains  m/4 edges In case B part G2 (in isolation) must require at least 3m/4 pebbles! A node with indegree j which requires t pebbles has an ancestor requiring at least t - j pebbles. j

Peter van Emde Boas: Games and Complexity, Guangzhou 2009 Counting Cross Edges in D expensive part Walking down from the most expensive node to its most expensive ancestor we start a path to a node requiring t pebbles with m/2-k < t  m/2. Remove the nodes along this path: this removes at least m/4 edges. So in both cases: R k (m)  R k (m/2 - k) + R k (m/2 - k) + m/4

Peter van Emde Boas: Games and Complexity, Guangzhou 2009 Solving the Recurrence H(m)  H(m/2 - k) + H(m/2 - k) + m/4 + C This solves to H(m)  U m log(m) for some U Let K(m) := H(m-2k) then K satisfies: K(m)  K(m/2) + K(m/2) + m/4 + (C-k/2), so for m > 20(k/2 - C) K(m)  K(m/2) + K(m/2) + m/5 which solves to K(m)  1/5 m log(m) ( in fact K(m) ≥ 1/5 C’ m log(m) due to initial effect )

Peter van Emde Boas: Games and Complexity, Guangzhou 2009 Just a Upper Bound ? Matching Lowerbound  (n/log(n)) for S k (G) is known ( Paul, Tarjan & Celoni ) Heavy Combinatorial and Probabilistic Graph Theory involved (or Algebraic Number Theory if you aim for explicit constructions...) –Superconcentrators –Grates –Communication Networks

Peter van Emde Boas: Games and Complexity, Guangzhou 2009 The Hopcroft Paul Valiant Theorem THEOREM: A j-tape TM in time T(n) can be simulated in space S(n) = O( T(n)/log(T(n)) ) ( T(n) > n reasonable ) Consequence: TM’s can do more in space S(n) than in time S(n) (requires standard diagonalization results) Proof steps: 1:Make computation block preserving 2:Introduce Computation Graph of head configurations 3:Establish correspondence between pebbling strategies and simulation strategies 4:Correlate Space and Pebble consumption 5:Apply Upper Bound Result from Pebbling Theory 6:Eliminate Nondeterminism

Peter van Emde Boas: Games and Complexity, Guangzhou 2009 k-tape Turing Machine Finite Control input tape work tapes

Peter van Emde Boas: Games and Complexity, Guangzhou 2009 Block Preserving Finite Control input tape work tapes Compute for k steps; only cross borders at end of block of steps

Peter van Emde Boas: Games and Complexity, Guangzhou 2009 Block Preserving w2 w5w4w3 w3 R w6 R w5 R w4 R w1 R w4 R w3 R w2 R By having three tracks on every tape information for a block of k steps is always accessible. After block of k steps the tracks must be updated. Must be done in block preserving way. Computation delayed by a constant factor.

Peter van Emde Boas: Games and Complexity, Guangzhou 2009 Head Configurations First configuration in a block of k steps Full Block Determined by A:Position input head & State Finite Control B:Positions (also within block) on Worktapes C:Contents Worktape Blocks Space required for head configuration: A:O(log(n)) B:j. log(n) C:O(j.k) But what for the next k steps ???!!!

Peter van Emde Boas: Games and Complexity, Guangzhou 2009 Configuration Graph Nodes: Head Configurations: H(0), H(1),.... Edges: Logical Dependencies ! Type 0: Time dependency : H(i) ---> H(i+1) Type a: Tape dependency : H(i) ---> H(m) (a) if the tape block on tape a visited during block m was last visited during block i Claim: This Configuration Graph is a DAG with indegree bounded by j+1

Peter van Emde Boas: Games and Complexity, Guangzhou 2009 Configuration Graph Number of nodes: T(n) / k Secret: take k dependent on T(n) : k = (T(n)) 2/3 Now the Configuration Graph can be described in space O( T(n) 1/3. log(T(n)) ) Assume for a moment that the correct Configuration Graph is Available, together with the state and head position information.

Peter van Emde Boas: Games and Complexity, Guangzhou 2009 Computing and Pebbling Block H(m) can be simulated provided the Head Configurations of its Direct Ancestors in the Configuration Graph are known. Missing Information: the Tape Block Contents ! Solution: Write them down in Memory; [ Costs O(k) space per configuration ] and call it a pebble. Number of Pebbles Required: O( T(n) 1/3 / log(T(n) ) Space needed for a pebble: O(k) = O(T(n) 2/3 ) Total Space Needed: O( T(n) / log(T(n)) )

Peter van Emde Boas: Games and Complexity, Guangzhou 2009 The Wrong Theorem THEOREM: DTIME(T(n))  NSPACE( T(n) / log(T(n)) ) Proof: a:Guess states and head positions of the T(n) 1/3 head configurations; based on this information build the Configuration Graph b:Play a pebble strategy with O(T(n) 1/3 / log(t(n)) ) pebbles, using nondeterminism for guessing the right next move. c:When the last configuration is pebbled read off the answer d:Abort on time-overflow (repeating moves is futile)

Peter van Emde Boas: Games and Complexity, Guangzhou 2009 Making this Simulation Deterministic Step a: Replace “Guess and Verify” by “Try out all possibilities” This is possible, since we are economizing on space rather than time  Step b: Trying out all possibilities is not possible; they take too long and there are too many of them...

Peter van Emde Boas: Games and Complexity, Guangzhou 2009 Consulting the NPSPACE Oracle what is the right next move ? I can’t answer that question is move z the right next move ? YES / NO

Peter van Emde Boas: Games and Complexity, Guangzhou 2009 Asking the Right Question GIVEN: the DAG G, with a given collection of pebbles on it, and the number of the move t QUESTION: is z the correct next move in some pebbling strategy using no more than m’ pebbles and succeeding within 2 m - t moves. This problem is solvable in NSPACE( m.log(m) ) SAVITCH: This problem is solvable in DSPACE( m 2.log(m) 2 ) Since in our situation m = O(T(n) 1/3 ) this space consumption is acceptable.

Peter van Emde Boas: Games and Complexity, Guangzhou 2009 A Reasonable Simulation? Re-pebbling a node amounts to re-computing a block of steps: time overhead! Retrieving the correct next move in the pebble game requires a Savitch-based simulation for every move. Trying out all possibilities for the configuration graph amounts to performing this awesome simulation an exponential number of times. WHHAAARGHHH !

Peter van Emde Boas: Games and Complexity, Guangzhou 2009 Gilbert Lengauer & Tarjan THEOREM: Deciding whether a given DAG can be pebbled with a given number of pebbles is PSPACE-Complete. Proof: Reduction from QBF Requires: Intricate Construction Good Control over Conceivable pebbling Strategies

Peter van Emde Boas: Games and Complexity, Guangzhou 2009 Reference Frame Single output DAG’s only Pebbling Game with Shifting Rule Elimination of inessential moves Normalization of Strategies Non-standard Encoding of Propositional Valuations

Peter van Emde Boas: Games and Complexity, Guangzhou 2009 Essential Moves The first pebbling of the output node is essential The last pebbling of a internal node preceeding an essential pebbling of one of its successors is essential That’s all folks. Lemma: inessential pebblings can be eliminated. (G. L. & T. call these moves necessary)

Peter van Emde Boas: Games and Complexity, Guangzhou 2009 Essential Moves Let the placement on node x at time t1 be inessential. This pebble is removed at time t2. Claim: During the interval [t1,t2] all placements on direct successors of x are inessential. So during the interval [t1,t2] all placements on all connected successors of x are inessential. In particular, the first pebbling of the output is outside interval [t1,t2] (or unconnected). A move placing a pebble on an internal node y which is not followed by a placement on some successor can be removed. Such a move must occur after t1 ! Eliminate it and use same argument again. Eventually all placements on connected successors of x are eliminated. Next remove the placement on x. QED.

Peter van Emde Boas: Games and Complexity, Guangzhou 2009 Essential Moves A pebbling strategy without inessential moves is called Frugal. For Frugal strategies: After the first pebbling of some internal node some path connecting it to the output is pebbled. After the last pebbling of some internal node all paths connecting it to the output are pebbled.

Peter van Emde Boas: Games and Complexity, Guangzhou 2009 Normal Strategies C(7) 6 = The DAG’s used in the reduction contain several embedded Pyramids with the purpose to force some order on the pebbling of the embedded components. In a Normal Strategy these Pyramids are pebbled in consecutive sequences of moves, leaving at most a pebble on the Apex. (7 --> 6 due to shifts) Apex

Peter van Emde Boas: Games and Complexity, Guangzhou 2009 Normal Strategies k g Assume Frugal Strategy. First placement on P(k) at t 0 Last Removal from P(k) at t 1 Maximal pebble consumption on P(k) at t 2 (k pebbles); where t 2  [t o,t 1 ] Reschedule all moves on P(k) to a block of steps at time t 2 This is possible since P(k) has no ancestors of its inputs....

Peter van Emde Boas: Games and Complexity, Guangzhou 2009 The Construction

Peter van Emde Boas: Games and Complexity, Guangzhou 2009 The Construction input output 5 quantifiers 4 clauses with 3 literals each 18 pebbles 18 = 5*3 + 3 Pyramids are pebbled from top to bottom. Yet it must remain possible to pebble the path along the clauses....

Peter van Emde Boas: Games and Complexity, Guangzhou 2009 The Construction quantifier blocks variable setters clause blocks

Peter van Emde Boas: Games and Complexity, Guangzhou 2009 The Components xx x’ xx xx xx variable xtrue setting false setting double false setting A formula can be made true by the illogical double false setting if its clauses are made true by other literals....

Peter van Emde Boas: Games and Complexity, Guangzhou 2009 The Components clause C[ j ] = ( l1  l2  l3 ) l1’ l2’l3’ l1 l2l3 p j-1 pjpj If current setting makes clause true 3 pebbles suffice. If current setting fails to make clause true 4 pebbles are needed or some other pebble must move

Peter van Emde Boas: Games and Complexity, Guangzhou 2009 The Components k k-1 k-2 x x x’ qiqi aiai bibi cici q i+1 didi fifi gigi i+1-th quantifier variable: x Universal k = 3(m-i) + 3 when pebbled k pebbles available

Peter van Emde Boas: Games and Complexity, Guangzhou 2009 The Components k k-1 k-2 x x x’ qiqi aiai bibi cici q i+1 didi i+1-th quantifier variable: x Existential k = 3(m-i) + 3 when pebbled k pebbles available fifi

Peter van Emde Boas: Games and Complexity, Guangzhou 2009 Overall Idea The embedded pyramids enforce that the quantifier blocks are pebbled in order, leaving a variable assignment. (Proper configurations in the block) For the i+1-th quantifier 3(m-i) + 3 pebbles are available. In a proper configuration exactly 3 are inside the block. The clauses part can be traversed (pebbled) when the formula evaluates to true for the assignment. For the existential quantifier a value can be chosen; for the universal quantifier the entire block must be treated twice, unless the double false assignment already makes the formula true. Nesting of universals causes exponential time!

Peter van Emde Boas: Games and Complexity, Guangzhou 2009 Variable Settings k k-1 k-2 x x x’ qiqi aiai bibi cici q i+1 didi fifi gigi k k-1 k-2 x x x’ qiqi aiai bibi cici q i+1 didi fifi gigi k k-1 k-2 x x x’ qiqi aiai bibi cici q i+1 didi fifi gigi true setting false setting doubly false setting The proper settings in the i+1-th quantifier block. Universal quantifier Called N i in paper

Peter van Emde Boas: Games and Complexity, Guangzhou 2009 Variable Settings k k-1 k-2 x x x’ qiqi aiai bibi cici q i+1 didi fifi k k-1 k-2 x x x’ qiqi aiai bibi cici q i+1 didi fifi k k-1 k-2 x x x’ qiqi aiai bibi cici q i+1 didi fifi true setting false setting doubly false setting The proper settings in the i+1-th quantifier block. Existential quantifier Called N i in paper

Peter van Emde Boas: Games and Complexity, Guangzhou 2009 Induction Hypothesis: H(i) Given formula: Qx 1 Qx Qx m [ F(x 1,x 2,..., x m ) ] Partial truth assignment for x 1,x 2,..., x i, say w NB! requires good understanding for what it means to assign doubly false! Think of substituting true/false and removing the doubly false variables (and reduce to a proper logical form afterwards) Equivalent are: Resulting QBF formula is true Given the initial proper configuration for this w with 3i pebbles on the i quantifier blocks, node q i can be pebbled using 3(m-i) + 3 further pebbles leaving the 3i given pebbles fixed.

Peter van Emde Boas: Games and Complexity, Guangzhou 2009 Order of Proof H(m): All variables are assigned a truth value (or doubly false). The resulting formula evaluates either to true or false. The DAG can be traversed up to q m iff the formula evaluates to true, and we have just 3 pebbles available.... H(0): No variable assigned yet and the DAG is completely empty. We have 3m + 3 pebbles. This is what we need for proving the Theorem... Proof order: H(m) => H(m-1) =>.... => H(0)

Peter van Emde Boas: Games and Complexity, Guangzhou 2009 H(m): Base of Induction Forward: If the fully assigned formula is true every clause block has at least one node in its base pebbled, so 3 more pebbles suffice. Backward: If the fully assigned formula is false some clause block has an empty base so at least 4 pebbles are required. Note that other pebbles can’t be moved....

Peter van Emde Boas: Games and Complexity, Guangzhou 2009 H(i+1) => H(i), Induction Step In all cases there are 3(m-i) + 3 pebbles available, 3 of which can remain on the i-th quantifier block. Note that 3(m-i) + 3 is also the order of the largest pyramid connected to this block. When proper configuration is reached invoke induction hypothesis. Cases of Universal and Existential quantifier are treated separately.

Peter van Emde Boas: Games and Complexity, Guangzhou 2009 Forward Universal k k-1 k-2 x x x’ qiqi aiai bibi cici q i+1 didi fifi gigi x’ ; d i ; x’; (k, leave 3) x’ => x ; q i+1 (IH) ;(k-3) q i+1 => c i => b i => a i ; x’ => x ; remove x ; x’;(k-2) q i+1 (IH) ;(k-3) x’ => g i => f i => q i ; If the doubly false assignment makes the formula true pebbles can remain on x’ and x’. The at least 2 free pebbles can be used to traverse the block pebbling q i+1 just once.

Peter van Emde Boas: Games and Complexity, Guangzhou 2009 Forward Existential k k-1 k-2 x x x’ qiqi aiai bibi cici q i+1 didi fifi x’ ; d i ; f i ; f i => x’; (k, leave 3) if x = true then x’ => x ; q i+1 (IH) ;(k-3) x ;(1) q i+1 => c i => b i => a i => q i ; else { x = false } x’ => x ; q i+1 (IH) ;(k-3) q i+1 => c i => b i ; remove x ; f i => x’; (k-2) b i => a i => q i fi

Peter van Emde Boas: Games and Complexity, Guangzhou 2009 Backward Universal k k-1 k-2 x x x’ qiqi aiai bibi cici q i+1 didi fifi gigi Since only k pebbles are available we must start with x’ ; d i ; x’; Before q i+1 is pebbled the only possible actions to proceed are x’ => x, x’ => x or no move at all, always leaving a proper configuration. By IH the involved partial assignment makes the formula true. From q i+1 either a i or f i can be reached but not both; which one depends on the value assigned to x Unless x is assigned doubly false q i+1 must be pebbled again.

Peter van Emde Boas: Games and Complexity, Guangzhou 2009 Backward Existential k k-1 k-2 x x x’ qiqi aiai bibi cici q i+1 didi fifi Since only k pebbles are available we must start with x’ ; d i ; f i ; f i => x’ must precede the removal from x’. Before q i+1 is pebbled the only possible actions to proceed are x’ => x, x’ => x or no move at all, always leaving a proper configuration. Move x’ => x’ is a looser! By IH the involved partial assignment makes the formula true. Once q i+1 is pebbled it is simple to reach q i with the remaining two free pebbles.

Peter van Emde Boas: Games and Complexity, Guangzhou 2009 Final Remarks One extra pebble eliminates the need for repebbling the Universal Quantifier blocks, yielding an exponential speed-up. This gives an independent proof for the exponential slowdown by saving the last pebble (with in fact a graph of order n 3 in stead of n 4 ). A modification shows that also the question whether a DAG can be pebbled with k pebbles within a restricted amount of time is hard for PSPACE. Note that this problem is in NP if the time allowance is polynomial. (Sethi has proven NP-hardness in this case.)