Himanshu Kumar Karthik PSmeseec.ce.rit.edu/756-projects/spring2013/1-3.pdf · 2013-05-08 ·...
Transcript of Himanshu Kumar Karthik PSmeseec.ce.rit.edu/756-projects/spring2013/1-3.pdf · 2013-05-08 ·...
Himanshu KumarKarthik PS
OutlineDefinition of searching and optimizationApplication areas
Salesperson problemKnapsack ProblemVLSI
AlgorithmsBranch‐and bound SearchHill ClimbingGenetic Algorithm
Searching and OptimizationLook for a solution to the problem from pool of potential solutionsExhaustive search not feasibleNon‐optimal solution is often sought
Application areasSalesperson problem Knapsack ProblemBankingVLSI chip layoutProcessor register assignment made by compilers and multiprocessor schedulingAll these problems exhibits huge number of permutations so time‐consuming
AlgorithmsBranch‐and‐Bound Technique
One of the fundamental search and optimization techniqueActions can be described by state space tree.Root represents the starting point of the problemFrom root next node represents individual choices made towards solutionIn essence, problem is divided in to subproblems
Branch and Bound Search
Branch and BoundConsists of three components
Branching rules – Used to decompose a problem in to sub problems. Based on inclusion‐and‐exclusion problemBounding rules – Used to determine whether a partial problem need to be decomposed further. A partial problem can be excluded from further consideration if its cost greater than or equal to best cost found so far.Search strategies – Define sequence of partial problems in which they are decomposed.
Branch and BoundFrom a node N
If the bound of the N is not better than the current bound, terminate the search from N.Otherwise
If N is a leaf nodeIf its bound is better than the current overall bound update the overall bound and terminate the search from N.Otherwise, terminate the search from node N.
Otherwise search each child of node N.
Parallel Implementation BnBState space tree can be easily parallelizedAllocate a portion of the state space tree from a node downward to one processorComplex as the current bound needs to be known by all the processors in order to prune their portion of treeLoad balancing a significant issue as size of the state space tree is not known in advance
Parallel Implementation BnBIf shared memory (SAS) model is used
Queue having the live nodes must be protected from simultaneous access. Locks can be used for atomicity.For better speedup, use lock on individual entry rather than placing lock on entire queue.Speedup anomalies
Acceleration anomalyDeceleration anomalyDetrimental anomaly
Hill ClimbingOptimization technique belongs to the family of local searchIterative algorithm that starts with an arbitrary solution, then try to find a better solutionGood for finding the local optimum, does not guarantee global optimum Example – finding top of a hillHigher the number of hikers , better solution
Parallel ImplementationCan be implemented in either static assignment or by a dynamic work pool approachStatic – Divide the area among processors and each generate their random starting point. Each processor reports back its finding to master.Dynamic – Master assign task to slave process. Entire problem is divided into smaller areas.Smaller task size will give better load balancing
Genetic AlgorithmMimics the process of natural evolutionA population of the candidate solutions to an optimization problem is evolved towards better solutionEach candidate have s set of properties which can be mutated or alteredFitness function to select most fit solution in a generation.Terminate when either maximum number of generation is produce or statisfactory fitness level
Genetic AlgorithmInitialization
Individual solutions are randomly generated to form a populationPopulation size depends upon nature of problem but generally thousands of solutions. Size should be chosen wisely as it affects accuracy and computation time.Generated solution should cover entire range of all possible solutionCan be represented using string of 1 and 0, floating point, Gray code and integer string
Genetic AlgorithmSelection
Selective pressure process is usedFitness function is always problem dependentTournament selection
Random chosen individual from the population entered into a tournamentThe most fit individual is one who wins the tournament and will become parent to the next generation of individuals.In all there will be “n” such tournament to keep the population size same as preceding population size
Genetic AlgorithmGenetic Operators
Combine properties to determine the composition of the individuals who will make up the population for the next generationCombining process ‐ crossover and mutationCrossover
Children genes are blend of the genes of their parents.Slowly force the population towards stronger ( more fit)
MutationBrings unpredictable changes in the fitness of individual
Parallel Genetic AlgorithmTwo approaches
Each processor work independently on an isolated subpopulation of individuals, periodically sharing its best individual with other processors through migrationEach processor does a portion of each step of the algorithm
SelectionCrossoverMutation
Parallel Genetic AlgorithmIsolated Subpopulations
Each processor generates its own initial set of populationEach processor then carry out k generations of individualsAfter k such generations, processors share their best result with other processors through migrationMigration models
The island modelThe stepping stone model
Parallel Genetic AlgorithmParallelizing a Common Population
Genetic operators in parallel on global populationNot good speedup is achieved, Genetic algorithm not computing intensive. Most of the time it spend in communicating resultIn SAS implementation, synchronization is required which will add synch wait time
QUESTION ?