  The process of drawing electoral district boundaries is known as political
redistricting. Within this context, gerrymandering is the practice of drawing
these boundaries such that they unfairly favor a particular political party,
often leading to unequal representation and skewed electoral outcomes. One of
the few ways to detect gerrymandering is by algorithmically sampling
redistricting plans. Previous methods mainly focus on sampling from some
neighborhood of ``realistic' districting plans, rather than a uniform sample of
the entire space. We present a deterministic subexponential time algorithm to
uniformly sample from the space of all possible $ k $-partitions of a bounded
degree planar graph, and with this construct a sample of the entire space of
redistricting plans. We also give a way to restrict this sample space to plans
that match certain compactness and population constraints at the cost of added
complexity. The algorithm runs in $ 2^{O(\sqrt{n}\log n)} $ time, although we
only give a heuristic implementation. Our method generalizes an algorithm to
count self-avoiding walks on a square to count paths that split general planar
graphs into $ k $ regions, and uses this to sample from the space of all $ k
$-partitions of a planar graph.
