# Capacitated minimum spanning tree

Capacitated minimum spanning tree is a minimal cost spanning tree of a graph that has a designated root node ${\displaystyle r}$ and satisfies the capacity constraint ${\displaystyle c}$. The capacity constraint ensures that all subtrees (maximal subgraphs connected to the root by a single edge) incident on the root node ${\displaystyle r}$ have no more than ${\displaystyle c}$ nodes. If the tree nodes have weights, then the capacity constraint may be interpreted as follows: the sum of weights in any subtree should be no greater than ${\displaystyle c}$. The edges connecting the subgraphs to the root node are called gates. Finding the optimal solution is NP-hard.[1]

## Algorithms

Suppose we have a graph ${\displaystyle G=(V,E)}$, ${\displaystyle n=|G|}$ with a root ${\displaystyle r\in G}$. Let ${\displaystyle a_{i}}$ be all other nodes in ${\displaystyle G}$. Let ${\displaystyle c_{ij}}$ be the edge cost between ver ${\displaystyle a_{i}}$ and ${\displaystyle a_{j}}$ which form a cost matrix ${\displaystyle C={c_{ij}}}$.

### Esau-Williams heuristic[2]

Esau-Williams heuristic finds suboptimal CMST that are very close to the exact solutions, but on average EW produces better results than many other heuristics.

Initially, all nodes are connected to the root ${\displaystyle r}$ (star graph) and the network's cost is ${\displaystyle \displaystyle \sum _{i=0}^{n}c_{ri}}$; each of these edges is a gate. At each iteration, we seek the closest neighbor ${\displaystyle a_{j}}$ for every node in ${\displaystyle G-{r}}$ and evaluate the tradeoff function: ${\displaystyle t(a_{i})=g_{i}-c_{ij}}$. We look for the greatest ${\displaystyle t(a_{i})}$ among the positive tradeoffs and, if the resulting subtree does not violate the capacity constraints, remove the gate ${\displaystyle g_{i}}$ connecting the ${\displaystyle i}$-th subtree to ${\displaystyle a_{j}}$ by an edge ${\displaystyle c_{ij}}$. We repeat the iterations until we can not make any further improvements to the tree.

Esau-Williams heuristics for computing a suboptimal CMST:

function CMST(c,C,r):
T = {${\displaystyle c_{1r}}$, ${\displaystyle c_{2r}}$, ..., ${\displaystyle c_{nr}}$}
while have changes:
for each node ${\displaystyle a_{i}}$
${\displaystyle a_{j}}$ = closest node in a different subtree
${\displaystyle t(a_{i})}$ = ${\displaystyle g_{i}}$ - ${\displaystyle c_{ij}}$
t_max = max(${\displaystyle t(a_{i})}$)
k = i such that ${\displaystyle t(a_{i})}$ = t_max
if ( cost(i) + cost(j) <= c)
T = T - ${\displaystyle g_{k}}$
T = T union ${\displaystyle c_{kj}}$
return T


It is easy to see that EW finds a solution in polynomial time.

### Sharma's heuristic

Sharma's heuristic.[3]

## Applications

CMST problem is important in network design: when many terminal computers have to be connected to the central hub, the star configuration is usually not the minimum cost design. Finding a CMST that organizes the terminals into subnetworks can lower the cost of implementing a network.

## References

1. ^ Jothi, Raja; Raghavachari, Balaji (2005), "Approximation Algorithms for the Capacitated Minimum Spanning Tree Problem and Its Variants in Network Design", ACM Trans. Algorithms, 1 (2): 265–282, doi:10.1145/1103963.1103967
2. ^ Esau, L.R.; Williams, K.C. (1966). "On teleprocessing network design: Part II. A method for approximating the optimal network". IBM Systems Journal. 5 (3): 142–147. doi:10.1147/sj.53.0142.
3. ^ Sharma, R.L.; El-Bardai, M.T. (1977). "Suboptimal communications network synthesis". In Proc. Of International Conference on Communications: 19.11–19.16.