Parallel TSP with branch and bound

download Parallel TSP with branch and bound

If you can't read please download the document

description

Parallel TSP with branch and bound. Presented by Akshay Patil Rose Mary George. Roadmap. Introduction Motivation Sequential TSP Parallel Algorithm Results References. Introduction. What is TSP? - PowerPoint PPT Presentation

Transcript of Parallel TSP with branch and bound

PowerPoint Presentation

Parallel TSP with branch and boundPresented byAkshay PatilRose Mary GeorgeRoadmapIntroductionMotivationSequential TSPParallel AlgorithmResultsReferences

22IntroductionWhat is TSP?Given a list of cities and the distances between each pair of cities, find the shortest possible route that visits each city exactly once and returns to the original city.

3

IntroductionProblem RepresentationUndirected weighted graph, such that the cities are graph vertices and paths are graph edges and a path's distance is the edge's weight.4

RoadmapIntroductionMotivationSequential TSPParallel AlgorithmResultsReferences

55MotivationTravelling salesperson problem with branch and bound is one of the algorithms which is difficult to parallelize.Branch and bound technique can incorporate application specific heuristic techniquesOne of the earliest applications of dynamic programming is the Held-Karp algorithm that solves the problem in O( n22n)Greedy algorithm, may or may not obtain the optimal solution with O( n2 logn) complexity.Parallel branch and bound optimization problems are large and computationally intensive.Increasing availability of multicomputers, multiprocessors and network of workstations

6ApplicationsTSP has several application even in its purest formulation such as :PlanningLogisticsManufacture of microchipsGeneticsUPS saves 3 million gallons of gasoline per year.7RoadmapIntroductionMotivationSequential TSPParallel AlgorithmResultsReferences

88Sequential TSP with branch and boundBest_solution_node = nullInsert start city node into priority queue (Q)While Q is not empty:node = Q.top() // Node with least costIf node.cost >= Best_solution_node.cost // BoundcontinueIf node is solution better than Best_solution_nodeBest_solution_node = nodeElseExplore children of node and insert in Q //BranchDisplay best_solution_node9Sequential TSP with branch and bound

10noOfVertices = 5Children Generated = (5-1 )!With No boundingSequential TSP with branch and bound11noOfVertices = 5Children Generated < (5-1 )!With bounding

Lower Bound EstimateCost of any node = path_cost + lower_bound_estimatelower_bound_estimate = MST ( unvisitied cities, startcity, currentcity)MST is calculated using Prims algorithm which takes O(n2) if implemented using adjacency matrix.Why MST is a good estimate?12

RoadmapIntroductionMotivationSequential TSPParallel AlgorithmResultsReferences

1313Parallel AlgorithmDatatype Creation for Solution NodeMPI_Datatype mpinode;MPI_Datatype type[3] = {MPI_INT,MPI_INT,MPI_INT};MPI_Aint disp[3];disp[0] = (int)&root.nvisited - (int)&root;disp[1] = (int)&root.cost - (int)&root;disp[2] = (int)&root.path[0] - (int)&root;int blocklen[3] = {1, 1, GRAPHSIZE };MPI_Type_create_struct(nodeAttributes,blocklen, disp, type,&mpinode// Resulting datatype.);14struct Node{int nvisited;int cost;int path[GRAPHSIZE]; }// GRAPHSIZE = no.of.verticesParallel AlgorithmSend & ReceiveAt senderMPI_Isend(&node, 1, mpinode,i,50,MPI_COMM_WORLD,&req);node = variable of type Node1 = send 1 variableDataype = mpinodeAt ReceiverMPI_Irecv(buffer, size, mpinode, MPI_ANY_SOURCE, 50, MPI_COMM_WORLD,&req);MPI_Wait(&req, &status);MPI_Get_count(&status, mpinode, &noOfNodesReceivedInBuffer);

15Startup phaseDistribution of initial nodes to processors.For noOfProcessors = 4Round 1 (start round = 1)0 generates children of start city, sends half to 1, keeps half in startupNodesRound 2 (last round = log(noOfProcessors))0 generates children nodes in startupNode, sends half to 21 generates children nodes in startupNode, sends half to 3

16

Parallel Algorithm17RoadmapIntroductionMotivationSequential TSPParallel AlgorithmResultsReferences

1818Results19

For n = 12For n = 12, all edge weights=10 except 1Current State of the Art AlgorithmsLKH(Lin-Kernighan heuristic), was used to solve the World TSP problem which uses data for all the cities in the world.The best lower bound on the length of a tour for the World TSP is7,512,218,268The tour of length7,515,778,188was found on October 25, 2011.20ReferencesMPI Dynamic receive and Probe, http://www.mpitutorial.com/dynamic-receiving-with-mpi-probe-and-mpi-status/TSP Test Data, http://www.tsp.gatech.edu/data/World TSP, http://www.tsp.gatech.edu/world/index.htmlLKH(Lin-Kernighan heuristic), http://www.akira.ruc.dk/~keld/research/LKH/Used to solved the World TSP problem

21Sheet100 17 04 10 1317 00 01 14 0504 01 00 04 100123410 14 04 00 060001704101313 05 10 06 00117000114052040100041031014040006ProcessorsTimeSpeedup4130510060017.97-- 210.340.77419.820.4857.990.13

ProcessorsTimeSpeedup19.137-- 27.831.16412.50.738440.2