I have a problem that I'm struggling to solve or even name, I'd really appreciate any help or pointer to potential existing solutions.
Suppose there is a connected graph $G$ and we are trying to find a spanning tree $M^*$ with the following property. Let $D_M(v)$ be the degree of node $v$ in an arbitrary tree $M$. The solution $M^*$ satisfies:
$M^* = \arg \min_M \sum_{(ij)\in M} C_{ij}$ where $C_{ij} = c_{ij} + f(D_M(i),D_M(j))$ and is spanning ($V\subset M$).
Thus, this can be viewed as a "MST" where the cost of any edge depends on the degrees of the conneted nodes.
For the main case that I'm interested in, let
$$f = \beta \cdot \mathbf{1}\{\max(\text{deg}(i), \text{deg}(j)) > k \},$$
so there's essentially a cost $\beta$ for having an edge coming out of a node with more than $k$ connections. If I can solve this for $k=2$ I'd be very happy.
Added context: This problem is formulated to model a telecommunication network where the network planner tries to connect a hub to nodes. The cost $\beta$ captures "relay" cost: the network incurs $\beta$ if a path is split at a node (e.g. a Y-path would cost more than an L-path, all else equal). For intuition, $\beta \to \infty$ would eventually have the solution be a Hamiltonian path (as pointed out below, we only need $\beta >> |V|$. We want to solve this problem for a general $\beta$.