For a project that I am working on, I should generate random spanning trees with bounded height.
Basically I do the following: 1) Generate a spanning tree 2) Check the feasibility, if feasible keep it.
1) Starting from a minimum spanning tree (Prim's or Kruskal's) I add a non-existing edge and this creates a cycle, I detect this cycle and remove one of the edges of this cycle that gives me a new spanning tree and I continue with this spanning tree by adding a new edge...
2) Suppose there is a special vertex $v_{center}$. For every vertex $v$, the length of the path from $v$ to $V_{center}$ should be less then $\delta$, where $\delta$ is a given parameter.
Is there any better(clever) way of doing this?
P.S. I forgot to specify the other constraint (my mistake): the degree of the vertices should also be bounded.