views:

80

answers:

1

I ran into the following algorithmic problem while experimenting with classification algorithms. Elements are classified into a polyhierarchy, what I understand to be a poset with a single root. I have to solve the following problem, which looks a lot like the set cover problem.

I uploaded my Latex-ed problem description here.

Devising an approximation algorithm that satisfies 1 & 2 is quite easy, just start at the vertices of G and "walk up" or start at the root and "walk down". Say you start at the root, iteratively expand vertexes and then remove unnecessary vertices until you have at least k sub-lattices. The approximation bound depends on the number of children of a vertex, which is OK for my application.

Does anyone know if this problem has a proper name, or maybe the tree-version of the problem? I would be interested to find out if this problem is NP-hard, maybe someone has ideas for a good NP-hard problem to reduce or has a polynomial algorithm to solve the problem. If you have both collect your million dollar price. ;)

+3  A: 

The DAG version is hard by (drum roll) a reduction from set cover. Set k = 2 and do the obvious: condition (2) prevents us from taking the root. (Note that (3) doesn't actually imply (2) because of the lower bound k.)

The tree version is a special case of the series-parallel poset version, which can be solved exactly in polynomial time. Here's a recursive formula that gives a polynomial p(x) where the coefficient of xn is the number of covers of cardinality n.

Single vertex to be covered: p(x) = x.

Other vertex: p(x) = 1 + x.

Parallel composition, where q and r are the polynomials for the two posets: q(x) r(x).

Series composition, where q is the polynomial for the top poset and r, for the bottom: If the top poset contains no vertices to be covered, then p(x) = (q(x) - 1) + r(x); otherwise, p(x) = q(x).

Good observation with (3) does not imply (2), I totally missed that. Changed in the problem statement. For the rest I guess I need one night of sleep first, thank you for your answer!
dareios
The reduction is easy indeed, don't know why I couldn't do it yesterday. Thanks!
dareios
For the tree-version recursion formula: If I have a single vertex to be covered, I have p(x)=x as you say, as there is only one cover. For no vertexes to be covered we should have p(x)=1 (as the cover is empty). I don't understand when the "Other vertex: p(x)=1+x" polynomial is applied. Also, I don't understand when the "top poset contains no vertices" (to be covered) applies: The top poset will always contain the other posets so if it doesn't contain vertexes to be covered, the other posets won't either. Maybe the >= k restriction on the minimum property comes into play here?
dareios
It's 1 + x because you didn't demand that each vertex in the cover actually cover anything, so you have a choice of whether to include it. If the (sub-)tree root has to be covered, then you have to put it in and leave all of its proper descendants out.