Skip to main content

mathematical optimization - Unexpected slowness of FindShortestTour through 9 points


This a very useful function, but it is very slow:


FindShortestTour[{{0, 0}, {0.2`, 0}, {2, 1}, {2, 2}, {2, 2.5`}, {1.5`,
6}, {1.6`, 7}, {1.4`, 8}, {1.9`, 10}}]; // AbsoluteTiming



{1.80721, Null}



I tested just 9 points, which cost me almost $2s$. I think there is a bug is behind this behavior. So I reported to Wolfram Support (CASE:3847386), but I received a response like:



Thank you for contacting Wolfram Technical Support.


I followed your example and evaluated it on my machine:


FindShortestTour[{{0, 0}, {0.2`, 0}, {2, 1}, {2, 2}, {2, 2.5`}, {1.5`, 6}, {1.6`, 7}, 
{1.4`, 8}, {1.9`, 10}}]; // AbsoluteTiming
(* {0.0847348,Null} *)


Please consider resetting Mathematica and see if the issue can be resolved.



My processor is a Intel® Core™ i5-6500 Processor, and when I run Needs["Benchmarking`"]; Benchmarking`BenchmarkReport[], my system scored $1.29$ WolframMark points. Many time show it is a very low efficency function:


Table[
First[
FindShortestTour[
{{0, 0}, {0.2`, 0}, {2, 1}, {2, 2}, {2, 2.5`}, {1.5`, 6}, {1.6`, 7},
{1.4`, 8}, {1.9`, 10}}]; // AbsoluteTiming
],

5
]


{2.43196,2.01361,2.37832,1.97023,1.78632}



I would like to confirm whether some bug in this function is causing this behavior.




Update


This is a regression of version 11.0, and just on Windows:



test on windows


enter image description here


test on mac


enter image description here


test on linux


enter image description here




Comments