Recall the Traveling Salesman Problem:
Definition
Traveling Salesman Problem
Input: A set of distinct cities {c1,c2,…,cn} and for each pair ci=cj the distance between ci and cj, denoted by d(ci,cj), and a budget k.
Question: Determine if there is a permutation π of {1,2,…,n}, such that the following sum:
∑i=1n−1d(cπ(i),cπ(i+1))+d(cπ(n),cπ(1))
is at most k.
The dynamic programming algorithm for TSP computes for every pair (S,ci), where S is a nonempty subset of {c2,c3,…,cn} and ci∈S, the value OPT[S,ci] which is the minimum length of a tour which starts in c1, visits all cities from S and ends in ci. We compute the values OPT[S,ci] in order of increasing cardinality of S. The computation of OPT[S,ci] in the case S contains only one city is trivial, because in this case, OPT[S,ci]=d(c1,ci). For the case ∣S∣>1, observe that if in some optimal tour in S terminating in ci, the city cj immediately precedes ci, then
OPT[S,ci]=OPT[S∖{ci},cj]+d(cj,ci).
This leads us to expressing the value of OPT[S,ci] in terms of subsets of S as follows.
OPT[S,ci]=min{OPT[S∖{ci},cj]+⋆:cj∈S∖{ci}}.
Note that the minimum is taken over cj∈S∖{ci}. What is the missing term?