Sei sulla pagina 1di 4

2/29/12

Golden section search - Wikipedia, the free enc clopedia

Golden ec ion ea ch
FromWikipedia,thefreeencyclopedia

Thegolden ec ion ea chisatechniqueforfinding theextremum(minimumormaximum)ofaunimodal functionbysuccessivelynarrowingtherangeof valuesinsidewhichtheextremumisknowntoexist. Thetechniquederivesitsnamefromthefactthatthe algorithmmaintainsthefunctionvaluesfortriplesof pointswhosedistancesformagoldenratio.The algorithmiscloselyrelatedtoaFibonaccisearch (alsodescribedbelow)andtoabinarysearch. FibonaccisearchandGoldensectionsearchwere introducedbyKiefer(1953).(seealsoAvrieland Wilde(1966)).

Con en
1Basicidea 2Probepointselection 3Terminationcondition 4Recursivealgorithm 5Fibonaccisearch 6Seealso 7References
Diagramofagoldensectionsearch

Ba icidea
Thediagramaboveillustratesasinglestepinthetechniqueforfindingaminimum.Thefunctionalvaluesof f( )areontheverticalaxis,andthehorizontalaxisisthe parameter.Thevalueoff( )hasalreadybeen evaluatedatthethreepoints: 1, 2,and 3.Sincef2issmallerthaneitherf1orf3,itisclearthataminimum liesinsidetheintervalfrom 1to 3(sincefisunimodal). Thenextstepintheminimizationprocessisto"probe"thefunctionbyevaluatingitatanewvalueof , namely 4.Itismostefficienttochoose 4somewhereinsidethelargestinterval,i.e.between 2and 3. Fromthediagram,itisclearthatifthefunctionyieldsf4athenaminimumliesbetween 1and 4andthe newtripletofpointswillbe 1, 2,and 4.Howeverifthefunctionyieldsthevaluef4bthenaminimumlies between 2and 3,andthenewtripletofpointswillbe 2, 4,and 3.Thus,ineithercase,wecanconstruct anewnarrowersearchintervalthatisguaranteedtocontainthefunction'sminimum.

en.wikipedia.org/wiki/Golden_section_search

1/4

2/29/12

Golden section search - Wikipedia, the free enc clopedia

P obepoin elec ion


Fromthediagramabove,itisseenthatthenewsearchintervalwillbeeitherbetween 1and 4withalength ofa+c,orbetween 2and 3withalengthofb.Thegoldensectionsearchrequiresthattheseintervalsbe equal.Iftheyarenot,arunof"badluck"couldleadtothewiderintervalbeingusedmanytimes,thus slowingdowntherateofconvergence.Toensurethatb=a+c,thealgorithmshouldchoose 4= 1+( 3 2). Howevertherestillremainsthequestionofwhere 2shouldbeplacedinrelationto 1and 3.Thegolden sectionsearchchoosesthespacingbetweenthesepointsinsuchawaythatthesepointshavethesame proportionofspacingasthesubsequenttriple 1, 2, 4or 2, 4, 3.Bymaintainingthesameproportionof spacingthroughoutthealgorithm,weavoidasituationinwhich 2isverycloseto 1or 3,andguarantee thattheintervalwidthshrinksbythesameconstantproportionineachstep. Mathematically,toensurethatthespacingafterevaluatingf( 4)isproportionaltothespacingpriortothat evaluation,iff( 4)isf4aandournewtripletofpointsis 1, 2,and 4thenwewant:

However,iff( 4)isf4bandournewtripletofpointsis 2, 4,and 3thenwewant:

Eliminatingcfromthesetwosimultaneousequationsyields:

or

whereisthegoldenratio:

Theappearanceofthegoldenratiointheproportionalspacingoftheevaluationpointsishowthissearch algorithmgetsitsname.

Te mina ioncondi ion


en.wikipedia.org/wiki/Golden_section_search 2/4

2/29/12

Golden section search - Wikipedia, the free enc clopedia

Inadditiontoaroutineforreducingthesizeofthebracketingofthesolution,acompletealgorithmmusthave aterminationcondition.TheoneprovidedinthebookNumericalRecipesinCisbasedontestingthegaps among 1, 2, 3and 4,terminatingwhenwithintherelativeaccuracybounds:

whereisatoleranceparameterofthealgorithmand| |istheabsolutevalueof .Thecheckisbasedon thebracketsizerelativetoitscentralvalue,becausethatrelativeerrorin isapproximatelyproportionaltothe squaredabsoluteerrorinf( )intypicalcases.Forthatsamereason,theNumericalRecipestextrecommends that where istherequiredabsoluteprecisionoff( ).

Rec

i ealgo i hm

d bepi=(ahsr() o lh1+Mt.qt5)/2 d bershh o lepi=2pi /nrhurnonshiiusbtente. /aadcaetecretbudtemnmmie ehm /sacneon /bietrpit /()ioemteaiaucines hreie /f ssmahmtclfntole eedfnd /orsodo 1orsodo 2orsodo 3 /acrepnst bcrepnst ccrepnst /orsodo 4 / crepnst pbiobegleScinerhd beaobebobecobe lcd lodnetoSac(o l,d l,d l,d l d bex o l icb>ba f() x=b+rshcb epi*() e e l x=brshba epi*() iMt.b()<tu*(ahasbahasx) f(ahascaaMt.b()+Mt.b()) e n()/2 c+a ifx() f(()<fb){ icb>bae f() ngleScinerhb,ca) odnetoSac(,x,tu e e e ngleScinerha,ba) l odnetoSac(,x,tu e e{ l icb>bae f() ngleScinerha,xa) odnetoSac(,b,tu e e e ngleScinerhx,ca) l odnetoSac(,b,tu

Torealisetheadvantageofgoldensectionsearch,thefunctionf( )wouldbeimplementedwithcaching,so thatinallinvocationsofg l e S c i n e r h . ) o d n e t o S a c ( . above,exceptthefirst,f( 2)wouldhavealreadybeen

en.wikipedia.org/wiki/Golden_section_search

3/4

2/29/12

Golden section search - Wikipedia, the free enc clopedia

evaluatedpreviouslytheresultofthecalculationwillbereused,bypassingthe(perhapsexpensive) explicitevaluationofthefunction.Togetherwithaslightlysmallernumberofrecursions,this50%savingin thenumberofcallstof( )isthemainalgorithmicadvantageoverTernarysearch.

Fibonacci ea ch
Averysimilaralgorithmcanalsobeusedtofindtheextremum(minimumormaximum)ofasequenceof valuesthathasasinglelocalminimumorlocalmaximum.Inordertoapproximatetheprobepositionsof goldensectionsearchwhileprobingonlyintegersequenceindices,thevariantofthealgorithmforthiscase typicallymaintainsabracketingofthesolutioninwhichthelengthofthebracketedintervalisaFibonacci number.Forthisreason,thesequencevariantofgoldensectionsearchisoftencalledFibonaccisearch.

Seeal o
Fibonaccisearchtechnique Brent'smethod

Refe ence
Kiefer,J.(1953),"Sequentialminimaxsearchforamaximum",ProceedingsoftheAmerican MathematicalSociet 4(3):502506,doi:10.2307/2032161 (http://dx.doi.org/10.2307%2F2032161),JSTOR2032161(http://www.jstor.org/stable/2032161), MR0055639(http://www.ams.org/mathscinetgetitem?mr=0055639) Avriel,MordecaiWilde,DouglassJ.(1966),"OptimalityproofforthesymmetricFibonaccisearch technique",FibonacciQuarterl 4:265269,MR0208812(http://www.ams.org/mathscinet getitem?mr=0208812) Press,WHTeukolsky,SAVetterling,WTFlannery,BP(2007),"Section10.2.GoldenSection SearchinOneDimension"(http://apps.nrbook.com/empanel/index.html#pg=492),Numerical Recipes:TheArtofScientificComputing(3rded.),NewYork:CambridgeUniversityPress, ISBN9780521880688,http://apps.nrbook.com/empanel/index.html#pg=492 Retrievedfrom"http://en.wikipedia.org/w/index.php?title=Golden_section_search&oldid=471142146" Categories: Goldenratio Fibonaccinumbers Optimizationalgorithmsandmethods Thispagewaslastmodifiedon13January2012at13:59. TextisavailableundertheCreativeCommonsAttributionShareAlikeLicenseadditionaltermsmay apply.SeeTermsofusefordetails. WikipediaisaregisteredtrademarkoftheWikimediaFoundation,Inc.,anonprofitorganization.

en.wikipedia.org/wiki/Golden_section_search

4/4