2

Saw it on another post that there is a way of solving FVS in polynomial time if the treewidth is constant, using dynamic programming?...

If I'm given the treewidth of a graph, how do I solve it in time $tw^{O(tw)}\cdot n^{O(1)}$ ?

thank you very much!

Tami H
  • 39
  • 3

1 Answers1

3

I assume you already know how to obtain a tree decomposition. Make the underlying tree directed by picking an arbitrary node as the root.

For a node $t$ of the tree decomposition, let $b(t)$ be the bag at $t$ and $G(t)$ the subgraph of the input graph induced by the bags in the subtree rooted at $t$.

In a bottom-up fashion you compute, for all tree nodes $t$ and all $m\leq n$, the following: The set of all $(P,S)$, such that

  • $S$ is a subset of $b(t)$
  • $P$ is a partition of $b(t)\setminus S$
  • there is a FVS $F$ of $G(t)$ of size $m$ such that
    • $F\cap b(t)=S$
    • for $v,w\in b(t)\setminus S$, they are in the same connected component of $G(t)-F$ if and only if they are in the same part of $P$

So in essence you compute all possible FVSs for subgraph of the form $G(t)$, but at every bag you apply data compression such that you only know how the FVSs interact with the bag.

The running time per $t$ and $m$ is polynomial in the number of possibilities for $(P,S)$. Let $k:=|b(t)|=O(tw)$. The number of possibilities for $S$ can be bounded by $2^k$. For the number of partitions, let us use the crude bound $2^k\cdot k!$. (It can be established as follows: For a partition of $b(t)$, choose an arbitary order of $b(t)$ such that each part of the partition is contiguous wrt. the order. Then, the partition can be retrieved from the order if we know, for each element of $b(t)$, whether the next element is in the same part of the partition or not.) Thus, the overall running time is $$O(n^2)\cdot(2^{O(tw)}\cdot 2^{O(tw)}\cdot {O(tw)}!)^{O(1)} = tw^{O(tw)}\cdot n^{O(1)}$$

kne
  • 2,358
  • 9
  • 17