70 likes | 178 Views
Travelling Salesperson Problem A Java mpj-express approach. By Jakob Haug Oftebro, Ulrik Sagen and Eirik Aasved Holst. The problem. What is the shortest closed circuit that visits all locations ? O(n!) NP-Hard. Genetic algorithm. PSEUDOCODE FOR SEQUENTIAL GA:
E N D
Travelling Salesperson ProblemA Java mpj-expressapproach By Jakob Haug Oftebro, Ulrik Sagen and Eirik Aasved Holst
The problem • What is theshortestclosedcircuitthatvisits all locations? • O(n!) • NP-Hard
Genetic algorithm PSEUDOCODE FOR SEQUENTIAL GA: Generate initial population while(not finished){ evaluatefitness evolvepopulation }
IN PARALLEL PSEUDOCODE FOR PARALLEL GA: while(outerloop){ //onrootprocessor mixPopulation() for(innerloop){ //oneachprocessor evaluatefitness evolvesubPopulation } }
PARALLELISM • Population = n • subPopulation = n/#processors