Chapter 8: Q18P (page 359)
Let B be the language of properly nested parentheses and brackets. For example,is in B but is not. Show that B is in L.
Short Answer
Every pair of matching parentheses or the brackets must be of the same kind.
Chapter 8: Q18P (page 359)
Let B be the language of properly nested parentheses and brackets. For example,is in B but is not. Show that B is in L.
Every pair of matching parentheses or the brackets must be of the same kind.
All the tools & learning materials you need for study success - in one app.
Get started for freeShow that is NL-complete.
Show that any PSPACE-hard language is also NP-hard
Consider the following two-person version of the language that was described in Problem 7.28. Each player starts with an ordered stack of puzzle cards. The players take turns placing the cards in order in the box and may choose which side faces up. Player I wins if all hole positions are blocked in the final stack, and Player II wins if some hole position remains unblocked. To prove that the problem of determining which player has a winning strategy for a given starting configuration of the cards is PSPACE-Complete.
The game of Nim is played with a collection of piles of sticks. In one move, aplayer may remove any nonzero number of sticks from a single pile. The players alternately take turns making moves. The player who removes the very last stick loses. Say that we have a game position in Nim with k piles containing s1,.....,sksticks. Call the position balanced if each column of bits contains an even number of 1s when each of the numbers s , is written in binary, and the binary numbers are written as rows of a matrix aligned at the low order bits. Prove the following two facts.
Let each siis a binary number and Player I has a winningstrategy in the Nim game starting at this position}. Use the preceding facts about balanced positions to show that is missing.
Show that PSPACE is closed under the operations union, complementation, and star.
What do you think about this solution?
We value your feedback to improve our textbook solutions.