Fine-grained Complexity

Vassilevska Williams, “On some fine-grained questions in algorithms and complexity” (original paper), pages 1-9.

Mimic NPNP-completeness,

3 Hypothesis

SETH

Recap Strong Exponential Time Hypothesis (SETH). For every ϵ>0\epsilon\gt0 there exists an integer k3k\ge3 s.t. CNFSATCNF-SAT on formulas with clause size at most kk and nn variables can not be solved in O(2(1ϵ)n)O(2^{(1-\epsilon)n}) time even by a randomized algorithm.

3-SUM

3-SUM Hypothesis. 3SUM3-SUM on integers in {n4,,n4}\{-n^4,\cdots,n^4\} can not be solved in O(n2ϵ)O(n^{2-\epsilon}) time for any ϵ>0\epsilon\gt0 by a randomized algorithm.

3SUM3-SUM Problem: Given a set SS of nn integers from {nc,,nc}\{-n^c,\cdots,n^c\} for some constant cc, determine whether there are x,y,zSx,y,z\in S s.t. x+y+z=0x+y+z=0. By a standard hashing trick, assume that c3+δc\le3+\delta for any δ>0\delta\gt0.

SOTA for 3SUM3-SUM: an algorithm in n2(loglogn)O(1)/log2nn^2(\log\log n)^{O(1)}/\log^2n by Chan et al.

APSP

All-Pairs Shortest Paths (APSP) problem: Given an nn node graph G=(V,E)G=(V,E), and integer edge weights w:E{M,,M}w:E\to\{-M,\cdots,M\} for some M=nO(1)M=n^{O(1)}, compute for every u,vVu,v\in V, the shortest path distance d(u,v)d(u,v) in GG from uu to vv. Assume that GG does not contain negative weight cycles.

求所有点的最短路径,有经典弗洛伊德算法啊。

Floyd-Warshall algorithm can solve APSP in O(n3)O(n^3). One can run Dijkstra’s algorithm from every vertex using some tricks, SOTA is n3/exp(logn)n^3/\exp(\sqrt{\log n}).

APSP Hypothesis. No randomized algorithm can solve APSP in O(n3ϵ)O(n^{3-\epsilon}) time for ϵ>0\epsilon\gt0 on nn node graphs with edge weights in {nc,,nc}\{-n^c,\cdots,n^c\} and no negative cycles for large enough cc.

Fine-grained Reductions

Consider problem AA with textbook runtime a(n)a(n) and problem BB with text book runtime b(n)b(n). Given a supposed O(b(n)1ϵ)O(b(n)^{1-\epsilon}) time algorithm for BB for ϵ>0\epsilon\gt0, we would like to compose it with another algorithm that transforms instances of AA into instances of BB, to obtain an algorithm for AA running in time O(a(n)1ϵ)O(a(n)^{1-\epsilon'}) time for ϵ>0\epsilon'\gt0 being a function of ϵ\epsilon.

📖Definition of fine-grained reduction. Assume that AA and BB are computational problems and a(n)a(n) and b(n)b(n) are their conjectured running time lower bounds, respectively. We say AA (a,b)(a,b)-reduces to BB (Aa,bBA\le_{a,b}B), if for every ϵ>0\epsilon\gt0, there exists δ>0\delta\gt0, and an algorithm RR for AA that runs in time (a(n))1δ(a(n))^{1-\delta} on inputs of length nn, making qq calls to an oracle for BB with query lengths n1,,nqn_1,\cdots,n_q, where

i=1q(b(ni))1ϵ(a(n))1δ.\sum_{i=1}^q(b(n_i))^{1-\epsilon}\le(a(n))^{1-\delta}.

If Aa,bBA\le_{a,b}B and Ba,bAB\le_{a,b}A, we say that AA and BB are fine-grained equivalent, Aa,bBA\equiv_{a,b}B.

若存在一个能在指数位置上打破 AA 问题猜想时间复杂度下界的算法 RR,并且该算法包含若干次调用在指数位置上打破 BB 问题猜想复杂度下界的算法,则称 AA 能细粒度归约到 BB

被绕晕了没有?

The definition implies that if Aa,bBA\le_{a,b}B and BB has an algorithm with running time O(b(n))1ϵO(b(n))^{1-\epsilon}, then AA can be solved by replacing the oracle calls by corresponding runs of the algorithm, obtaining a runtime of O(a(n)1δ)O(a(n)^{1-\delta}) for AA for some δ>0\delta\gt0.

If Aa,bBA\equiv_{a,b}B, then we can not be able to improve a(n)a(n) and b(n)b(n) for AA and BB respectively, is the same.

Hardness from SETH

Orthogonal Vectors (OV) problem requires quadratic time under SETH.

OV problem: Let d=ω(logn)d=\omega(\log n); given two sets A,B{0,1}dA,B\subseteq\{0,1\}^d with A=B=n|A|=|B|=n, determine whether there exist aA,bBa\in A,b\in B s.t. ab=0a\cdot b=0 where ab=i=1da[i]]b[i]a\cdot b=\sum_{i=1}^da[i]]\cdot b[i].

kk-OV problem for constant k2k\ge2: Let d=ω(logn)d=\omega(\log n); given kk sets A1,,Ak{0,1}dA_1,\cdots,A_k\subseteq\{0,1\}^d with Ai=n|A_i|=n for all ii, determine whether there exist a1A1,,akAka_1\in A_1,\cdots,a_k\in A_k s.t. a1...ak=0a_1\cdot...\cdot a_k=0 where a1...ak=i=1dj=1kaj[i]a_1\cdot...\cdot a_k=\sum_{i=1}^d\prod_{j=1}^ka_j[i].

kk-OV can be solved in O(nkd)O(n^kd) time by exhaustive search, for any k2k\ge2. SOTA: nk1/Θ(log(d/logn))n^{k-1/\Theta(\log(d/\log n))}. It seems that nko(1)n^{k-o(1)} is necessary.

kk-OV Hypothesis: No randomized algorithm can solve kk-OV on instance of size nn in nkϵdO(1)n^{k-\epsilon}d^{O(1)} time for constant ϵ>0\epsilon\gt0.

kOV to CNF-SAT

🎯Theorem of reduction from kk-OV to CNFSATCNF-SAT: If kk-OV on sets with NN vectors from {0,1}m\{0,1\}^m can be solved in NkϵmO(1)N^{k-\epsilon}m^{O(1)} time for any ϵ>0\epsilon\gt0, then CNTSATCNT-SAT on nn variables and mm clauses can be solved in 2(1ϵ)nmO(1)2^{(1-\epsilon')n}m^{O(1)} time for some ϵ>0\epsilon'\gt0 and SETH is false.

kOV to Diameter probelm

kk-OV can also do fine-grained reduction to diameter problem.

图的直径:图中所有点对中的最长距离

🎯Theorem of reduction from kk-OV to Diameter problem. If one can distinguish between diameter 22 and 33 in an undirected unweighted graph with O(N)O(N) nodes and edges in O(N2ϵ)O(N^{2-\epsilon}) time for some ϵ>0\epsilon\gt0, then 22-OV on two sets of nn vectors in dd dimensions can be solved in n2ϵdO(1)n^{2-\epsilon}d^{O(1)} time and SETH is false.

Parameterized Complexity

Proposed by Rod Downey, Victoria University, New Zealand

Parameterized complexity:

  1. The input to the problem.
  2. The aspects of the input that constitute the parameter.
  3. The question.

A parameterized language is LΣ×ΣL\subseteq\Sigma^*\times\Sigma^* where we refer to the second coordinate as parameter.

For simplicity, we can think of LΣ×NL\subseteq\Sigma^*\times \N.

📖Definition of FPT. A parameterized language LL is fixed parameter tractable (FPT), iff there is a computable function ff, a constant cc, and a deterministic algorithm MM s.t.

x,k:x,kLM(x,k) accepts,\forall x,k:\lang x,k\rang\in L\Lrarr M(x,k)\text{ accepts},

and the running time of M(x,k)M(x,k) is f(k)xc\le f(k)|x|^c.

It’s not hard to see that f(k)xc=O(xc)+f(k)f(k)|x|^c=O(|x|^c)+f(k) for some computable ff.

Example: a parameterized version of Vertex Cover problem:

  • Instance: A graph G=(V,E)G=(V,E).
  • Parameter: A positive integer kk.
  • Question: Does GG have a vertex cover of size k\le k?

There is an algorithm running in time O(1.2738k+kn)O(1.2738^k+kn).

So in this problem, we have f(k)=1.2738kf(k)=1.2738^k. Introduce OO^* notation which ignores f(k)f(k) be it additive or multiplicative and is only concerned with the exponential part. Thus the algorithm is O(n1)O^*(n^1).

Bounded Search Trees

Some optimized methods.

Kernelization

📖Definition of Kernelization. Let LΣ×ΣL\subseteq\Sigma^*\times\Sigma^* be a parameterized language. A reduction to a problem kernel, or kernelization, comprises replacing an instance (I,k)(I,k) by a reduced instance (I,k)(I',k'), called a problem kernel, such that

  1. kkk'\le k
  2. Ig(k)|I'|\le g(k), for some function gg depending only on kk.
  3. (I,k)L(I,k)L(I,k)\in L\Lrarr(I',k')\in L.

The reduction from (I,k)(I,k) to (I,k)(I',k') must be computable in time polynomial in I+k|I|+|k|.

Reduction rules for a kernel for Vertex Cover:

  1. Remove all isolated vertices.
  2. For any degree one vertex vv, add its single neighbor uu to the solution set and remove uu and all of its incident edges from the graph.
  3. If there is a vertex vv of degree at least k+1k+1, add vv to the solution set and remove vv and all of its neighbors.

After applying these rules, we get to a graph (G,k)(G',k'), where no vertex in the reduced graph has degree greater than kkk'\le k, or less than two. Then simple combinatorics shows that if such a reduced graph has a size kk vertex cover, its must have size k2\le k^2. This is the size k2k^2 kernelization.

Lower bounds for some W[1]-hard Problems

Chen et.al.: “Tight lower bounds for certain parameterized NP-hard problems” (original paper), Section 4.

The class SNPSNP contains many NPNP-hard problems including qq-SAT, qq-Colorability, qq-Set Cover, Vertex Cover, and Independent Set.

It is commonly believed that it is unlikely that all problems in SNPSNP are solvable in sub-exponential time.

🎯Theorem (Vertex Cover reduction has lower bound). Given an instance (G,k)(G,k) of Vertex Cover, there is a polynomial time algorithm which either reports that GG doesn’t have a vertex cover of size kk, or produces a subgraph GG' of GG with at most 2k2k' vertices, where kkk'\le k, such that GG has a vertex cover of size kk iff GG' has a vertex cover of size kk'.

🎯Theorem of Independent set poly-time solvable hypothesis. If the parameterized Independent Set problem can be solved in time nO(k)n^{O(k)}, where nn is the number of vertices in the graph, then all problems in SNPSNP can be solved in sub-exponential time.

🎯Theorem of clique poly-time solvable hypothesis. If Clique, Weight qq-SAT, Dominating Set, Dominating Clique, or Graph kk-Cut can be solved in time nO(k)n^{O(k)} then all the problems in SNPSNP can be solved in sub-exponential time, where nn is the size of the universal set from which the kk elements are to be selected.