<p>There is no way to choose the parameters A, B, C, D properly; 
as it is the case for most heuristics, the parameters are chosen ''by experience''. 
Worse, there is no guarantee that the solution (the array of the outputs) 
of this heuristic is indeed a feasible TSP tour! </p>

<p>In this context, perhaps interesting to read: Wilson and Pawley, 
<a href="http://link.springer.com/article/10.1007/BF00363956">On the stability of the Travelling Salesman Problem 
algorithm of Hopfield and Tank</a>, 
Biological Cybernetics 58 (1988) 63-70.  </p>

<p>To your first comment: I don't think that this TSP energy function is useful for practical purposes. 
If you want to solve TSP in practice, maybe <a href="http://www.math.uwaterloo.ca/tsp/">here</a> 
is the right starting point.</p>

CC BY-SA 3.0
2013-07-13T08:25:30.260Z
2013-07-13T08:25:30.260Z
vb le
<p>[This question was initially asked <a href="https://stats.stackexchange.com/questions/63489/parameters-of-energy-function-for-tsp">here</a>. It went unanswered so I thought I should ask it in a different community.]</p>

<p>I am reading <a href="http://www.genomics.princeton.edu/hopfield/PDFs/TSP.pdf" rel="nofollow noreferrer">this paper</a> by Hopfield et al. On page six, the authors defined the energy function of the Traveling-Salesman-Problem (TSP) mapped onto an artificial neural network as follows:</p>

<p>$$E = \frac{A}{2} \sum_X \sum_i \sum_{j \ne i} V_{Xi} V_{Xj} + \frac{B}{2} \sum_i \sum_X \sum_{X\ne Y} V_{Xi} V_{Yi} + \frac{C}{2} (\sum_X \sum_i V_{Xi} - n)^2 + \frac{1}{2D} \sum_X \sum_{Y\ne X} \sum_i d_{XY} V_{Xi} (V_{Y, i+1} + V_{Y, i-1})$$ </p>

<p>Here the first three terms maintain correctness of the function while the final term calculate actual distance of the tour. Later on page seven, the authors picked the values of A, B, C and D for simulation.</p>

<p>I don't understand on what basis they choose those values. Any help?</p>

CC BY-SA 3.0
2013-07-12T14:32:04.800Z
Pretty much arbitrarily.
Mahdi Cheraghchi
CC BY-SA 3.0
2013-07-12T14:37:30.720Z
@MCH If arbitrarily how can we use it for practical purposes?
Omar Shehab
CC BY-SA 3.0
2013-07-12T21:44:14.570Z
When it comes to heuristics, we care more about whether things work rather than why.
Mahdi Cheraghchi
CC BY-SA 3.0
2013-07-13T05:53:41.297Z
@MCH, I am afraid I don't get it yet. Why didn't Hopfield just defined A, B and C to be 2's so that we could get rid of the fractions?
Omar Shehab
CC BY-SA 3.0
2013-07-14T12:49:10.663Z
if you are taking derivatives of degree two polynomials it is useful to have $1/2$ to make computations simpler.
Kaveh
CC BY-SA 3.0
2013-07-14T13:37:13.910Z
@Kaveh, when we implement this expression, do we take derivatives at any point?
Omar Shehab
<machine-learning><ne.neural-evol><tsp><statistical-physics>
Parameters of energy function for TSP
Omar Shehab
# Parameters of energy function for TSP

(Asked by: username_0 on 2013-07-12)

[This question was initially asked [here](https://stats.stackexchange.com/questions/63489/parameters-of-energy-function-for-tsp). It went unanswered so I thought I should ask it in a different community.]

I am reading [this paper](http://www.genomics.princeton.edu/hopfield/PDFs/TSP.pdf) by Hopfield et al. On page six, the authors defined the energy function of the Traveling-Salesman-Problem (TSP) mapped onto an artificial neural network as follows:

$$E = \frac{A}{2} \sum\_X \sum\_i \sum\_{j \ne i} V\_{Xi} V\_{Xj} + \frac{B}{2} \sum\_i \sum\_X \sum\_{X\ne Y} V\_{Xi} V\_{Yi} + \frac{C}{2} (\sum\_X \sum\_i V\_{Xi} - n)^2 + \frac{1}{2D} \sum\_X \sum\_{Y\ne X} \sum\_i d\_{XY} V\_{Xi} (V\_{Y, i+1} + V\_{Y, i-1})$$

Here the first three terms maintain correctness of the function while the final term calculate actual distance of the tour. Later on page seven, the authors picked the values of A, B, C and D for simulation.

I don't understand on what basis they choose those values. Any help?

**Tags:** machine-learning, ne.neural-evol, tsp, statistical-physics

> **Comments:**
> **username_1**: Pretty much arbitrarily.  
> **username_0**: @MCH If arbitrarily how can we use it for practical purposes?  
> **username_1**: When it comes to heuristics, we care more about whether things work rather than why.  
> **username_0**: @MCH, I am afraid I don't get it yet. Why didn't Hopfield just defined A, B and C to be 2's so that we could get rid of the fractions?  
> **username_2**: if you are taking derivatives of degree two polynomials it is useful to have $1/2$ to make computations simpler.  
> **username_0**: @username_2, when we implement this expression, do we take derivatives at any point?  

---

## 1 answers

### Answer by username_3 on 2013-07-13. Score: 10 | Accepted answer

There is no way to choose the parameters A, B, C, D properly;
as it is the case for most heuristics, the parameters are chosen ''by experience''.
Worse, there is no guarantee that the solution (the array of the outputs)
of this heuristic is indeed a feasible TSP tour!

In this context, perhaps interesting to read: Wilson and Pawley,
[On the stability of the Travelling Salesman Problem
algorithm of Hopfield and Tank](http://link.springer.com/article/10.1007/BF00363956),
Biological Cybernetics 58 (1988) 63-70.

To your first comment: I don't think that this TSP energy function is useful for practical purposes.
If you want to solve TSP in practice, maybe [here](http://www.math.uwaterloo.ca/tsp/)
is the right starting point.


---

