
Courcelle's theorem states that there exists an algorithm that takes as input a graph G of treewidth at most t and a MSO formula ϕ, and determines whether G satisfies ϕ in time f(ϕ,t) · n. It is folklore that the the function f contains a tower of exponentials whose height depends as a linear function of the number of quantifier alternations of the input formula ϕ. A classic reduction of Frick and Grohe shows that, assuming the Exponential Time Hypothesis (ETH), the linear growth of the height of the tower is unavoidable. Nevertheless, there is still a huge gap between existing upper and lower bounds – after all, there is quite a difference between a single exponential and a double exponential running time. In addition, this only gives us a very coarse understanding in the time complexity of Courcelle's theorem. In this paper, we prove a fine-grained version of Courcelle's theorem with nearly ETH-tight dependence on the treewidth parameter t and the quantifier structure of ϕ (specifically, the number of first order and second order variables in each quantifier alternation block).
In the streaming set cover problem, m sets from a universe of size n are arriving one by one in a stream, and the algorithm is allowed to process the stream using one or a few passes and a space of o(mn), which is sublinear in the input size. The goal is to determine the minimal (or approximately minimal) number of sets that cover the universe at the end of the last pass. This problem has been studied extensively over the years with rapid progress that led to several O(logn)-approximation algorithms in Õ(mn^1/p) space and O(p) passes. However, progress on this front has largely stagnated over the past decade, despite the absence of any lower bounds that rule out even an O(logn)-approximation in O(m) space and just two passes. We provide a simple explanation for this lack of progress by establishing an optimal three-way space-pass-approximation tradeoff for this problem: any α-approximation algorithm for streaming set cover requires (m/α·(n/α)^1/p) space in p passes whenever α≪ n^1/(p+1). In light of prior work, this result is optimal up to constant factors in p and logarithmic factors in n,m for any α≥ p. Our bound is optimal with respect to the range of α also, and fully settles the complexity of this fundamental problem in the streaming model. The proof of this result is (surprisingly) simple and non-technical and relies on a randomized reduction from a variant of the standard pointer chasing problem in communication complexity, using elementary properties of random sets.