Ask Question, Ask an Expert

+1-415-315-9853

info@mywordsolution.com

Ask Java Expert


Home >> Java

TRAVELLING SALESMAN (TSP) PROBLEM ON THE L1-METRIC PLANE

• Problem description: A travelling salesman desires to make a tour of the cities and returns back to the starting point. What is the minimum length of the tour?

• Formal Definition:

- Input: A set S = {P1, P2, …, Pn} of n points representing the locations of n cities. The coordinates of Pi is (xi, yi). For straightforwardness, the coordinates xi and  yi are integers in [0..1000), i.e.,  0  ≤ xi, yi  ≤ 999, i= 1,2,..,n. The distance between Pi and Pj is defined as |xi- xj|+|yi- yj|.

- Output: A TSP tour which starts from P1, visit all the cities (Pi, i=2,3..,n) and return back to starting point P1

- Objective: Minimize the total length of TSP tour.

HEURISTICS

• Minimum Spanning Tree (MST) Based Heuristic

- Construct a MST, T, for the points in S from beginning point P1;

- Traverse around T to get the initial TSP tour for S;

- Exploit the triangular inequality and remove needless visits in the TSP tour.

- Evaluate the length of the tour.

• Nearest Neighbor Heuristic

- Present position ← P1;

- Loop for n-1 steps

- At each step, desire to visit next the city that is closest to the current position;

- Update present position;

- Including closing edge (back to P1) in the tour;

- Evaluate the length of the tour.

TASKS

1. Implement the MST Based Heuristic;

2. Implement the Nearest Neighbour Heuristic;

3. Implement a function, randomSetGenerator that will generate a set of random points on the L1-metric Plane.

4. Conduct the subsequent experiment for n=100

- Repeat the following for 10 times

- Call randomSetGenerator to generate a set S of n random points.

• Feed S to MST Based Heuristic. Record the length of the tour and the execution time.

• Feed S to the Nearest Neighbour Heuristic. Record the length of the tour and the implementation time.

- Evaluate the average length of the tour and the average execution time for the MST Based Heuristic.

- Evaluate the average length of the tour and the average execution time for the Nearest Neighbour Heuristic.

5. Repeat the above experiments for n = 200, 300, 400, 500, 600, 700, 800, 900 and 1000. Collect the statistics (average length of the tour and average execution time) from the experiments. Compare the two heuristics in term of the average length of the tour and average execution time.

Programming language: recommend Java.

Java, Programming

  • Category:- Java
  • Reference No.:- M91646

Have any Question? 


Related Questions in Java

Overviewthis assignment is intended to familiarize students

Overview: This assignment is intended to familiarize students with web application design, basic servlet functionality, and application deployment with a focus on servlet HTML generation and page navigation. The goal is ...

Topic java part a airline seatingmillions of commercial

Topic: Java Part A: Airline seating Millions of commercial airline flights cross the world's cities every year, and each one of these flights must solve what seems like a simple problem: how do you arrange where each pas ...

Java question1write an application that prompts a user for

JAVA Question 1. Write an application that prompts a user for a month, day, and year. Display a message that specifies whether the entered date is not this year, in an earlier month this year, in a later month this year, ...

Java- object-oriented and concurrent programmingheres a

Java- Object-Oriented and Concurrent Programming Here's a very quick overview of the projects: 1. Read a data file, create the internal data structure, create a GUI to display the structure, and let the user search the s ...

Programming assignment - summer semester 2015-purpose-to

Programming Assignment - Summer Semester 2015- Purpose- To provide students with the opportunity to apply the knowledge acquired and skills developed. These include understanding of primitive data types and the concept o ...

Below is the beginning of a java classpublic class

Below is the beginning of a Java class. public class Implement { private String name; private boolean hasMovingParts; private String constructedFrom; public Implement() { } a) Complete this class so that: i. The instance ...

Twitter is a popular social media platform for users to

Twitter is a popular social media platform for users to send out a short message (a "tweet") to other users who are registered as his/her followers. Figure 1 shows a graph. (The topic on graphs will be covered after your ...

Chapter 1 - challenge 3 - training workshopsyour company

Chapter 1 - Challenge #3 - Training Workshops Your company likes to present training workshops that help people in the information technology industry improve their skills. Your task is to write and object-oriented appli ...

Instructionsi what are the diagrams defined in the uml

Instructions I. What are the diagrams defined in the UML Standard. Give a one or two sentence description of each one. II. Given the following code, how should the toString methods in the classes H2ClassA and H2ClassB be ...

Java programmingyou have been asked by your manager to

Java programming You have been asked by your manager to create a user-friendly application that will present a survey to your customers. The application will compile and analyze the results entered by the survey responde ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

A cola-dispensing machine is set to dispense 9 ounces of

A cola-dispensing machine is set to dispense 9 ounces of cola per cup, with a standard deviation of 1.0 ounce. The manuf

What is marketingbullwhat is marketing think back to your

What is Marketing? • "What is marketing"? Think back to your impressions before you started this class versus how you

Question -your client david smith runs a small it

QUESTION - Your client, David Smith runs a small IT consulting business specialising in computer software and techno

Inspection of a random sample of 22 aircraft showed that 15

Inspection of a random sample of 22 aircraft showed that 15 needed repairs to fix a wiring problem that might compromise

Effective hrmquestionhow can an effective hrm system help

Effective HRM Question How can an effective HRM system help facilitate the achievement of an organization's strate