Author Topic: Travelling Salesman Problem (TSP)  (Read 1340 times)

skyblue2779

  • Newbie
  • *
  • Posts: 1
Travelling Salesman Problem (TSP)
« on: August 20, 2011, 03:50:49 am »
Write a C program to solve the instance of Travelling Salesman Problem (TSP) as
shown Table 1.
Measure the time taken to execute this algorithm and plot a time versus n
cities; from n = 2 until 14. Iteratively increase the number of cities by
following alphabetical order.

**Can i hv somebody to help me solved this prob out..


Alor SetarIpohJBKelantanKuatanKLMelakaMersingPenangPerlisSerembanSGTerengganuTemerloh
Alor Setar023577135663643257670211274509790498555
Ipoh2350541342405202346562153303279560481325
JB771541078736033622113169184127221536462
Kelantan3563427870365461592598339425525806206410
Kuantan6364053603650254256197592742318379177140
KL432202336461254013635635350268350414136
Melaka576346221592256136023149564575230430167
Mersing7925621315981973562310711881292148411313
Penang1121536913395923534957110183430711483474
Perlis743038414257425026458611830579860568624
Seremban50927927252531868752924305790294476200
SG790560218063793502301487118602940554481
Terengganu4984815362061774144304114835684765540301
Temerloh5553254624101401361673134746242004813010


kathir

  • Administrator
  • Sr. Member
  • *****
  • Posts: 283
Re: Travelling Salesman Problem (TSP)
« Reply #1 on: August 25, 2011, 07:34:53 am »
Hi,

The following solution is the fastest solution, would take less than a second to come up with the solution. However it may not be the efficient solution.

http://www.softwareandfinance.com/Visual_CPP/Travelling_Salesman_Solution.html

- Kathir

Write a C program to solve the instance of Travelling Salesman Problem (TSP) as
shown Table 1.
Measure the time taken to execute this algorithm and plot a time versus n
cities; from n = 2 until 14. Iteratively increase the number of cities by
following alphabetical order.

**Can i hv somebody to help me solved this prob out..


Alor SetarIpohJBKelantanKuatanKLMelakaMersingPenangPerlisSerembanSGTerengganuTemerloh
Alor Setar023577135663643257670211274509790498555
Ipoh2350541342405202346562153303279560481325
JB771541078736033622113169184127221536462
Kelantan3563427870365461592598339425525806206410
Kuantan6364053603650254256197592742318379177140
KL432202336461254013635635350268350414136
Melaka576346221592256136023149564575230430167
Mersing7925621315981973562310711881292148411313
Penang1121536913395923534957110183430711483474
Perlis743038414257425026458611830579860568624
Seremban50927927252531868752924305790294476200
SG790560218063793502301487118602940554481
Terengganu4984815362061774144304114835684765540301
Temerloh5553254624101401361673134746242004813010

 


Disclaimer: This web site is for educational and informational purposes only. Click here to read the Disclaimer.
Content copyright 2010-2014. Kathiresan. All rights reserved.
This page is using SMF version 2.0.1