Chapter 0: Q38P (page 1)
Show that if , a polynomial time algorithm exists that produces a satisfying assignment when given a satisfiable Boolean formula. (Note: The algorithm you are asked to provide computes a function; but contains languages, not functions. The assumption implies that is in , so testing satisfiability is solvable in polynomial time. But the assumption doesn’t say how this test is done, and the test may not reveal satisfying assignments. You must show that you can find them anyway. Hint: Use the satisfiability tester repeatedly to find the assignment bit-by-bit.)
Short Answer
Choose if is satisfiable; otherwise, choose if is satisfiable. In a satisfied assignment, this gives the value of . Make the replacement permanent, and in the same way, find a value for in a satisfying assignment. Continue unitl all the variables are substituted.