Question: Recall the Go problem from the last problem set, which we showed was NP-complete: given an n x m Go board, some of whose spaces
Recall the Go problem from the last problem set, which we showed was NP-complete: given an n x m Go board, some of whose spaces contain black or white stones, decide whether you can remove stones from each column (where all stones of either black or white are removed) so at least one stone remains in each row. Now suppose you have a magical black-box subroutine D(B) which takes as input an initial board configuration B and outputs YES if there is a solution and NO otherwise, i.e., L(D) = { | B is a board configuration with a valid solution}. Show how to design a function S(B) which outputs an actual strategy (a description of which color stones to remove for each column to yield a valid solution), or NO if none exists. S should run in polynomial time, assuming calls to D cost one unit of time.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
