A programmer is a person who passes as an exacting expert on the basis of being able to turn out, after innumerable punching, an infinite series of incomprehensive answers calculated with micrometric precisions from vague assumptions based on debatable figures taken from inconclusive documents and carried out on instruments of problematical accuracy by persons of dubious reliability and questionable mentality for the avowed purpose of annoying and confounding a hopelessly defenseless department that was unfortunate enough to ask for the information in the first place. Grid newsmagazine
Travelling salesman problem helps to find the shortest possible route that visits each city exactly once and returns to the origin city. The traveling salesman problem solves the given set of cities and distance between each pair of cities. Find the shortest route that visit each city exactly once and return to the origin of the city.
Write a program to give all the brute force approach to find the sorted path between the cities?
Number of items from the list: [0, 1, 2] All the routes using Branch and bound : [0, 1, 2] [0, 2, 1] [1, 2, 0] [1, 0, 2] [2, 0, 1] [2, 1, 0]