Algorithms for clustering a rooted tree

295 Views Asked by At

I want to cluster a rooted tree. The all possible cluster formation can be explained by the following figure. Is there exist any algorithm that can generate all possible cluster as shown from a given tree? enter image description here

Note that, each of the clusters must contain the nodes with degree of unity, and there exist atmost one vertex of the subtree, whoose degree is not equal to the degree of the same vertex in the original tree.

1

There are 1 best solutions below

3
On BEST ANSWER

Proposed rule set for making a cluster:

  • choose a focus node
  • remove the edge that leads to the root (doesn't apply if focus node is root node)
  • optionally remove other edges as desired from the focus node, except that this step may not remove the last edge.
  • the remaining connected component that includes the focus node is a cluster.

The total number of clusters then will be the number of leaf nodes $l$, plus the count of valid pruning options across non-root branch nodes $\{B\}$, plus the pruning options for the root node $r$. It's unclear whether in the case where the root node is a leaf, that node alone is a cluster. The below formula for the count of clusters assumes that it is:

$$l+\sum_{v\in B} \left(2^{\,d(v)-1)}-1\right) + (2^{d(r)}-1)$$

(where $d()$ is the degree of that vertex)