# 16 - PSPACE Design and Analysis of Algorithms Andrei...

This preview shows pages 1–11. Sign up to view the full content.

PSPACE Design and Analysis of Algorithms Andrei Bulatov

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Algorithms – PSPACE 16-2 Games Geography . Amy names capital city c of country she is in. Bob names a capital city c' that starts with the letter on which c ends. Amy and Bob repeat this game until one player is unable to continue. Does Alice have a forced win? Example Budapest Tokyo Ottawa Ankara Amsterdam Moscow Washington Nairobi Is Geography in NP?
Algorithms – PSPACE 16-3 More Games 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? Strategies: Is my opponent going left or right?

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Algorithms – PSPACE 16-4 PSPACE P. Decision problems solvable in polynomial time. PSPACE. Decision problems solvable in polynomial space. Observation. P PSPACE. poly-time algorithm can consume only polynomial space
Algorithms – PSPACE 16-5 3-SAT in PSPACE Proof Binary counter: Count from 0 to in binary. Theorem 3-SAT PSPACE 1 2 - n Algorithm: Use n bit odometer. To solve 3-SAT: Enumerate all possible truth assignments using counter. Check each assignment to see if it satisfies all clauses QED n 2

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Algorithms – PSPACE 16-6 NP in PSPACE Proof Consider arbitrary problem X in NP. Theorem NP PSPACE Since X 3-SAT, there exists algorithm that solves X in poly-time plus polynomial number of calls to 3-SAT black box. Can implement black box in poly-space QED
Algorithms – PSPACE 16-7 Quantified Satisfiability QSAT Instance A Boolean CNF formula Φ (x 1 , …, x n ) Objective Is the following propositional formula true? 5 x 1 2200 x 2 5 x 3 2200 x 4 2200 x n-1 5 x n Φ (x 1 , …, x n ) Intuition: Amy picks truth value for x 1 , then Bob for x 2 , then Amy for x 3 , and so on. Can Amy satisfy Φ no matter what Bob does? assume n is odd

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Algorithms – PSPACE 16-8 Quantified Satisfiability Example : Yes. Amy sets x 1 true; Bob sets x 2 ; Amy sets x 3 to be same as x 2 . Example : ( x 1 x 2 ) ( x 2 x 3 ) ( x 1 x 2 x 3 ) No. If Amy sets x 1 false; Bob sets x 2 false; Amy loses; No. if Amy sets x 1 true; Bob sets x 2 true; Amy loses. ( x 1 x 2 ) ( x 2 x 3 ) ( x 1 x 2 x 3 )
Algorithms – PSPACE 16-9 QSAT in PSPACE Theorem QSAT PSPACE 5 x 1 = 0 x 1 = 1 return true iff both subproblems are true 2200 5 5 x 2 = 0 x 3 = 0 x 2 = 1 x 3 = 1 2200 5 5 Φ (0, 0, 0) Φ (0, 0, 1 ) Φ (0, 1, 0 ) Φ (0, 1, 1) Φ (1, 0, 0) Φ (1, 0, 1) Φ (1, 1, 0) Φ (1, 1, 1) return true iff either subproblem is true

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Algorithms – PSPACE 16-10 QSAT in PSPACE Proof Recursively try all possibilities.
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern