您好,欢迎访问三七文档
当前位置:首页 > 商业/管理/HR > 信息化管理 > 计算机程序设计艺术第四卷 Combinatorial Searching
KNUTHTHEARTOFCOMPUTERPROGRAMMINGVOLUME4PRE-FASCICLE0AADRAFTOFSECTION7:INTRODUCTIONTOCOMBINATORIALSEARCHINGDONALDE.KNUTHStanfordUniversityADDISON{WESLEY677InternetStanfordGraphBaseMMIXInternetpagehttp://www-s-faulty.stanford.edu/~knuth/taop.htmlontainsurrentinformationaboutthisbookandrelatedbooks.Seealsohttp://www-s-faulty.stanford.edu/~knuth/sgb.htmlforinformationaboutTheStanfordGraphBase,inludingdownloadablesoftwarefordealingwiththegraphsusedinmanyoftheexamplesinChapter7.Seealsohttp://www-s-faulty.stanford.edu/~knuth/mmixware.htmlfordown-loadablesoftwaretosimulatetheMMIXomputer.Copyright 2007byAddison{WesleyAllrightsreserved.Nopartofthispubliationmaybereprodued,storedinaretrievalsystem,ortransmitted,inanyform,orbyanymeans,eletroni,mehanial,photo-opying,reording,orotherwise,withouttheprioronsentofthepublisher,exeptthattheoÆialeletroni lemaybeusedtoprintsingleopiesforpersonal(notommerial)use.Zerothprinting(revision2),06August2007FOLLANDPASCALInternetPREFACEToputallthegoodstu intoonebookispatentlyimpossible,andattemptingeventobereasonablyomprehensiveaboutertainaspetsofthesubjetislikelytoleadtorunawaygrowth.|GERALDB.FOLLAND,\Editor’sCorner(2005)Laderni erehosequ’ontrouveenfaisantunouvrageestdesavoirellequ’ilfautmettrelapremi ere.|BLAISEPASCAL,Pens ees740(.1660)ThisbookletontainsdraftmaterialthatI’mirulatingtoexpertsinthe eld,inhopesthattheyanhelpremoveitsmostegregiouserrorsbeforetoomanyotherpeopleseeit.Iamalso,however,postingitontheInternetforourageousand/orrandomreaderswhodon’tmindtheriskofreadingafewpagesthathavenotyetreahedaverymaturestate.Beware:ThismaterialhasnotyetbeenproofreadasthoroughlyasthemanusriptsofVolumes1,2,and3wereatthetimeoftheir rstprintings.Andthosearefully-hekedvolumes,alas,weresubsequentlyfoundtoontainthousandsofmistakes.Giventhisaveat,Ihopethatmyerrorsthistimewillnotbesonumerousand/orobtrusivethatyouwillbedisouragedfromreadingthematerialarefully.Ididtrytomakethetextbothinterestingandauthoritative,asfarasitgoes.Butthe eldisvast;Iannothopetohavesurroundeditenoughtoorralitompletely.SoIbegyoutoletmeknowaboutanyde ieniesthatyoudisover.Toputthematerialinontext,thispre-fasileontainstheopeningremarksintendedtolaunhalong,longhapteronombinatorialalgorithms.Chapter7isplannedtobebyfarthelongestsinglehapterofTheArtofComputerProgramming;itwilleventually llatleastthreevolumes(namelyVolumes4A,4B,and4C),assumingthatI’mabletoremainhealthy.Liketheseond-longesthapter(Chapter5),itbeginswithpump-primingintrodutorymaterialthatomesbeforethemaintext,inludingdozensofexerisestogettheballrolling.Alongvoyageliesahead,andsomeimportantprovisionsneedtobebroughtonboardbeforeweembark.FurthermoreIwanttominimizetheshokoftransitionbetweenChapter6andthenewhapter,beauseChapter6wasoriginallywrittenandpublishedmorethanthirtyyearsago.Chapter7proper,whihfollowsthematerialinthepresentpre-fasile,beginswithSetion7.1:ZerosandOnes.Setion7.1isanothersortofintro-dution,atadi erentlevel;ithasfoursubsetionsaboutBooleanandbitwiseomputations,appearingrespetivelyinpre-fasiles0b,0,1a,and1b.Thenextpart,7.2,isaboutgeneratingallpossibilities,anditbeginswithSetioniiiivPREFACEStanfordGraphBaseDeanGoogle ve-letterwordsInternetWilsonKnuthHARARY7.2.1:GeneratingBasiCombinatorialPatterns.FasilesforSetion7.2.1havealreadyappearedinprint.Setion7.2.2willdealwithbaktrakingingeneral.Andsoitwillgoon,ifallgoeswell;anoutlineoftheentireChapter7asurrentlyenvisagedappearsonthetaopwebpagethatisitedonpageii.ThisintrodutorysetionhasturnedouttohavemorethantwieasmanyexerisesasIhadoriginallyplanned.Butmanyofthemarequitesimple,in-tendedtoreinforethereader’sunderstandingofbaside nitions,ortoaquaintreaderswiththejoysofTheStanfordGraphBase.Otherexerisesweresimplyirresistible,astheyriedouttobeinludedhere|although,believeitornot,IdidrejetmorepotentialleadsthanIatuallyfollowedup.Mynotesonombinatorialalgorithmshavebeenaumulatingformorethanfortyyears,soIfearthatinseveralrespetsmyknowledgeiswoefullybehindthetimes.Pleaselook,forexample,attheexerisesthatI’velassedasresearhproblems(ratedwithdiÆultylevel46orhigher),namelyexerises15,16,67,and125;I’vealsoimpliitlymentionedorposedadditionalunsolvedquestionsintheanswerstoexerises7and133(m).Arethoseproblemsstillopen?Pleaseinformmeifyouknowofasolutiontoanyoftheseintriguingquestions.Andofourseifnosolutionisknowntodaybutyoudomakeprogressonanyoftheminthefuture,Ihopeyou’llletmeknow.IurgentlyneedyourhelpalsowithrespettosomeexerisesthatImadeupasIwaspreparingthismaterial.Iertainlydon’tliketoreeivereditforthingsthathavealreadybeenpublishedbyothers,andmostoftheseresultsarequitenatural\fruitsthatwerejustwaitingtobe\pluked.Thereforepleasetellmeifyouknowwhodeservestoberedited,withrespettotheideasfoundinexerises3,25,32,35,72,84,108,116,and135,and/ortheanswertoexerises105.ThankstoJe DeanofGoogleforlettingmelookatthestatistisof ve-letterwordsintheInternetatthebeginningof2004,andtoRobinWilsonoftheOpenUniversityforhisarefulreadingandmanydetailedsuggestions.Ishallhappilypaya nder’sfeeof$2.56foreaherrorinthisdraftwhenitis rstreportedtome,whetherthaterrorbetyp
本文标题:计算机程序设计艺术第四卷 Combinatorial Searching
链接地址:https://www.777doc.com/doc-1213 .html