+1-415-315-9853

info@mywordsolution.com

## Programming

 C/C++ Java DOT NET Python Assembly C Sharp Perl COBOL Visual Basic CAD/CAM Object Oriented Programming Asp.NET PHP JSP Shell Scripting Java Script Ajax CSS/HTML Joomla Wordpress Megento Photoshop DBMS PL-SQL Oracle MS-SQL MS-ACCESS My-SQL SYBASE FOXPRO Excel Programming Language Mobile Applications

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.

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

### Java programming using ide netbeansdetailed question must

Java programming using IDE NetBeans Detailed Question: Must use file operations, exception handling, recursive programming (to calculate averages), and encapsulation (or inheritance) in the program Must have four java fi ...

### Write java program with eclipsinstructionswrite a program

Write java program with Eclips INSTRUCTIONS Write a program that will help a student practice basic math (addition, subtraction, multiplication, and division). Display a menu the student can select from. The student will ...

### Assessment scenarioproblemjava program for a music social

Assessment Scenario/Problem Java program for a Music Social Network system. You can work on this coursework either alone or in a pair with a colleague, not necessarily from the same seminar or lab group. If you elect to ...

### Create a console based non-gui java program using netbeans

Create a console based, non-GUI Java program using NetBeans Integrated Development Environment (IDE) that displays "Hello world!" Take a screenshot that shows the program's successful compilation and execution. Submit bo ...

### Submit one properly named rtf document inside your one jar

Submit one properly named .rtf document inside your one .jar file. lastname.firstname.mod4. 1. What is the characteristic behavior of a stack? 2. What is the characteristic behavior of a queue? 3. What are the advantages ...

### Using java eclipse write the the code required from each

Using Java Eclipse write the the code required from each question. Write the code required for each question. I solved it but there a lot of mistakes attached is the Data Base Tables used. Please read the question and lo ...

### Assignmentthis assignment will give you a chance to

Assignment This assignment will give you a chance to exercise your knowledge of extending jQuery and of multimedia players like the JWPlayer. We're building on the "divide-text-into-spans" example we started in Homework ...

### Problem specificationyou have been approached by a local

Problem Specification You have been approached by a local university for designing and implementing a room access control system on the university campus. Access to each room on each floor of each campus building is cont ...

### Write a java program and pseudocode to read a number up to

Write a java program and pseudocode to read a number up to 15 digits long or a date (dd/mm/yyyy). The program should distinguish numbers from input date, and prints them in alphabetic spelling form. Example: for input 23 ...

### When programming or solving any sort of problem for that

When programming, or solving any sort of problem for that matter, abstraction plays a key role in the decision-making process. It allows you to remove irrelevant details in order to understand the bigger picture. For exa ...

• 13,132 Experts

## 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.

### Section onea in an atwood machine suppose two objects of

SECTION ONE (a) In an Atwood Machine, suppose two objects of unequal mass are hung vertically over a frictionless

### Part 1you work in hr for a company that operates a factory

Part 1: You work in HR for a company that operates a factory manufacturing fiberglass. There are several hundred empl

### Details on advanced accounting paperthis paper is intended

DETAILS ON ADVANCED ACCOUNTING PAPER This paper is intended for students to apply the theoretical knowledge around ac

### Create a provider database and related reports and queries

Create a provider database and related reports and queries to capture contact information for potential PC component pro

### Describe what you learned about the impact of economic

Describe what you learned about the impact of economic, social, and demographic trends affecting the US labor environmen