Sep 20, 2004 - plexity [18], which is a refined complexity theory to deal with two-dimensional .... the original kernel problems, in particular they make membership proofs much .... If Ï is a sentence, i.e., a formula without free variables, then we write A |= Ï ...... Here we offer another proof which is based on the same idea.
Model-Checking Problems, Machines and Parameterized Complexity
Dissertation zur Erlangung des Doktorgrades der Fakult¨at f¨ ur Mathematik und Physik der Albert-Ludwigs-Universit¨at Freiburg im Breisgau
vorgelegt von
Yijia Chen
Juni 2004
Dekan:
Prof. Dr. Dr. h.c. Rolf Schneider
Erster Referent:
Prof. Dr. J¨ org Flum
Zweiter Referent:
Prof. Dr. Bernhard Nebel
Datum der Promotion:
20. September 2004
ii
Contents 1 Introduction
1
2 Preliminaries 2.1 First-order Logic . . . . . . . . . . 2.2 Complexity . . . . . . . . . . . . . 2.2.1 Classical Complexity . . . . 2.2.2 Parameterized Complexity .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
7 7 9 9 11
3 Model-Checking on Arbitrary Structures 17 3.1 Structures with Functions . . . . . . . . . . . . . . . . . . . . . . 20 3.2 A Remark on Relational Structures . . . . . . . . . . . . . . . . . 30 4 Machine Characterizations 4.1 The Class W[P] . . . . . . . . . . . . . . . . . 4.1.1 Monotone and Anti-monotone Circuits 4.1.2 Machines . . . . . . . . . . . . . . . . 4.2 The Class W[1] . . . . . . . . . . . . . . . . . 4.3 The Classes of the A-Hierarchy . . . . . . . . 4.3.1 The Classes AWP[t] and AW[P] . . . . 4.4 The Classes of the Wfunc -Hierarchy . . . . . . 4.4.1 The Class AW[*] . . . . . . . . . . . . 4.5 The Classes of the W-Hierarchy . . . . . . . . 5 Halting Problems 5.1 Short Halting Problems . . . . . . . . . . 5.1.1 Complete Halting Problems for the 5.1.2 Complete Halting Problems for the 5.1.3 Constant Space Halting Problems 5.2 Compact Halting Problems . . . . . . . . A Random Access Machine
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
33 34 35 40 46 49 52 54 58 58
. . . . . . . . . . Wfunc -Hierarchy W-Hierarchy . . . . . . . . . . . . . . . . . . . . . .
. . . . .
. . . . .
. . . . .
67 69 69 74 80 87
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
99
B Coding Issues 101 B.1 Structures and Formulas . . . . . . . . . . . . . . . . . . . . . . . 101 B.2 Turing machine . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103 iii
iv
CONTENTS Bibliography
105
Index
109
Chapter 1
Introduction Model-checking problems, in essence, are logic problems asking if a given structure satisfies a given sentence. They are ubiquitous in computer science, although appearing often in seemingly different forms. Two prominent examples are database query and hardware verification, in which databases and hardware are modelled as structures while queries and specifications as logic formulas. Many well-studied combinatoric problems can be reformulated as modelchecking problems as well. For example, the famous Dominating Set problem can be translated to the model-checking problem of deciding Σ2 -sentences of first-order logic on the finite graph structures. Because of the practical importance and theoretical interest, model-checking problems have been studied intensively, particularly their associated complexity. However most results are not so satisfying, since they show even very restricted model-checking problems already have very high complexity. Researchers have proposed different approaches to tackle the problems and to design practically acceptable algorithms. Among others Downey and Fellows introduced the parameterized complexity [18], which is a refined complexity theory to deal with two-dimensional languages in which one part of the input instances, or parameter, is expected to be far smaller than the other. Notice this well echoes one crucial fact about the problems we have just mentioned: in database query, the size of most queries is a tiny fraction of the size of any normal database; hardware, when represented by transition systems, having states of number 2100 , would hardly be a surprise, while real-life specifications can be written in a few lines. Based on that observation, parameterized complexity centers on a novel concept of tractability, i.e., fixed-parameter tractability, or FPT, which, say, admits query algorithms whose running time might be exponential, but only in terms of the queries, while still polynomial in terms of the databases. Thereby many classical intractable problems turn out to be fixed-parameter tractable when appropriately parameterized. Rich theory has been built on designing fixed-parameter tractable algorithms [18, 42] for a great number of practical problems. But expectedly some classical intractable problems under natural parameterization seem not fixed-parameter tractable either. So similar to the classical NP-completeness
2
Introduction
FPT → W[1] = A[1] → W[2] → W[3] → · · ·
→ W[SAT] → W[P] ↓ ↓ ↓ ↓ A[2] → A[3] → · · · → AW[∗] → AW[SAT] → AW[P]
Figure 1.1: Parameterized complexity classes.
theory, parameterized complexity has a framework to classify problems that are not fixed-parameter tractable, in which a bewildering variety of parameterized classes has been identified. Figure 1.1 give some of the most important classes. Parameterized complexity has been developed rapidly during last ten to fifteen years and made its way to various areas of computer science, for example, database theory [34, 44], artificial intelligence [32], and computational biology [3, 49]. But as complexity theory is still believed to be much in its infancy, so is the younger parameterized complexity. Many notions remain to be clarified and consolidated. For example, there are three inequivalent definitions of the notion of fixed-parameter tractability, one of which even includes uncomputable problems, although sensibly. Another frequent source of confusion is the way of defining a parameterized class, which is often given as a closure of a kernel problem under some type of parameterized reduction which preserves fixedparameter tractability. Although the parameterized reduction is more refined to preserve the structure of problems, it sometimes also seems a bit arbitrary of choosing which type of reduction to be used to define a class. One remarkable phenomena in classical complexity is that natural complete problems tend to remain complete under much weaker reduction, giving a strong evidence of the robustness of a class. However this is generally not true in parameterized complexity. For example, the famed class W[1] has a complete problem of checking first-order existential sentences on finite graph structures, but if we take its closure under some kind of reduction definable by first-order logic, it has no chance to include all fixed-parameter tractable problems, which of course include polynomial time decidable problems. In contrast, we know there are numerous NP-complete problems under first-order reductions[39]. These problems can be mainly attributed to the lack of machine characterizations of parameterized complexity classes. Although the kernel problems of those classes are usually some circuit satisfiability problems and even halting problems of Turing machines, and one might argue, circuits are also “machines” in a general sense, it is nevertheless unclear what the operational intuition is when we combine a reduction and the kernel problem, and why the class is intractable without assuming the intractability of the kernel problem. But taking NP as an example, it is clear that the underlying nondeterministic Turing machines give solid evidence of its intractability, and the NP-completeness of a problem means the hardness of the problem but not NP itself. However it is another way around in parameterized complexity. One often encounters in the literature of parameterized complexity an argument like
3 The problem P is not fixed-parameter tractable, unless W[1] = FPT, to claim the intractability of P . This would be somehow questionable without clear support of the naturalness of the class W[1], because it is equivalent to that P is not fixed-parameter tractable, unless p-Clique is fixed-parameter tractable, where p-Clique is the parameterized version of the classical Clique problem. Clearly the second sentence is much weaker in philosophical term. Surely there are proven results to support W[1] 6= FPT. One is that the halting problem of Turing machine, parameterized by the number of running steps, is complete for W[1][6]. On the other hand, assuming the tractability of W[1] there would be a subexponential time algorithm for 3Sat[18], which is widely believed to be unlikely[40]. Nevertheless, these two results can be easily rephrased without mentioning the class W[1] altogether. So the main topic of our thesis is to provide clear and natural machine characterizations of different parameterized complexity classes. The starting point of our work is the class W[P] which is defined to be the class of all parameterized problems that are reducible to the weighted satisfiability problem for Boolean circuits. This problem asks whether a given circuit has a satisfying assignment of weight k, that is, a satisfying assignment in which precisely k inputs are set to True. Here k is treated as the parameter of the problem. As all the other “W-classes” in Figure 1.1 are defined similarly in terms of the weighted satisfiability problem, but for restricted classes of circuits, thus in some sense, W[P] is one of the most natural parameterized complexity classes. Our machine characterization of the class W[P] states that a problem is in W[P] if and only if it is decidable by a nondeterministic fixed-parameter tractable algorithm whose use of nondeterminism is bounded in terms of the parameter. A precise formulation of this result is based on the nondeterministic random access machines, or NRAMs, which can guess a bounded number in one step: A problem is in W[P] if and only if it is decided in time f (k) · nd by an NRAM, that makes at most f (k) nondeterministic guesses, for some computable function f and constant d. Here k denotes the parameter and n the size of the input instance. While it has been noted before (see, for example, Chapter 17 of [18]) that there is a relation between limited nondeterminism and parameterized complexity theory, no such simple and precise equivalence was known. Surprisingly if we require all nondeterministic steps to be among the last steps of the computation, we actually obtain a machine characterization of the class W[1]. More precisely a problem is in W[1] if, and only if, it is decidable by an NRAM that does its nondeterministic steps only among the last steps of the computation bounded in terms of the parameter. Thereby the machine characterizations of W[P] and W[1] reveal their subtle difference: for a problem in W[P], the decision program can perform polynomial time computation, with respect to the input, on the guessed numbers; while for W[1], the number of steps of computation after those guesses is bounded by the parameter.
4
Introduction Our main technical tools to prove those machine characterizations are modelchecking problems. As pointed earlier, most parameterized classes are originally defined via either circuit satisfiability problems or halting problems of Turing machines. It has been known for a while that there are complete modelchecking problems of those classes based on different fragments of first-order logic[19, 26, 28]. Model-checking problems are much more manageable than the original kernel problems, in particular they make membership proofs much easier, avoiding those hard and messy combinatoric arguments often required when dealing with those circuit problems. The main ingredients of the proofs of our machine characterizations is the encoding of the computation of different machine models by appropriate model-checking problems. There is a long tradition of using logic to describe computation, manifested in the proofs of some undecidability results of logic[24, 23], of the complexity completeness of many logic problems[43], and of the logic characterizations of complexity classes [23, 39]. Model-checking problems are particularly flexible to characterize computation, since both the structures and the logic sentences are alterable, while, say in descriptive complexity, the sentences are always fixed. Halting problems of Turing machines are much celebrated problems in logic and computability theory. Often they also give the immediate construction of complete problems of natural complexity classes. In parameterized complexity, the W[1]-completeness of the halting problem of Turing machines, parameterized by the steps, has long served as an evidence both for the naturalness and for the intractability of the class W[1]. It has been open whether there are similar complete halting problems for the other W-classes, which actually motivated the introduction of the A-hierarchy[26]. We will present halting problems for all the classes of the W-hierarchy related to their complete model-checking problems.
Organization of the Thesis In Chapter 2, we give basic notions of logic and complexity, classical and parameterized, that are required throughout the thesis. Then we investigate the model-checking problems on structures with functions in Chapter 3, which has been relatively left untouched for most previous works. We introduce a new hierarchy of parameterized class based on these model-checking problems, which we denoted by Wfunc . We then prove some complete results of Wfunc -classes and discuss their relation with the W-classes. In Chapter 4, we provide machine characterizations for most known parameterized classes based on various extensions of random access machines. The focal point is the class W[P], which we characterize as those languages recognizable by fixed-parameter algorithms with limited nondeterminism bounded by the parameter. We also (re)prove some completeness results of W[P] on monotone and anti-monotone circuits using much easier arguments. Starting from W[P], we exhibit machine characterizations of the class W[1], whose proof relies on its complete model-checking problem of first-order logic existential sentences. Then by similar model-checking problems, we get our machine characterizations of the
5 classes of the A-hierarchy. But a direct extension to characterize the classes of the W-hierarchy gives us the characterizations of the Wfunc -hierarchy introduced in Chapter 3. So we further restrict the capability of our random access machines to get characterizations of the W-hierarchy. In Chapter 5, we examine a number of parameterized halting problems of Turing machines, providing complete problems for Wfunc - and W-hierarchies. Those halting problems are always parameterized by the running steps of Turing machines. Then we study the halting problems which are parameterized by the space. We show they are complete for those parameterized classes defined by classical complexity classes on the slices. In the appendix we present the standard random access machines and settle some coding issues that are used in the thesis.
Acknowledgements Thanks to my supervisor Professor J¨ org Flum for his advice and patience. Without his considerable help, this thesis would not have been possible. The main results of this thesis come from extensive joint work with him and Professor Martin Grohe. In particular, the machine characterizations of W[P], W[1] and A[t] using random access machines are due to Martin Grohe. The results in Sections 4.5 and 5.1.2 are joint work with J¨ org Flum. Some of the results have been published in [11, 9].
6
Introduction
Chapter 2
Preliminaries In this chapter we fix the basic notations of logic and complexity that are essential for the thesis. They are by no means comprehensive, so we refer the reader to the standard textbooks [24, 23, 43, 18] for complete details.
2.1
First-order Logic
A vocabulary τ is a finite set of relation, function and constant symbols, i.e. {R1 , . . . , Rp , f1 , . . . , fq , c1 , . . . , cl }. Each relation Ri and function symbol fi has an arity, denoted by arity(Ri ) and arity(fi ) respectively. The arity of τ is the maximum of the arities of the relation and function symbols in τ . A vocabulary τ is relational, if it does not contain function and constant symbols. A structure A of vocabulary τ , or τ -structure, A A = (A, R1A , . . . , RpA , f1A , . . . , fqA , cA 1 , . . . , cl ),
consists of a nonempty set A called universe, and interpretation T A for each symbol T ∈ τ : RiA ⊆ Aarity(Ri ) , fiA : Aarity(fi ) → A and cA i ∈ A. We synonymously write a ∈ RA or RA a to denote that the tuple a ∈ Ar belongs to the relation RA . We only consider structures whose universe is finite. The size of a τ -structure A is the number X kAk := |τ | + |A| + arity(R) · |RA | a relation symbol
+
X
R∈τ
|A|arity(f ) ,
a function symbol
f ∈τ
which is roughly the size of the representation of A in a random access machine (cf. Appendix B.1).
8
Preliminaries If τ is relational, we also call τ -structures relational, otherwise arbitrary. Unless otherwise stated, vocabularies and structures are always relational. Therefore we use STR to denote the class of all finite relational structures, while the class of all finite arbitrary structures is denoted by STRfunc . Example 2.1 We view a directed graph as a structure G = (G, E G ), whose vocabulary consists of one binary relation symbol E. More conventionally G is written as G = (V, E), V and E are referred to as the vertex set and the edge set respectively. DGRAPH denotes the class of all finite directed graphs. G is an (undirected) graph, if E is irreflexive and symmetric. GRAPH is the class of all finite graphs. Fix an arbitrary vocabulary τ . The first-order formulas over the vocabulary τ are built up from atomic formulas using the usual boolean connectives and existential and universal quantification. Recall that atomic formulas are formulas of the form s1 = s2 or Rs1 . . . sr , where s1 , s2 , . . ., sr are terms and R is an r-ary relation symbol. Terms are either constants, or variables, or of the form f (s1 , . . . , sr ), where f is an r-ary function symbol and s1 , . . ., sr are again terms. The length of a formula ϕ, denoted by kϕk, is the number of symbols it contains. Similarly we define the length ksk of a term s. We will use True and False to denote some always true or false formulas as x = x and x 6= x respectively. For a first-order logic formula ϕ, a variable x that appears in ϕ is said to be a free variable, if it has an occurrence not within the scope of any quantifier over x. A formula is quantifier-free if it contains no quantifiers. For t ≥ 1, Σt denotes the class of all first-order formulas over some relational vocabularies of the form ∃x11 . . . ∃x1k1 ∀x21 . . . ∀x2k2 . . . Qxt1 . . . Qxtkt ψ, where Q = ∃ if t is odd and Q = ∀ otherwise, and where ψ is quantifier-free. Now the class of all first-order formulas over relational vocabularies is [ FO := Σt . t≥1
Let t, u ≥ 1. A formula ϕ is Σt,u , if it is Σt and all quantifier blocks after the leading existential block have length ≤ u. For example ∃x1 . . . ∃xk ∀y∃z1 ∃z2 ψ, where ψ is quantifier-free, is in Σ3,2 (for any k ≥ 1). It is clear that Σ1 = Σ1,u and Σfunc for any u ≥ 1. For t, u ≥ 1, let Σfunc t,u be defined analogously as Σt t and Σt,u except for that formulas may contain function and constant symbols. Immediately we have Σt ⊆ Σfunc and Σt,u ⊆ Σfunc t t,u . Similarly we let FOfunc
:=
[
t≥1
Σfunc . t
2.2 Complexity
9
If Φ is a class of formulas, then Φ[τ ] denotes the class of all formulas of vocabulary τ in Φ and Φ[r], for r ≥ 1, the class of all formulas whose vocabulary has arity ≤ r. If A is a structure, a1 , . . . , an are elements of the universe A of A, and s(x1 , . . . , xm ) is a term with free variables x1 , . . . , xm , we use sA (a1 , . . . , am ) to denote the interpretation of s in A when x1 , . . . , xm are interpreted by a1 , . . . , am respectively. Similarly if ϕ(x1 , . . . , xm ) is a first-order formula whose free variables are among x1 , . . . , xm , then we write A |= ϕ(a1 , . . . , am ) to denote that A satisfies ϕ if the variables x1 , . . . , xm are interpreted by a1 , . . . , am respectively. If ϕ is a sentence, i.e., a formula without free variables, then we write A |= ϕ to denote that A satisfies ϕ.
2.2 2.2.1
Complexity Classical Complexity
Given a finite alphabet Σ, a classical complexity problem, or a Σ-language, is a set L ⊆ Σ∗ . Each finite word x ∈ Σ∗ is called an instance, its length is denoted by |x|. A Turing machine M that recognizes a Σ-language L is a tuple (Σ, Q, δ, q0 , q+ , q− ). In default, M only uses one input tape and one work tape. Besides those in Σ, M also uses the extra symbol “⊲” for the leftmost “virtual cell”, and the blank symbol “⊔”. Q is the state set and contains the initial state q0 , the accepting state q+ , and the rejecting state q− . δ is the set of instructions of M , each instruction having the form qbc
→ q ′ c′ h 1 h 2 ,
(2.1)
where q, q ′ ∈ Q, b, c, c′ ∈ Σ ∪ {⊲, ⊔}, and h1 , h2 ∈ {−1, 0, 1}. The qbc in (2.1) is sometimes called the base of the instruction. As usual we distinguish between nondeterministic Turing machines (NTM) and deterministic Turing machines (DTM). A DTM has no two distinct instructions with the same base qbc. Let DTMS and NTMS denote the classes of all deterministic and nondeterministic Turing machines respectively. We will also use alternating Turing machines (ATM). Such a Turing machine is a tuple (Σ, Q, QE , QA , δ, q0 , q+ , q− ) which is defined in the same way as an ordinary Turing machine, except that the states are divided into two groups Q = QE ∪˙ QA , i.e., the set QE of existential states and the set QA of universal states. Without loss of generality, we always assume the initial state q0 is an existential state, i.e., q0 ∈ QE .
10
Preliminaries
Because of the alternation, the notion of machine acceptance is more complicated. Recall that a configuration of any Turing machine consists of the machine’s state, the work tape contents and the head positions. An ATM in a given configuration C accepts, if 1. C has the state q+ , or 2. C is in an existential state and there exists a successor configuration C ′ that accepts, or 3. C is in a universal state, and all successor configurations accept. A run ρ of an ATM M is sequence of consecutive configurations starting from the initial configuration (which is always an existential configuration, since we assume q0 ∈ QE ). ρ is an accepting run if each configuration in ρ is accepting and the last one has the state q+ . We use ATMS to denote the class of all alternating Turing machines. Now we can define the standard time and space complexity classes. Definition 2.2 For a problem L ⊆ Σ∗ and a function f : N → N, we say L ∈ NTIME[f ] ( DTIME[f ]), if L can be decided by an NTM ( DTM respectively) with running time O(f (|x|)) on each instance x ∈ Σ∗ . Two most important time complexity classes are [ PTIME := DTIME[nd ], d∈N
NP
:=
[
NTIME[nd ].
d∈N
Definition 2.3 For a problem L ⊆ Σ∗ and a function f : N → N, P ∈ NSPACE[f ] ( DSPACE[f ]), if L can be decided by an NTM ( DTM respectively) visiting only O(f (|x|)) work tape squares on each instance x ∈ Σ∗ . We are most interested in the following space classes in our work, := NLOGSPACE := LOGSPACE
PSPACE
:=
DSPACE[log n], NSPACE[log n],
[
DSPACE[nd ],
d∈N
Random Access Machines Random access machines, or RAMs , are more appropriate and intuitive for describing an algorithm. It is also well known that PTIME is equivalent the class of languages that can be accepted by a RAM using polynomial time. We will use various extension of RAMs to characterize parameterized classes. Appendix A gives a detailed account of the RAMs we use.
2.2 Complexity
2.2.2
11
Parameterized Complexity
A parameterized problem is a set P ⊆ Σ∗ × Π∗ over two finite alphabets Σ and Π. If (x, y) ∈ Σ∗ × Π∗ is an instance of a parameterized problem, x is referred to as the input, y as the parameter. A Turing machine that accepts P has two input tapes, one for x, the other for y. We usually denote the length of x by n and y by k. P is often represented in the following form: P Input: Parameter: Problem:
x ∈ Σ∗ . y ∈ Π∗ . Decide if (x, y) ∈ P .
Remark 2.4 Of course, we may view any parameterized problem P ⊆ Σ∗ × Π∗ as a classical problem in some larger alphabet, say, Σ ∪ Π ∪ {; } where ; is a new symbol to separate input from parameter. Definition 2.5 A parameterized problem P is fixed-parameter tractable, or in FPT, if P can be decided in time f (k) · nd for a computable function f : N → N
and a constant d ∈ N. Remark 2.6 It is clear the underlying computation model of Definition 2.5 can be chosen to be either deterministic Turing machines or random access machines. Remark 2.7 Here FPT actually means the strongly uniform FPT in [18]. We feel that it is more natural than the original FPT which admits uncomputable problems. Occasionally we use the term FPT running time, or simply fpt-time, to mean that the time used by an algorithm is bounded by f (k) · nd for some computable function f : N → N and constant d ∈ N. Similarly an fpt-algorithm is an algorithm that takes as input pairs (x, y) ∈ Σ∗ × Π∗ and has an FPT running time. Thus a parameterized problem is in FPT if and only if it can be decided by an fpt-algorithm. However, we use the term fpt-algorithm mostly when referring to algorithms computing mappings. Remark 2.8 For a parameterized problem P ⊆ Σ∗ × Π∗ , we define P′ Input: Parameter: Problem:
x ∈ Σ∗ , y ∈ Π∗ . k ∈ N. Decide if |y| = k and (x, y) ∈ P .
It is straightforward to show that P ∈ FPT if and only if P ′ ∈ FPT. Thus it is sufficient to consider, for most cases, parameters as natural numbers, say P ⊆ Σ∗ × N. And if that is the case, we always assume that the parameters are encoded in unary, thus a parameter with length k is exactly the parameter of value k.
12
Preliminaries
Example 2.9 One prominent example of fixed-parameter tractable problems is the Parameterized Vertex Cover problem. p-VC Input: Parameter: Problem:
A graph G = (V, E). k ∈ N. Decide if G has a vertex cover of size k.
Recall a vertex set C ⊆ V is a vertex cover of G, if each edge of G has an end-point in C. The best currently known algorithm for p-VC has running time O(k · |V | + 1.271k · k 2 )[12]. Surely when translated to classical complexity, it is by no means a polynomial time algorithm. And it is also well-known that (unparameterized) Vertex Cover problem is NP-complete. However the following Parameterized Clique problem seems not fixedparameter tractable, although the classical Clique problem is closely related to the Vertex Cover problem. p-Clique Input: Parameter: Problem:
A graph G = (V, E). k ∈ N. Decide if G has a clique of size k.
Recall a clique C ⊆ V has all its vertices connected in G. Therefore a theory of parameterized intractability has been developed, which is based on the following notion of reduction between parameterized problems that preserves fixed-parameter tractability. Definition 2.10 An fpt-reduction from the parameterized problem P ⊆ Σ∗ ×Π∗ to the parameterized problem P ′ ⊆ (Σ′ )∗ × (Π′ )∗ is a mapping R : Σ∗ × Π∗ → (Σ′ )∗ × (Π′ )∗ such that: 1. For all (x, y) ∈ Σ∗ × Π∗ : (x, y) ∈ P ⇔ R(x, y) ∈ P ′ . 2. There exists a computable function g : N → N such that for all (x, y) ∈ Σ∗ × Π∗ , say with R(x, y) = (x′ , y ′ ), we have |y ′ | ≤ g(|y|). 3. R is computable in fpt-time. We write P ≤fpt Q if there is an fpt-reduction from P to Q, and P =fpt Q if both P ≤fpt Q and Q ≤fpt P . We set [P ]fpt
:= {Q | Q ≤fpt P },
and, for a class C of parameterized problems, [ [C]fpt := [P ]fpt . P ∈C
2.2 Complexity
13
The notions of hardness and completeness can be defined analogously as their classical counterparts. Now we can define a parameterized intractable class as the fpt-closure of p-Clique, i.e., [p-Clique]fpt , which is exactly the class W[1]. In other words, p-Clique is complete for W[1], which is the first level of the so-called Whierarchy [17] introduced by Downey and Fellows: for each t ≥ 1, W[t] is defined as the fpt-closure of the parameterized version of the satisfiability problem for circuits of weft t and bounded depth. Instead of giving the definition in full details, we will present an alternative characterization of W[t] in Chapter 3 in terms of parameterized model-checking problems. One might expect that parameterized classes are generalizations of the classical classes LOGSPACE, NLOGSPACE or NP, just like FPT is the generalization of PTIME in the parameterized world. Cai et al. [7], Flum and Grohe [27] took that idea, although their approaches are slightly different, they end up with almost the same classes. Here we follow [27]. Definition 2.11 Let C be the set of all computable function f : N → N, [ para-LOGSPACE := DSPACE[f (k) + log n], f ∈C
para-NLOGSPACE
[
:=
NSPACE[f (k) + log n],
f ∈C
para-NP
:=
[
NTIME[f (k) · nd ].
f ∈C,d∈N
Remark 2.12 It may be tempting to replace f (k) + log n by f (k) · log n in the definition of para-LOGSPACE and para-NLOGSPACE, but we will see next that it yields a proper larger classes. S Clearly if we define para-PTIME := f ∈C,d∈N DTIME[f (k) · nd ], it is just FPT. Occasionally we would write para-PTIME instead of FPT to present results in a uniform way. The structure of classical Ks translates well into the para-Ks. Theorem 2.13 [27] For K, K ′ ∈ {LOGSPACE, NLOGSPACE, PTIME, NP} para-K ⊆ para-K ′
⇐⇒
K ⊆ K ′.
Another way to derive parameterized complexity classes from the classical ones is to consider the slices of the parameterized problems. Given P ⊆ Σ∗ ×Π∗ , for y ∈ Π∗ , the y slice of P is the classical Σ-language Py
:=
{x ∈ Σ∗ | (x, y) ∈ P }.
Definition 2.14 Given a complexity class K, we say a parameterized problem P ⊆ Σ∗ × Π∗ is in uniform slicewise K, or uniform-XK, if there is an effective process, for each y ∈ Π∗ , generating a witness of the membership of Qy in K.
14
Preliminaries
Now the standard space and time hierarchy theorems [14, 46, 36, 37] imply that: Corollary 2.15 For any K ∈ {LOGSPACE, NLOGSPACE, PTIME, NP}, para-K ( uniform-XK. For standard time and space classes, the effective procedure actually means an effective enumeration of machines that accept each slice within the stated resource bound. The following theorems show that we can combine all enumerated machines into one single machine. We defer the proof to Chapter 5. Theorem 2.16 FPT
=
[
uniform-XDTIME[nd ].
d∈N
Theorem 2.17 Let C be the set of all computable function f : N → N, [ uniform-XPTIME = DTIME[nf (k) ], f ∈C
uniform-XNLOGSPACE =
[
NSPACE[f (k) · log n],
f ∈C
uniform-XLOGSPACE =
[
DSPACE[f (k) · log n].
f ∈C
Again it is easy to see that the structural theory of those uniform slicewise classes are identical to their underlying classical classes. Thus they, like those previous para-K classes, offer no much more insight than those classical classes. However there are many natural and interesting parameterized problems in uniform-XPTIME ∩ para-NP. Of course, if NP = PTIME, it is exactly FPT. Otherwise it captures those languages that can be decided slicewisely in PTIME, but need time of arbitrarily high degree polynomials, and in the meantime, when NTMs are used, each slice lies in the same NTIME[nd ]. For example, consider p-Clique, for each k ∈ N, finding a clique of size k is in DTIME[nk ] ∩ NTIME[n2 ]. Note that FPT ⊆ [P ]fpt for every problem P ⊆ Σ∗ × Π∗ with ∅ = 6 P 6= Σ × Π∗ , and if NLOGSPACE 6= PTIME, then para-NLOGSPACE and uniform-XNLOGSPACE do not contain FPT, therefore fpt-reduction is too strong for those classes. Under that consideration, Flum and Grohe introduced the following natural reduction corresponding to the classical logspace reduction. ∗
Definition 2.18 A parameterized logspace reduction, or pl-reduction, from the parameterized problem P ⊆ Σ∗ × Π∗ to the parameterized problem P ′ ⊆ (Σ′ )∗ × (Π′ )∗ is a mapping R : Σ∗ × Π∗ → (Σ′ )∗ × (Π′ )∗ such that: 1. For all (x, y) ∈ Σ∗ × Π∗ : (x, y) ∈ P ⇔ R(x, y) ∈ P ′ .
2.2 Complexity
15
2. There exists a computable function g : N → N such that for all (x, y) ∈ Σ∗ × Π∗ , say with R(x, y) = (x′ , y ′ ), we have |y ′ | ≤ g(|y|). 3. There exist a computable function f : N → N and a constant d ∈ N such that R is computable in DSPACE[f (k) + log n]. P ≤pl Q, [P ]pl and [C]pl are understood analogously as the cases for fptreduction. Observe that P ≤pl Q implies P ≤fpt Q, but the converse does not hold under the assumption LOGSPACE 6= PTIME. Remark 2.19 In general, we use fpt-reductions as the default reductions. Thus if we say that a problem is complete for a class without saying under what reductions, it should be understood that we mean fpt-reductions. However, except a few cases in Chapter 4, most reductions we will present are actually pl-reductions.
16
Preliminaries
Chapter 3
Model-Checking on Arbitrary Structures For a class D of structures and a class Φ of sentences, whose membership is polynomial time decidable, the Model-Checking Problem for Φ on D, or MC(D, Φ), is the problem of deciding whether a given structure A ∈ D satisfies a given sentence ϕ ∈ Φ. Most decision problems can be reformulated as some model-checking problems MC(D, Φ) in one way or another by choosing appropriate D and Φ. Example 3.1 Recall that the Clique problem is Clique
Input: Problem:
A graph G = (V, E) and k ≤ |V |. Decide if G has a clique of size k.
Note a graph G has a clique of size k if and only if ^ G |= ∃x1 . . . ∃xk Exi xj . 1≤i