Cody

# Problem 1339. Travelling Salesman Problem (TSP)

Solution 1770388

Submitted on 2 Apr 2019
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

### Test Suite

Test Status Code Input and Output
1   Fail
x = [8.2 -6.9 3.2 -9.5 15.5 0.3 -4.9 7.6 4.5 -7.1 6.5 -7.5 5.6 -0.5] + i*[-4.4 3.8 7.7 -8 -1.9 16.5 2.3 6.8 6.6 -1.6 -1.2 5.5 -9.3 8.9]; tic; y = TSP(x); T1 = 1e4*toc; L1 = sum(abs(diff(y))); S = calculateSize('tsp.m') assert(isequal(sort(y),sort(x))) % Test 2 x = 10*sin(primes(200))+10i*cos(primes(200)); tic; y = TSP(x); T2 = 1e6*toc L2 = sum(abs(diff(y))) assert(isequal(sort(y),sort(x))) % Test 3 x = [75.5 5.43 94.73 3.89 .37 42.38 -8.5 36.72 .54 .02 83.27 47]; tic; y = TSP(x(randperm(12))); T3 = 1e5*toc; L3 = sum(abs(diff(y))); assert(isequal(sort(y),sort(x))) assignin('caller','score',round(S +T1+L1 +T2+L2 +T3+L3));

Undefined function 'calculateSize' for input arguments of type 'char'. Error in Test1 (line 6) S = calculateSize('tsp.m')