Hacker News new | ask | show | jobs
by dljsjr 5228 days ago
Only using naive algorithms. You can get it down to 2^n time complexity by increasing the space complexity and applying dynamic programming techniques.

https://en.wikipedia.org/wiki/Travelling_salesman_problem#Ex...

2 comments

Just like the article I didn't say anything about space or time complexity, only about the number of combinations (permutations) of visiting N destinations. That number is constant regardless of how sophisticated your algorithm is :-)
I always find it funny when 2^n is viewed as 'good news'. I realize it's better than the other options, but it still feels like a doctor saying great news you've got cancer!