Question

Given a graph and a node in it as the starting point, the traveling salesman problem...

Given a graph and a node in it as the starting point, the traveling salesman problem (TSP) is about finding a least cost path that starts and ends at the starting node, and goes through each other node in the graph once and exactly once. The edges of the graph are labeled by a number representing the cost of traveling between the connecting two nodes. Formulate this problem as a search problem by specifying the states, possible initial states, goal test, operators, and operator costs.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Let the 100 states be represented by number 1 to 100.

Let the distance between  2 states i.e i and j be d (i,j)

Variables:-

k (i,j) =1 if the salesman travels from i to j

         = 0 if the salesman doesn’t travels from i to j

Constraints:-

1) Every node should have exactly 1 outgoing (means should lead to next node)

k(i,1) + k(i,2) + k(i,3) +…..k(i,98) + k(i,99) + k(i,100) = 1, for all i

2) Every node should have exactly 1 incoming (means should be next node to some node)

k(1,i) + k(2,i) + k(3,i) +…..k(98,i) + k(99, i) + k(100, i) = 1, for all i

3) k(i,j) should be binary.

Objective:-

Minimum distance travelled = Sum [d(i,j) * k(i,j) ] for i =1 to 100 and j =1 to 100

Add a comment
Know the answer?
Add Answer to:
Given a graph and a node in it as the starting point, the traveling salesman problem...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • The Traveling Salesman problem (TSP) is famous. Given a list of cities and the distances in betwe...

    The Traveling Salesman problem (TSP) is famous. Given a list of cities and the distances in between them, the task is to find the shortest possible tour that starts at a city, visits each city exactly once and returns to a starting city. A particular tour can be described as list of all cities [c1,c2, c3, ,cn] ordered by the position in which they are visited with the assumption that you return from the last city to the start. This...

  • Problem 3: Suppose you are given an undirected graph G and a specified starting node s...

    Problem 3: Suppose you are given an undirected graph G and a specified starting node s and ending node t. The HaMILTONIAN PATH problem asks whether G contains a path beginning at s and ending at t that touches every node exactly once. The HAMILTONIAN CYCLE problem asks whether con- tains a cycle that touches every node exactly once (cycles don't have starting or ending points, so s and t are not used here) Assume that HaMIlTonian CYCLe is NP-Complete....

  • C++ data structure problem. (Thanks) Traveling Salesman Problem Exercise Consider 5 cities of interest, namely a)...

    C++ data structure problem. (Thanks) Traveling Salesman Problem Exercise Consider 5 cities of interest, namely a) Reno, b) San Francisco, c) Salt Lake City, d) Seattle, and e) Las Vegas. Use information on the road network and derive the miles from one city to the other. Then on that basis, conduct the following:  Create a graph with each of its vertices correspond to one of these cities and its edges being weighted by the associated weights. Note that if...

  • Given a graph and a starting vertex, count the number of nodes a specified distance away....

    Given a graph and a starting vertex, count the number of nodes a specified distance away. Requirements: Create a graph of int's. Given a starting node with value key and a distance dist , return the number of nodes that have a path from id with exactly dist edges. If there are multiple paths, only consider the shortest one. int countNodesWithDist(int id, int dist); // example declaration Examples: For the graph below, countNodesWithDist(2, 1) should return 2 since there are...

  • Question 5# This question introduces the idea of using a traveling salesman algo- rithm to search for a Hamilton circui...

    Question 5# This question introduces the idea of using a traveling salesman algo- rithm to search for a Hamilton circuit in any simple graph. (a) Find a Hamilton circuit for the graph G in dicated by the diagram at right. Do this by eye', without using any particular algo- rithm. Answer by drawing heavy lines over each edge on your circuit. There are many correct answers. (b) TSP algorithms usually work on a complete V(G)V(G) weighted graph. One wayEG)-[lu.v :...

  • 1) Consider the directed graph below. “S” is the start state and “G1,G2,G3” are 3 goal...

    1) Consider the directed graph below. “S” is the start state and “G1,G2,G3” are 3 goal states. In traversing the graph one can move only in the direction indicated by the arrows. The numbers on the edges indicate the step-cost for traversing that edge. The numbers in the nodes represent the estimated cost to the nearest goal state. In the following you will be asked to search this graph using various search strategies. When you work out your answer, please...

  • Major Homework #2 Implement a C program major_hw2.c to solve the 15-puzzle problem using the A* s...

    Major Homework #2 Implement a C program major_hw2.c to solve the 15-puzzle problem using the A* search algorithm. Please include pictures that the code runs and shows the different states as it reaches goal state please. 1. Objectives • To gain more experience on using pointers and linked lists in C programs. • To learn how to solve problems using state space search and A* search algorithm. 2. Background A* search and 15-puzzle problem have been introduced in the class....

  • Major Homework #2 Implement a C program major_hw2.c to solve the 15-puzzle problem using the A*...

    Major Homework #2 Implement a C program major_hw2.c to solve the 15-puzzle problem using the A* search algorithm. 1. Objectives • To gain more experience on using pointers and linked lists in C programs. • To learn how to solve problems using state space search and A* search algorithm. 2. Background A* search and 15-puzzle problem have been introduced in the class. For more information, please read the wiki page of 15-puzzle problem at https://en.wikipedia.org/wiki/15_puzzle, and the wiki page of...

  • How can I get started in this program for this DelivC?

    SpecificationStart with your Java program "prog340" which implements Deliverables A and B.This assignment is based on the definition of the Traveling Salesperson Problem (the TSP): Given a set of cities, you want to find the shortest route that visits every city and ends up back at the original starting city. For the purposes of this problem, every city will be directly reachable from every other city (think flying from city to city).Your goal is to use a non-genetic local search...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT