The cost function to be minimized is: $$ L[n] = \sum_{i\lt j}{d_{ij}n_{ij}} + \frac{\gamma}{2}\sum_{i}{(1-\sum_{j}{n_{ij}})^2} $$ where \( d_{ij} \) is the distance between points \( i \) and \( j \), and \( n_{ij} \) denotes the link or edge between points \( i \) and \( j \). $$ \Delta L[n] = ( d_{ij} - \gamma + \gamma \sum_{k\ne j}{n_{ik}+\gamma\sum_{k\ne i}{n_{jk}}})\Delta n_{ij} $$ Input nodes
Weighted matched pairs