  Partitioning oracles were introduced by Hassidim et al. (FOCS 2009) as a
generic tool for constant-time algorithms. For any epsilon > 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/epsilon), and the
number of edges removed is at most epsilon*n, where n is the number of vertices
in the graph.
  However, the oracle of Hassidimet 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/epsilon)) 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/epsilon)-time property testing algorithms for membership in these
classes of graphs. Another application of the oracle is a poly(1/epsilon)-time
algorithm that approximates the maximum matching size, the minimum vertex cover
size, and the minimum dominating set size up to an additive epsilon*n in graphs
with bounded treewidth. Finally, the oracle can be used to test in
poly(1/epsilon) time whether the input bounded-treewidth graph is k-colorable
or perfect.
