欢迎来到天天文库
浏览记录
ID:48194618
大小:188.50 KB
页数:14页
时间:2020-01-15
《国外算法设计与分析课件16.ppt》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、BacktrackingandBranch-and-BoundExpectedOutcomesDescribetheideasofbacktrackingandbranchandboundtechniquesSolvesomedifficultproblemsbythebacktrackingtechnique2ExactSolutionsexhaustivesearch(bruteforce)GenerateALLcandidatesolutionsandidentifyonewithadesiredpropertyusefulonlyforsmall
2、instancesImprovementoverexhaustivesearch:backtrackingandbranch-and-boundTheideaconstructcandidatesolutionsonecomponentatatimebasedonacertainrule.Ifnopotentialvaluesoftheremainingcomponentscanleadtoasolution,theremainingcomponentsarenotgeneratedatall.DifferenceApplytodifferentprob
3、lems(non-optimizationandoptimizationproblems)Thewayanewcomponentisgenerated.Advantageanddisadvantagescutdownonthesearchspaceprovidefastsolutionsforsomeinstancestheworstcaseisstillexponential3BacktrackingConstructthestatespacetree:RootrepresentsaninitialstateNodesreflectspecificch
4、oicesmadeforasolution’scomponents.PromisingandnonpromisingnodesleavesExplorethestatespacetreeusingdepth-firstsearch“Prune”non-promisingnodesdfsstopsexploringsubtreerootedatnodesleadingtonosolutionsand...“backtracks”toitsparentnode4Example:Then-QueenproblemPlacenqueensonannbynches
5、sboardsothatnotwoofthemareonthesamerow,column,ordiagonal5StateSpaceTreeoftheFour-queensProblem6Them-ColoringProblemandHamiltonianProblem2-color3-colorHamiltonianCircuit(usealphabetordertobreaktheties)cdaeb7CommentsExhaustivesearchandbacktrackingExhaustivesearchisguaranteedtobever
6、yslowineveryprobleminstance.Backtrackingprovidesthehopetosolvesomeprobleminstancesofnontrivialsizesbypruningnon-promisingbranchesofthestate-spacetree.Thesuccessofbacktrackingvariesfromproblemtoproblemandfrominstancetoinstance.Backtrackingpossiblygeneratesallpossiblecandidatesinan
7、exponentiallygrowingstate-spacetree.Butstillitprovidesasystematictechniquetodoso.8BranchandBoundAnenhancementofbacktrackingSimilarityAstatespacetreeisusedtosolveaproblem.DifferenceThebranch-and-boundalgorithmdoesnotlimitustoanyparticularwayoftraversingthetreeandisusedonlyforoptim
8、izationproblemsThebacktrackingalgorithmr
此文档下载收益归作者所有