Seminar on Theoretical Computer Science and Discrete Mathematics Aristotle University of Thessaloniki
Context 1 Section 1: PSPACE 2 3 4
Time Complexity Time complexity of DTM M: - Increasing function t: N Ð N such that for every input string x, Sx S = n, M(x) ends in B t(n) steps.
Time Complexity Time complexity of DTM M: - Increasing function t: N Ð N such that for every input string x, Sx S = n, M(x) ends in B t(n) steps. DTIME[t(n)] P: P is solved in O(t(n)) time
Complexity Class P Complexity Class P Complexity Class P is the set of decision problems that can be solved by a DTM in a polynomial time of steps. (there is a polynomial time algorithm)
Complexity Class P Complexity Class P Complexity Class P is the set of decision problems that can be solved by a DTM in a polynomial time of steps. (there is a polynomial time algorithm) Polynomial time: P kc0 DTIME n k
Time Complexity Space complexity of (multitape) DTM M: - Increasing function s: N Ð N such that for every input string x, Sx S = n, M(x) ends in B s(n) space.
Time Complexity Space complexity of (multitape) DTM M: - Increasing function s: N Ð N such that for every input string x, Sx S = n, M(x) ends in B s(n) space. DSPACE[s(n)] P: P is solved in O(s(n)) space
Complexity Class PSPACE Complexity Class PSPACE Complexity Class PSPACE is the set of decision problems that can be solved by a (multitape) DTM in a polynomial number of SPACEs on the tape.
Complexity Class PSPACE Complexity Class PSPACE Complexity Class PSPACE is the set of decision problems that can be solved by a (multitape) DTM in a polynomial number of SPACEs on the tape. Polynomial time: PSPACE kc0 DSPACE n k
Complexity Class PSPACE Complexity Class PSPACE Complexity Class PSPACE is the set of decision problems that can be solved by a (multitape) DTM in a polynomial number of SPACEs on the tape. Polynomial time: PSPACE kc0 DSPACE n k P b PSPACE
PSPACE 3-SAT: Given a set of clauses C 1,...,C k, each of length 3, over a set of variables X = x 1,...,x n, does there exist a satisfying truth assignment?
PSPACE 3-SAT: Given a set of clauses C 1,...,C k, each of length 3, over a set of variables X = x 1,...,x n, does there exist a satisfying truth assignment? 3-SAT > N P
PSPACE 3-SAT: Given a set of clauses C 1,...,C k, each of length 3, over a set of variables X = x 1,...,x n, does there exist a satisfying truth assignment? 3-SAT > N P 3-SAT > PSPACE
PSPACE 3-SAT: Given a set of clauses C 1,...,C k, each of length 3, over a set of variables X = x 1,...,x n, does there exist a satisfying truth assignment? 3-SAT > N P 3-SAT > PSPACE Proof (Idea): - Enumerate all 2 n possible truth assignments using counter. - Check each assignment to see if it satisfies all clauses.
Quantified satisfiability 3-SAT: Let ϕ(x 1,x 2,...,x n ) be a boolean 3-CNF formula. Is the following propositional formula true? x 1 x 2 x 3... x n ϕ(x 1,x 2,...,x n )
Quantified satisfiability 3-SAT: Let ϕ(x 1,x 2,...,x n ) be a boolean 3-CNF formula. Is the following propositional formula true? x 1 x 2 x 3... x n ϕ(x 1,x 2,...,x n ) QSAT(Quantified 3-SAT): Let ϕ(x 1,x 2,...,x n ) be a boolean 3-CNF formula. (assume n is odd) Is the following propositional formula true? x 1 x 2 x 3... x n ϕ(x 1,x 2,...,x n )
Quantified satisfiability QSAT(Quantified 3-SAT): Let ϕ(x 1,x 2,...,x n ) be a boolean 3-CNF formula. (assume n is odd) Is the following propositional formula true? x 1 x 2 x 3... x n ϕ(x 1,x 2,...,x n )
Quantified satisfiability QSAT(Quantified 3-SAT): Let ϕ(x 1,x 2,...,x n ) be a boolean 3-CNF formula. (assume n is odd) Is the following propositional formula true? x 1 x 2 x 3... x n ϕ(x 1,x 2,...,x n ) Intuition: Alice picks truth value for x 1, then Bob for x 2, then Alice for x 3 and so on. Can Alice satisfy ϕ no matter what Bob does?
Quantified satisfiability Example: ϕ(x 1,x 2,x 3 ) = (x 1 - x 2 - x 3 ), (x 1 - x 2 - x 3 ), ( x 1 - x 2 - x 3 ), ( x 1 - x 2 - x 3 ) x 1 x 2 x 3 ϕ(x 1,x 2,x 3 )
Quantified satisfiability Example: ϕ(x 1,x 2,x 3 ) = (x 1 - x 2 - x 3 ), (x 1 - x 2 - x 3 ), ( x 1 - x 2 - x 3 ), ( x 1 - x 2 - x 3 ) x 1 x 2 x 3 ϕ(x 1,x 2,x 3 ) YES (x 1 = 1)
Quantified satisfiability Example: ϕ(x 1,x 2,x 3 ) = (x 1 - x 2 - x 3 ), (x 1 - x 2 - x 3 ), ( x 1 - x 2 - x 3 ), ( x 1 - x 2 - x 3 ) x 1 x 2 x 3 ϕ(x 1,x 2,x 3 ) YES (x 1 = 1) Theorem QSAT > PSPACE
QSAT > PSPACE Idea: Divide and Conquer algorithm and something more! Proof:
QSAT > PSPACE Idea: Divide and Conquer algorithm and something more! Proof: Recursively try all possibilities. - Only need one bit of information from each subproblem. - Amount of space is proportional to depth of function call stack.
PSPACE - complete Complexity Class PSPACE - complete X > PSPACE - complete if: (i) X > PSPACE and (ii) Y > PSPACE, Y BP X.
Section 1: PSPACE PSPACE - complete Theorem Stockmeyer - Meyer (1973) QSAT > PSPACE - complete
Theorem Savitch Theorem Savitch (1970) If a NTM can solve a problem using f(n) space, an ordinary DTM can solve the same problem in the square of that space bound. For any function f > Ω(log(n)), NSPACE(f(n)) b DSPACE(ˆf ˆn 2 ).
PSPACE Theorem PSPACE = NPSPACE
PSPACE Theorem PSPACE = NPSPACE P b N P b PSPACE b EXPTIME
PSPACE Theorem PSPACE = NPSPACE P b N P b PSPACE b EXPTIME _ \_( )")_/ _ Open Problems: P c??? N P c??? PSPACE c??? EXPTIME
Generalized geography Geography: a children s game
Generalized geography Geography: Alice names capital city c of country she is in. Bob names a capital city c that starts with the letter on which c ends. Alice and Bob repeat this game until one player is unable to continue.
Generalized geography Geography: Alice names capital city c of country she is in. Bob names a capital city c that starts with the letter on which c ends. Alice and Bob repeat this game until one player is unable to continue. Does Alice have a forced win?
Generalized geography Geography on graphs: Given a directed graph G = (V, E) and a start node s, two players alternate turns by following, if possible, an edge out of the current node to an unvisited node.
Generalized geography Geography on graphs: Given a directed graph G = (V, E) and a start node s, two players alternate turns by following, if possible, an edge out of the current node to an unvisited node. Can first player guarantee to make the last legal move?
Generalized geography Players: A and B. A plays first.
Generalized geography Players: A and B. A plays first. GG = @G, sa S A has a winning strategy for the generalized geography game played on graph G starting at node s
Generalized geography Players: A and B. A plays first. GG = @G, sa S A has a winning strategy for the generalized geography game played on graph G starting at node s GG > PSPACE
Generalized geography Players: A and B. A plays first. GG = @G, sa S A has a winning strategy for the generalized geography game played on graph G starting at node s GG > PSPACE Proof (Idea):
Generalized geography Players: A and B. A plays first. GG = @G, sa S A has a winning strategy for the generalized geography game played on graph G starting at node s GG > PSPACE Proof (Idea): - polynomial space recursive algorithm win(g,s): determines if player A wins the game starting from s.
Generalized geography - If (s,v) in G, then return NO.
Generalized geography - If (s,v) in G, then return NO. - Else (s,v) edge in G, call win recursively in (G - s, v) and if some of them answers NO, then return YES else NO.
Generalized geography - If (s,v) in G, then return NO. - Else (s,v) edge in G, call win recursively in (G - s, v) and if some of them answers NO, then return YES else NO. Depth recursive: # rounds = n = # nodes of G
Generalized geography - If (s,v) in G, then return NO. - Else (s,v) edge in G, call win recursively in (G - s, v) and if some of them answers NO, then return YES else NO. Depth recursive: # rounds = n = # nodes of G Recursive stack: sequence of nodes that removed from the graph
Generalized geography GG > PSPACE - complete Proof (Idea):
Generalized geography GG > PSPACE - complete Proof (Idea): - QSAT BP GG
Generalized geography GG > PSPACE - complete Proof (Idea): - QSAT BP GG Input: Φ = x 1 x 2 x 3... x k ϕ(x 1,x 2,...,x k ), where ϕ = C 1,C 2,...,C m
Generalized geography GG > PSPACE - complete Proof (Idea): - QSAT BP GG Input: Φ = x 1 x 2 x 3... x k ϕ(x 1,x 2,...,x k ), where -Player A ( ) -Player B ( ) ϕ = C 1,C 2,...,C m
Generalized geography -We construct graph G with initial node s such that A wins the game starting from s iff Φ is true.
Generalized geography -We construct graph G with initial node s such that A wins the game starting from s iff Φ is true. -The graph has:
Generalized geography -We construct graph G with initial node s such that A wins the game starting from s iff Φ is true. -The graph has: a piece that corresponds to the quantified variables (players choose values)
Generalized geography -We construct graph G with initial node s such that A wins the game starting from s iff Φ is true. -The graph has: a piece that corresponds to the quantified variables (players choose values) a piece that corresponds to the clauses (control of quantified variables)
Generalized geography Each diamond structure corresponds to a quantified variable. Players take turns deciding paths at each branching node. If exists an unsatisfying clause, then B will choose an unsatisfying clause to win.
Generalized geography Example: Φ = x 1 x 2 x 3 ϕ(x 1,x 2,x 3 ) ϕ(x 1,x 2,x 3 ) = (x 1 - x 2 - x 1 ), (x 2 - x 2 - x 3 ), ( x 1 - x 2 - x 3 )
Generalized geography Example: Φ = x 1 x 2 x 3 ϕ(x 1,x 2,x 3 ) ϕ(x 1,x 2,x 3 ) = (x 1 - x 2 - x 1 ), (x 2 - x 2 - x 3 ), ( x 1 - x 2 - x 3 )
Other PSPACE - complete problems Í Tic-tac-toe (or noughts and crosses or Xs and Os)
Other PSPACE - complete problems Í 3D tic-tac-toe (or Qubic)
Other PSPACE - complete problems Í Hex
Other PSPACE - complete problems Í Five in a Row (or Gobang)
References J.Kleinberg, E.Tardos. Algorithm Design. Boston, Mass.: Pearson/Addison-Wesley, cop. 2006 J. E. Hopcroft and J. D. Ullman. Introduction to Automata Theory, Languages, and Computation. Boston: Addison-Wesley, c2001. C. H. Papadimitriou. Computational Complexity. Reading, Mass.: Addison-Wesley, 1994. M.R. Garey, D.S. Johnson: Computers and Intractability, W.H. Freeman & Co, 1979
Thank you!!!