How would you prove PSPACE is closed under complement? So far, my thought process is that we can create an algorithm to show that P is closed under complement. I'm struggling with how I can connect that to PSPACE...
Asked
Active
Viewed 3,235 times
-2
-
1Can you pick one result you want to know about? We discourage asking multiple questions in a single post; usually it is better to post each one separately. Also, what have you tried? What approaches have you already considered for proving it? Where are you stuck? – D.W. Mar 07 '19 at 05:26
-
Please see the updated description. – Roger Bresnan Mar 07 '19 at 07:06
-
3If you can show that P is closed under complement, exactly the same proof shows that any deterministic class is closed under complement. If you can't see how to do that, it suggests that your closure proof for P is more complicated than it needs to be. It's basically one sentence. – David Richerby Mar 07 '19 at 11:24
-
I've rolled this back; please don't wipe the content out of a question after it's been answered. There's no real benefit to it, and it means it can't help anyone who searches for it in the future. – Draconis Mar 08 '19 at 03:00
1 Answers
2
Let $P$ be an arbitrary language in PSPACE
. In other words, there exists a Turing machine $T$ that decides (using polynomial space) whether an arbitrary input $x$ is in $P$.
Now we can write an algorithm to decide whether $x$ is in $\neg P$:
- Run $T$ on $x$
- If $T$ accepts, reject
- If $T$ rejects, accept
This takes however much space $T$ takes, plus a constant. A polynomial plus a constant is still a polynomial. Therefore, $\neg P$ is in PSPACE
.

Draconis
- 7,098
- 1
- 17
- 27
-
That constant really ought to be zero! All you need to do is swap the accepting and rejecting states in the original TM... – David Richerby Mar 07 '19 at 21:18
-
@DavidRicherby True, but adding the overhead of "look at the result and return true or false" (requiring one bit of space) seemed easier to explain than "swap which states accept and reject". – Draconis Mar 07 '19 at 21:33