# Bellman-Held-Karp algorithm for solving the traveling salesman problem

Page 1 of 1

## 0 Replies - 874 Views - Last Post: 14 June 2016 - 04:02 AM

### #1 somecoder

• New D.I.C Head

Reputation: 0
• Posts: 29
• Joined: 04-March 16

# Bellman-Held-Karp algorithm for solving the traveling salesman problem

Posted 14 June 2016 - 04:02 AM

Hi, so as the title of the topic says, i have some problems regarding the traveling salesman problem.

I can calculate the empty sets and other combinations as well but,

In each step we also have to take care of p

according to wikipedia :
p(x, S) - the second-to-last vertex to x from set S. Used for constructing the TSP path back at the end.

So my question how do we determine the p?

At one point i thought that p could be the next node with the least cost of all the possible
outcomes

however some other examples made me doubt my conclusion,

I'd be happy if someone can clear this part of the algorithm for me!

thanks!

Is This A Good Question/Topic? 0

Page 1 of 1

 .related ul { list-style-type: circle; font-size: 12px; font-weight: bold; } .related li { margin-bottom: 5px; background-position: left 7px !important; margin-left: -35px; } .related h2 { font-size: 18px; font-weight: bold; } .related a { color: blue; }