0

i am trying to develop a web application using HTML, PHP, and java script and i will include the Traveling salesman problem. should i use python for implementation or stick to java script? and what is the difference between them? which one is less complicated?

3 Answers3

1

This ultimately depends on which language you prefer coding it in. If you have much more experience in Python go with that if not stick to JavaScript. If you want a fast algorithm for traveling salesman. I think JavaScript is a lot more faster than Python. This also depends on what algorithm you implement. If you want an easy algorithm to code I would recommend the nearest neighbor algorithm. You can check out more algorithms here if you'd like to know more about that. https://en.wikipedia.org/wiki/Travelling_salesman_problem.

Victor
  • 117
  • 1
  • 3
  • 10
0

Traveling salesman is not an easy problem to solve efficiently. Luckily, Google, in its wisdom, has a robust implementation: https://developers.google.com/optimization/routing/tsp. So use that.

Igor Rivin
  • 4,632
  • 2
  • 23
  • 35
0

Adding additional languages to your application adds more complexity to your project. You already have two programming languages and a markup language in your project. Use javascript if you want to solve the problem on the client, or use php if you want to solve the problem on the server. If python is your language of choice, you can serve webpages from a python framework like flask instead of apache/php.

Charlie Bamford
  • 1,268
  • 5
  • 18