$\newcommand{\eps}{\varepsilon}\newcommand{\poly}{\operatorname{poly}}$ Abstract: Partitioning oracles were introduced by Hassidim et al. (FOCS 2009) as a generic tool for constant-time algorithms. For any $\eps > 0$, a partitioning oracle provides query access to a fixed partition of the input bounded-degree minor-free graph, in which every component has size $\poly(1/\eps)$, and the number of edges removed is at most $\eps n$, where $n$ is the number of vertices in the graph.
However, the oracle of Hassidim et al. makes an exponential number of queries to the input graph to answer every query about the partition. In this paper, we construct an efficient partitioning oracle for graphs with constant treewidth. The oracle makes only $O(\poly(1/\eps))$ queries to the input graph to answer each query about the partition.
Examples of bounded-treewidth graph classes include $k$-outerplanar graphs for fixed $k$, series-parallel graphs, cactus graphs, and pseudoforests. Our oracle yields $\poly(1/\eps)$-time property testing algorithms for membership in these classes of graphs. Another application of the oracle is a $\poly(1/\eps)$-time algorithm that approximates the maximum matching size, the minimum vertex cover size, and the minimum dominating set size up to an additive $\eps n$ in graphs with bounded treewidth. Finally, the oracle can be used to test in $\poly(1/\eps)$ time whether the input bounded-treewidth graph is $k$-colorable or perfect.