------------------------------------------------ COMP SCI 731 - Lecture 3 - Tuesday, Nov 6, 2000 ------------------------------------------------ Today: o decision vs. search: o The language framework Decision vs. Search ------------------- Describe 3SAT and CLIQUE *optimization* problems. Explain why they are at least as hard as the corresponding decision problems. Now prove that the CLIQUE decision problem is at least as hard as the CLIQUE optimization problem: int max-clique(G) // G=(V,E) where |V|=n begin for i= n downto 1 do if CLIQUE(G,i) then return i end find-biggest-clique (G) begin k = max-clique(G) for i = 1 to n do if CLIQUE(G \ {i},k) then G = G \ {k} return V(G) end How many calls to CLIQUE does the above use? n + lg(n). You can reduce to n (or to n - c lg n) by stopping when the graph becomes small and looking for the biggest clique by the "naive" algorithm. Now, for homework, do the same thing for 3SAT. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Problem 1. Suppose I give you black box that solves the 3SAT decision problem. Given an algorithm (that uses this black box) to find a satisfying formula to an input formula phi. How many calls to the black box do you need? +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ The language framework --------------------- A language is a set of strings. Decision problems and languages are in one-to-one correspondence: Talk about decision verses search. Decision problem Pi: Given a string x, is x a Yes-instance of Pi ? Language L_Pi {x: x is a Yes-instance of Pi} People often speak in terms of this language framework. You should be comfortable with it.