# What problem is this clingy, stretchy string problem related to?

Say we have a collection of functions $f_i(t) \in \mathbb{R}^2$ with $0\leq t \leq1$, where we've fixed the endpoints $f_i(0)$ and $f_i(1)$. Say we want to minimize some energy corresponding to the length of these curves, like $E_0=\frac{1}{2}k \sum_i \int_0^1 dt\,|f_i'(t)|^2$, but there's also a non-smooth potential which favors the string clinging together to minimize their surface energy. Something like $E_1=c\sum_{i,j}\int dt\,dt'\,\mathbf{1}(f_i(t)=f_j(t'))$. The problem is... for some collection of endpoints $(f_0(0),f_0(1)), (f_1(0),f_1(1)), ..., (f_n(0),f_n(1))$, what $f$'s minimize this energy? In the absence of the clingy potential, the functions should all be straight lines, but with the clingy potential, they would seem to form some kind of graph. My first approach would be to start by minimizing $E_0$ by having a bunch of straight lines, and then, focusing on points where the lines cross, add pairs of points where the two strings join and then separate, and then try to minimize the energy by moving these knots around. I don't know if this would guarantee that I'd find a minimum though! Does such a problem seem familiar to anyone? Thanks!