資源描述:
《算法謎題(算法謎題)》由會員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在學(xué)術(shù)論文-天天文庫。
1、AlgorithmicPuzzlesThispageintentionallyleftblankALGORITHMICPUZZLESAnanyLevitinandMariaLevitin33OxfordUniversityPress,Inc.,publishesworksthatfurtherOxfordUniversity’sobjectiveofexcellenceinresearch,scholarship,andeducation.OxfordNewYorkAucklandCapeTownDaresSalaamHongKongKarachiKualaLumpur
2、MadridMelbourneMexicoCityNairobiNewDelhiShanghaiTaipeiTorontoWithof?cesinArgentinaAustriaBrazilChileCzechRepublicFranceGreeceGuatemalaHungaryItalyJapanPolandPortugalSingaporeSouthKoreaSwitzerlandThailandTurkeyUkraineVietnamCopyright?2011byOxfordUniversityPressPublishedbyOxfordUniversityP
3、ress,Inc.198MadisonAvenue,NewYork,NewYork10016www.oup.comOxfordisaregisteredtrademarkofOxfordUniversityPressAllrightsreserved.Nopartofthispublicationmaybereproduced,storedinaretrievalsystem,ortransmitted,inanyformorbyanymeans,electronic,mechanical,photocopying,recording,orotherwise,witho
4、utthepriorpermissionofOxfordUniversityPress.LibraryofCongressCataloging-in-PublicationDataLevitin,Anany.Algorithmicpuzzles/AnanyLevitin,MariaLevitin.p.cm.Includesbibliographicalreferencesandindex.ISBN978-0-19-974044-4(pbk.)1.Mathematicalrecreations.2.Algorithms.I.Levitin,Maria.II.Title.Q
5、A95.L4752011793.74—dc222010052043987654321PrintedintheUnitedStatesofAmericaonacid-freepaperToMaxwithloveThispageintentionallyleftblankContentsPrefaceixAcknowledgmentsxiiiListofPuzzlesxvTutorialPuzzlesxvMainSectionPuzzlesxviTheEpigraphPuzzle:Whosaidwhat?xxi1.Tutorials3GeneralStrategiesfor
6、AlgorithmDesign3AnalysisTechniques222.Puzzles32EasierPuzzles(#1to#50)32PuzzlesofMediumDif?culty(#51to#110)45HarderPuzzles(#111to#150)603.Hints724.Solutions82References241DesignStrategyandAnalysisIndex247IndexofTermsandNames254ThispageintentionallyleftblankPrefaceinQuestionsandAnswersWHAT
7、ISTHISBOOKABOUT?Thisbookisacollectionofalgorithmicpuzzles—puzzlesthatinvolve,explicitlyorimplicitly,clearlyde?nedproceduresforsolvingproblems.Itisauniquecollectionofsuchpuzzles.Thebookincludessomeoldclassics,whichhavebecomeapartofmathematicsandcomputersciencefolklore.Ital