Test Instance Generation Test Instance Generation for MAX 2SAT for MAX 2SAT Mitsuo Motoki Mitsuo Motoki Japan Advanced Inst. of Sci Sci. . Japan Advanced Inst. of and Tech. (JAIST) and Tech. (JAIST)
Test Instance Generation Test Instance Generation problem problem
Empirical study of solvers for Empirical study of solvers for combinatorial opt. problem combinatorial opt. problem Test Instance Test Instance Test Instance Solver Optimal Solution Solver Solver Optimal Solution Optimal Solution Compare Compare Compare Output Solution Output Solution Output Solution 2005/11/15 2005/11/15 FJCP 2005 FJCP 2005 3 3
Empirical study of solvers for Empirical study of solvers for combinatorial opt. problem combinatorial opt. problem Benchmark sets / Benchmark sets / Benchmark sets / Test Instance Test Instance Test Instance Test Instance Generator Test Instance Generator Test Instance Generator Solver Optimal Solution Solver Solver Optimal Solution Optimal Solution Compare Compare Compare Output Solution Output Solution Output Solution 2005/11/15 2005/11/15 FJCP 2005 FJCP 2005 4 4
Test instance generator Test instance generator Parameters Parameters Test Instance Test Instance Test Instance Test Instance Test Instance about instance about instance Generator Generator Generator (Random bits) Opt. Solution (Random bits) Opt. Solution � Ideally Ideally… … � � Generate Generate all all instances with the opt. solution instances with the opt. solution � � Running time is Running time is polynomial polynomial in the length of in the length of � output instance. . output instance 2005/11/15 2005/11/15 FJCP 2005 FJCP 2005 5 5
for NP hard optimization problem for NP hard optimization problem � Unless NP=co Unless NP=co- -NP NP, there is , there is (I, k) (I, k) � no ideal instance generator. no ideal instance generator. � Why? Why? ? ? � � Consider the decision Consider the decision � version (NP hard) version (NP hard) Yes No Yes No 2005/11/15 2005/11/15 FJCP 2005 FJCP 2005 6 6
for NP hard optimization problem for NP hard optimization problem � Unless NP=co Unless NP=co- -NP NP, there is , there is (I, k) � (I, k) no ideal instance generator. no ideal instance generator. � Why? Why? � � Consider the decision Consider the decision (I, Opt) (I, Opt) � version (NP hard) version (NP hard) Yes No Yes No � The The random bits random bits used in the used in the � instance generator become a instance generator become a witness for each “ “yes yes” ” witness for each instance, instance, parameters Instance parameters Instance � and also for each and also for each “ “no no” ” � random bits random bits Generator Generator instances. instances. 2005/11/15 2005/11/15 FJCP 2005 FJCP 2005 7 7
What can we do? What can we do? � Relax some requirements for instance Relax some requirements for instance � generator generator � Can generate instances from Can generate instances from some some subset subset � of whole instance set of whole instance set � Outputs a Outputs a feasible solution feasible solution instead of the instead of the � optimal solution optimal solution (Outputs optimal solution with high prob.) (Outputs optimal solution with high prob.) � Running time is Running time is “ “exponential exponential” ” instead of instead of � “polynomial polynomial” ” “ 2005/11/15 2005/11/15 FJCP 2005 FJCP 2005 8 8
What can we do? What can we do? � Relax some requirements for instance Relax some requirements for instance � generator generator � Can generate instances from Can generate instances from some some subset subset � of whole instance set of whole instance set � Outputs a feasible solution instead of the Outputs a feasible solution instead of the � optimal solution optimal solution (Outputs optimal solution with high prob.) (Outputs optimal solution with high prob.) � Running time is Running time is “ “exponential exponential” ” instead of instead of � “polynomial polynomial” ” “ 2005/11/15 2005/11/15 FJCP 2005 FJCP 2005 9 9
Our approach Our approach � Poly. time exact instance generator Poly. time exact instance generator � � The set of instance generated is a The set of instance generated is a subset subset � of the whole instance set of the whole instance set � The generator The generator always always outputs a test outputs a test � instance with the optimal optimal solution solution instance with the � The running time is The running time is polynomial polynomial in the length in the length � of the output instance of the output instance 2005/11/15 2005/11/15 FJCP 2005 FJCP 2005 10 10
New requirements New requirements � The instances generated should be . The instances generated should be hard hard. � � How to guarantee the hardness? How to guarantee the hardness? � � Theoretical way Theoretical way � � For any poly. time exact instance generator, the For any poly. time exact instance generator, the � decision problem over the set of instance decision problem over the set of instance generated is NP NP ∩ ∩ co co- -NP NP (no more NP complete) (no more NP complete) generated is � How hard to distinguish the instances generated? How hard to distinguish the instances generated? � � (Empirical study) (Empirical study) � 2005/11/15 2005/11/15 FJCP 2005 FJCP 2005 11 11
Poly. time exact instance Poly. time exact instance generator for MAX 2SAT generator for MAX 2SAT
MAX 2SAT MAX 2SAT � Input: 2CNF formula Input: 2CNF formula � � Each clause consists of exactly 2 literals Each clause consists of exactly 2 literals � � Each variable appears at most once in a Each variable appears at most once in a � clause clause � Any clause can appear more than once Any clause can appear more than once � � Question: find a truth assignment Question: find a truth assignment s.t s.t. . � � maximizes maximizes # of # of satisfied satisfied clauses, clauses, � � i.e i.e., ., minimizes minimizes # of # of unsatisfied unsatisfied clauses. clauses. � 2005/11/15 2005/11/15 FJCP 2005 FJCP 2005 13 13
How hard? How hard? � MAX SNP complete MAX SNP complete � � Decision version (Is there an assignment that Decision version (Is there an assignment that � satisfies at least k k clauses?) is clauses?) is NP complete NP complete satisfies at least � For satisfiable 2CNF formulas, poly. time For satisfiable 2CNF formulas, poly. time � solvable (2SAT is in P P) ) solvable (2SAT is in � Inapproximability upper bound: Inapproximability upper bound: � � 21/22 21/22 ≈ ≈ 0.955 0.955 [H [Hå åstad STOC stad STOC‘ ‘97] 97] � � 0.945 0.945 (under some unproven conjectures) (under some unproven conjectures) � [Khot, Kindler, Mossel, and O’ ’Donnell FOCS Donnell FOCS‘ ‘04] 04] [Khot, Kindler, Mossel, and O 2005/11/15 2005/11/15 FJCP 2005 FJCP 2005 14 14
Related works Related works � Probabilistic generator for MAX Probabilistic generator for MAX k k SAT SAT � [Dimitriou Dimitriou CP CP’ ’03] 03] [ � Unique optimal solution Unique optimal solution w.h.p w.h.p., ., O( O( n n k ) clauses k ) clauses � � Exact/probabilistic generator for MAX Exact/probabilistic generator for MAX � 2SAT [Yamamoto ‘ ‘04] 04] 2SAT [Yamamoto � To characterize opt. solution, requires an To characterize opt. solution, requires an � expander graph expander graph � They use an explicit expander graph They use an explicit expander graph � construction algorithm / a random graph construction algorithm / a random graph � Probabilistic generator for MAX 3SAT Probabilistic generator for MAX 3SAT � [MM COCOON‘ ‘01] 01] [MM COCOON 2005/11/15 2005/11/15 FJCP 2005 FJCP 2005 15 15
Strategy of instance generator Strategy of instance generator n at random as the Choose t t ∈ {0,1} n at random as the Choose ∈ {0,1} i. i. optimal solution optimal solution Combine appropriate number of minimal minimal Combine appropriate number of ii. ii. unsat. . 2CNFs that contains 2CNFs that contains exactly 1 exactly 1 unsat clause falsified by t t clause falsified by Add several clauses satisfied by t t Add several clauses satisfied by iii. iii. There is no assignment that falsifies less # There is no assignment that falsifies less # � � of clauses than # of 2CNFs in ii. of clauses than # of 2CNFs in ii. Thus t t is an optimal solution is an optimal solution Thus � � 2005/11/15 2005/11/15 FJCP 2005 FJCP 2005 16 16
Recommend
More recommend