TSP問題を動的計画法で解くソースコードを示せ。変数dfにはx座標とy座標のデータが入っており、pulpを使用する。

`def tsp(df): N = len(df) d = [[0]*N for i in range(N)] for i in range(N): for j in range(N): if i == j: continue d[i][j] = np.linalg.norm(df[i]-df[j]) m = pulp.LpProblem('tsp', pulp.LpMinimize) x = [[pulp.LpVariable('x({},{})'.format(i,j), cat='Binary') for j in range(N)] for i in range(N)] m += pulp.lpSum(d[i][j]*x[i][j] for i in range(N) for j in range(N)) for i in range(N): m += pulp.lpSum(x[i][j] for j in range(N)) == 1 m += pulp.lpSum(x[j][i] for j in range(N)) == 1 m += pulp.lpSum(x[`