Introduction to Advanced Results Master Informatique Université Paris 5 René Descartes 2016 Master Info. Complexity Advanced Results 1/26
Outline Boolean Hierarchy Probabilistic Complexity Parameterized Complexity Basics on Parameterized Complexity Backdoors in SAT Master Info. Complexity Advanced Results 2/26
Boolean Hierarchy The Boolean Hierarchy is the set of decision problems defined inductively BH 1 = NP BH 2i = {L = L 1 L 2 L 1 BH 2i 1, L 2 conp} = BH 2i 1 conp BH 2i+1 = {L = L 1 L 2 L 1 BH 2i, L 2 NP} = BH 2i NP BH = i N\{0} BH i P 2 The Boolean Hierarchy is useful to discriminate problems which are NP-hard (or conp-hard), but not in NP (or in conp) Master Info. Complexity Advanced Results 3/26
Inclusion of Boolean Hierarchy Classes i, BH i BH i+1 Intuition: For i 1 (mod 2), L BHi, L = L L All, where L All is the language which contains all possible instances. L All conp, so L = L L All BH i+1 For i 0 (mod 2), L BH i, L = L L, where L is the language which contains no instance at all. L NP, so L = L L BH i+1 Master Info. Complexity Advanced Results 4/26
A Specific Class from BH: DP DP = BH 2 = {L 1 L 2 L 1 NP and L 2 conp} for Difference Polynomial Time DP has been identified before the definition of the Boolean hierarchy [Papadimitirou and Y. 1984] DP = {L1 \ L 2 L 1 NP and L 2 NP} NP DP, conp DP Master Info. Complexity Advanced Results 5/26
A Specific Problem from DP (1) Exact Clique Given a graph G and an integer k, is it true that the maximal clique in G has size exactly k? Complexity of Exact Clique Exact Clique is DP-complete [Papadimitirou and Y. 1984] Master Info. Complexity Advanced Results 6/26
A Specific Problem from DP (2) SAT-UNSAT Given two propositional formulas φ, ψ, is φ satisfiable and ψ unsatisfiable? Complexity of SAT-UNSAT SAT-UNSAT is DP-complete [Papadimitirou and Y. 1984] Master Info. Complexity Advanced Results 7/26
A Specific Problem from DP (3) Unique SAT Given a propositional formula φ, is φ satisfiable with exactly one model? Complexity of Unique SAT Unique SAT is in DP [Papadimitirou and Y. 1984] Master Info. Complexity Advanced Results 8/26
References G. Wechsung, On the Boolean closure of NP. Proc. of the International Conference on Fundamentals of Computation Theory, p 485 493, 1985. C. H. Papadimitriou and M. Yannakakis, The complexity of facets (and some facets of complexity). Journal of Computer and System Sciences 28, p 244 259, 1984. Master Info. Complexity Advanced Results 9/26
Outline Boolean Hierarchy Probabilistic Complexity Parameterized Complexity Basics on Parameterized Complexity Backdoors in SAT Master Info. Complexity Advanced Results 10/26
Deterministic Quick Sort Algorithm 1 DetQuickSort Input: L if L has 0 or 1 element then return L else L 1 = [x j x j < x 1 ] L 2 = [x j x j > x 1 ] return DetQuickSort(L 1 ) [x 1 ] DetQuickSort(L 2 ) end if Master Info. Complexity Advanced Results 11/26
Deterministic Quick Sort Algorithm 2 DetQuickSort Input: L if L has 0 or 1 element then return L else L 1 = [x j x j < x 1 ] L 2 = [x j x j > x 1 ] return DetQuickSort(L 1 ) [x 1 ] DetQuickSort(L 2 ) end if Problem: for some instances, this algorithm needs O(n 2 ) steps Master Info. Complexity Advanced Results 11/26
Probabilistic Quick Sort Algorithm 3 ProbQuickSort Input: L if L has 0 or 1 element then return L else Chose randomly i {1,..., n} L 1 = [x j x j < x i ] L 2 = [x j x j > x i ] return ProbQuickSort(L 1 ) [x i ] ProbQuickSort(L 2 ) end if Master Info. Complexity Advanced Results 12/26
Probabilistic Quick Sort Algorithm 4 ProbQuickSort Input: L if L has 0 or 1 element then return L else Chose randomly i {1,..., n} L 1 = [x j x j < x i ] L 2 = [x j x j > x i ] return ProbQuickSort(L 1 ) [x i ] ProbQuickSort(L 2 ) end if On each instance, the average number of steps is O(n log(n)) Master Info. Complexity Advanced Results 12/26
Probabilistic Turing Machine Definition A Probabilistic Turing Machine M is a TM such that for each configuration (q, x), the transition function δ has two possible results. When executing M on the input i, at each step one of the possible transitions is chosen, independently of the previous steps. We say that M works in time t(n) if for any input i such that i = n, M stops in less than t(n) steps whatever the probabilistic choices. Master Info. Complexity Advanced Results 13/26
Probabilistic Turing Machine Definition A Probabilistic Turing Machine M is a TM such that for each configuration (q, x), the transition function δ has two possible results. When executing M on the input i, at each step one of the possible transitions is chosen, independently of the previous steps. We say that M works in time t(n) if for any input i such that i = n, M stops in less than t(n) steps whatever the probabilistic choices. Intuition: a Probabilistic Turing Machine is able to chose randomly a number. We consider that it just needs to chose a bit 0/1. Integers can be chosen bit by bit For each configuration, the two possible transitions correspond to the choice of a 0 or a 1 Master Info. Complexity Advanced Results 13/26
Handling Errors Depending on the sequence of probabilistic choices (i.e. the random number chosen by the machine), a PTM can sometimes reject a positive instance or accept a negative instance To define probabilistic complexity classes, we need to identify PTM which minimize the error rate Master Info. Complexity Advanced Results 14/26
Bounded Error BPP [Gill 1977] BPP (Bounded error Probabilistic Polynomial time) is the set of decision problems P s.t. there is a PTM M s.t. for any instance i of P, if i is a positive instance, then M accepts i for at least 2 3 of the executions if i is a negative instance, then M rejects i for at least 2 3 of the executions Master Info. Complexity Advanced Results 15/26
Bounded Error BPP [Gill 1977] BPP (Bounded error Probabilistic Polynomial time) is the set of decision problems P s.t. there is a PTM M s.t. for any instance i of P, if i is a positive instance, then M accepts i for at least 2 3 of the executions if i is a negative instance, then M rejects i for at least 2 3 of the executions Intuitively: a PTM decides a language if the error rate is less than 1 3 Master Info. Complexity Advanced Results 15/26
Randomized Polynomial Time RP [Gill 1977] RP (Randomized Polynomial time) is the set of decision problems P s.t. there is a PTM M s.t. for any instance i of P, if i is a positive instance, then M accepts i for at least 2 3 of the executions if i is a negative instance, then M rejects i for all possible executions Master Info. Complexity Advanced Results 16/26
Randomized Polynomial Time RP [Gill 1977] RP (Randomized Polynomial time) is the set of decision problems P s.t. there is a PTM M s.t. for any instance i of P, if i is a positive instance, then M accepts i for at least 2 3 of the executions if i is a negative instance, then M rejects i for all possible executions Intuitively: a PTM decides a language if the error rate is less than 1 3 for positive instances, and null for negative instances Master Info. Complexity Advanced Results 16/26
Relations with Classical Classes P RP BPP PSPACE RP NP corp conp corp BPP Master Info. Complexity Advanced Results 17/26
Relations with Classical Classes P RP BPP PSPACE RP NP corp conp corp BPP Probabilistic complexity can be used to distinguish between the complexity of problems which are in PSPACE Master Info. Complexity Advanced Results 17/26
References J. T. Gill, Computational Complexity of Probabilistic Turing Machines. SIAM J. Comput. 6(4): 675 695, 1977. Master Info. Complexity Advanced Results 18/26
Outline Boolean Hierarchy Probabilistic Complexity Parameterized Complexity Basics on Parameterized Complexity Backdoors in SAT Master Info. Complexity Advanced Results 19/26
Intuition of Parameterized Complexity When considering a hard problem, sometimes the difficulty to solve it comes from a specific part of the problem. If, for an instance i, we are sure that the hard part is not too big, then maybe the instance i is not so hard Master Info. Complexity Advanced Results 20/26
Intuition of Parameterized Complexity When considering a hard problem, sometimes the difficulty to solve it comes from a specific part of the problem. If, for an instance i, we are sure that the hard part is not too big, then maybe the instance i is not so hard Intuitive Example: SAT If φ is a DNF formula, it is easy to give all its models Master Info. Complexity Advanced Results 20/26
Intuition of Parameterized Complexity When considering a hard problem, sometimes the difficulty to solve it comes from a specific part of the problem. If, for an instance i, we are sure that the hard part is not too big, then maybe the instance i is not so hard Intuitive Example: SAT If φ is a DNF formula, it is easy to give all its models φ (x 1 x 2 x 3 ) is not a DNF, so it is not (directly) easy to know if it is satisfiable Master Info. Complexity Advanced Results 20/26
Intuition of Parameterized Complexity When considering a hard problem, sometimes the difficulty to solve it comes from a specific part of the problem. If, for an instance i, we are sure that the hard part is not too big, then maybe the instance i is not so hard Intuitive Example: SAT If φ is a DNF formula, it is easy to give all its models φ (x 1 x 2 x 3 ) is not a DNF, so it is not (directly) easy to know if it is satisfiable But since we know all the models of φ, it is easy to know if one of them satisfies x 1 x 2 x 3 Master Info. Complexity Advanced Results 20/26
Intuition of Parameterized Complexity When considering a hard problem, sometimes the difficulty to solve it comes from a specific part of the problem. If, for an instance i, we are sure that the hard part is not too big, then maybe the instance i is not so hard Intuitive Example: SAT If φ is a DNF formula, it is easy to give all its models φ (x 1 x 2 x 3 ) is not a DNF, so it is not (directly) easy to know if it is satisfiable But since we know all the models of φ, it is easy to know if one of them satisfies x 1 x 2 x 3 More generally, for φ ψ, with φ a DNF, the size of ψ is a parameter of the difficulty: the smaller ψ, the easier it is to solve SAT for φ ψ Master Info. Complexity Advanced Results 20/26
Parameters of a Problem Instead of measuring the complexity of a problem with just the size of the problem, we consider several parameters Each parameter correspond to a different source of difficulty to solve the problem If some parameters are fixed (or bounded), then the problem becomes simpler than in the general case Master Info. Complexity Advanced Results 21/26
Parameterized Language [Downey and Fellows 1995] Definition Given an alphabet Σ, a parameterized language L is a subset of Σ Σ. For (x, y) L, we call x the main part and y the parameter. Master Info. Complexity Advanced Results 22/26
Parameterized Language [Downey and Fellows 1995] Definition Given an alphabet Σ, a parameterized language L is a subset of Σ Σ. For (x, y) L, we call x the main part and y the parameter. Definition A parameterized language L is fixed-parameter tractable if it can be decided in O(f(k)q(n)), for (x, k) L, with n = x, q(n) a polynomial, and f(k) any function. The class of fixed-parameter tractable problems is called FPT Master Info. Complexity Advanced Results 22/26
Examples of Natural Parameters The size of a database query The number of variables in a logical formula The number of moves in a game [Abrahamson et al. 1995] Master Info. Complexity Advanced Results 23/26
Examples of Natural Parameters The size of a database query The number of variables in a logical formula The number of moves in a game [Abrahamson et al. 1995] The number of Boolean variables to be assigned to move a formula in a tractable class Master Info. Complexity Advanced Results 23/26
Backdoors in SAT Target Class Given C a class of propositional formulas, C is a target class if C can be recognized in polynomial time satisfiability of formulas in C can be checked in polynomial time C is closed under isomorphism (i.e. is two formulas are identical except for the names of the variables, then either both or none belong to C) Definition A strong-c-backdoor of a CNF formula φ is a set of variables B such that for all interpretations τ 2 B, φ τ C If we know a strong-c-backdoor of φ of size k, then the satisfiability of φ is reduced to the satisfiability of 2 k formulas φ 1,..., φ 2 k C. So SAT becomes fixed-parameter tractable in k Master Info. Complexity Advanced Results 24/26
Examples of Base Classes Horn Formulas A Horn formula is a CNF with only Horn clauses, i.e. clauses with at most one positive literal 2CNF Formulas A 2CNF formula is a CNF with only unary and binary clauses This means that if a formula has a backdoor of size k to Horn or 2CNF, then it is FPT in parameter k More details in [Gaspers and Szeider 2012] Master Info. Complexity Advanced Results 25/26
References R. G. Downey and M. R. Fellows, Fixed-Parameter Tractability and Completeness I: Basic Results. SIAM J. Comput. 24(4): 873 921, 1995. K. R. Abrahamson, R. G. Downey and M. R. Fellows, Fixed-Parameter Tractability and Completeness IV: On Completeness for W[P] and PSPACE Analogues. Ann. Pure Appl. Logic 73(3): 235 276, 1995. S. Gaspers and S. Szeider, Backdoors to Satisfaction. The Multivariate Algorithmic Revolution and Beyond, 287 317, 2012. Master Info. Complexity Advanced Results 26/26