Suppose I have 3 kinds of restrictions to computing a spanning tree:
- Constrained degree (eg: a node in a spanning tree may only be connected up to 3 other nodes)
- Bounded diameter (eg: all edges'
weights, once summed, cannot exceed
100).
2.1. If possible, show all subtrees that meet this criteria. - Both
Are there any good algorithms to solve this that aren't gonna drive me insane? I'm gonna have to run this with rather large inpputs (1000+ nodes), so its complexity can't be too high either.