資源描述:
《lecture 1introduction》由會(huì)員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在教育資源-天天文庫(kù)。
1、Lecture1IntroductionLecturer:HanLinSomethingaboutme…1999.9~2003.7中山大學(xué)計(jì)算機(jī)科學(xué)與技術(shù)專業(yè)本科2003.9~2005.7中山大學(xué)計(jì)算機(jī)軟件與理論專業(yè)碩士生(碩博連讀)2005.9~2008.7中山大學(xué)計(jì)算機(jī)軟件與理論專業(yè)博士導(dǎo)師:蘇開(kāi)樂(lè)教授2008.7~中山大學(xué)計(jì)算機(jī)科學(xué)系講師Somethingaboutme…姓名:林瀚Homepage:http://www.cs.sysu.edu.cn/~lh/Email:linhan095@gmail.comSomething
2、aboutthiscourseCoursePage:http://www.cs.sysu.edu.cn/~lh/algorithms.htmlBBS:http://bbs.sysu.edu.cn/bbsdoc?board=ACMICPCOfficeHours:每周一下午3:00~5:00,信息學(xué)院樓616E其它時(shí)間可郵件預(yù)約Somethingaboutthiscourse1.平時(shí)作業(yè):書(shū)面作業(yè)+編程練習(xí)2.研究型的小Project:選一個(gè)問(wèn)題,編程實(shí)現(xiàn)解決這一問(wèn)題的若干種算法,在不同規(guī)模的測(cè)試數(shù)據(jù)上,比較各種算法的性能3.期末考試
3、:ACM方式,自動(dòng)測(cè)評(píng)FAQQ:這門課是為了培養(yǎng)參加ACM比賽的隊(duì)員而專門開(kāi)設(shè)的嗎?A:No.SomeimportanttopicsnotincludedinACMICPC?AdvancedAlgorithmAnalysisTechniques?NP-CompletenessProofs?RandomizedandApproximationAlgorithms?QuantumAlgorithms推薦書(shū)籍教材推薦書(shū)籍特點(diǎn):有較多源代碼,適合學(xué)習(xí)算法的同時(shí)提高編程能力高深秘笈DonaldKnuthTuringAward(1974)開(kāi)課
4、第一問(wèn)?什么是算法?Informally,analgorithmisanywell-definedcomputationalprocedurethattakessomevalue,orsetofvalues,asinputandproducessomevalue,orsetofvalues,asoutput.--《算法導(dǎo)論》KnuthSaid…Knuth(1968,1973)hasgivenalistoffivepropertiesthatarewidelyacceptedasrequirementsforanalgorithm:
5、Finiteness:"Analgorithmmustalwaysterminateafterafinitenumberofsteps...averyfinitenumber,areasonablenumber"Definiteness:"Eachstepofanalgorithmmustbepreciselydefined;theactionstobecarriedoutmustberigorouslyandunambiguouslyspecifiedforeachcase"Input:"...quantitieswhichar
6、egiventoitinitiallybeforethealgorithmbegins.Theseinputsaretakenfromspecifiedsetsofobjects"Output:"...quantitieswhichhaveaspecifiedrelationtotheinputs"Effectiveness:"...alloftheoperationstobeperformedinthealgorithmmustbesufficientlybasicthattheycaninprinciplebedoneexac
7、tlyandinafinitelengthoftimebyamanusingpaperandpencil"Finally…Thewordalgorithmdoesnothaveagenerallyaccepteddefinition.FromwikipediaSo,nextquestion.為什么學(xué)習(xí)算法?原因之一:廣泛的應(yīng)用?HumanGenomeProject?Internet?Electroniccommercesecurity?Othermanufacturingandcommercialsetting?Etc.為什么學(xué)習(xí)
8、算法?原因之二:強(qiáng)大的力量為什么學(xué)習(xí)算法?原因之三:Justforfun!一個(gè)簡(jiǎn)單例子:插入排序問(wèn)題:對(duì)于一個(gè)算法,我們要提出什么問(wèn)題?問(wèn)題一為什么這個(gè)算法是正確的?利用循環(huán)不變式來(lái)證明算法的正確性,其一般步驟如下:插入排序的正確性證明見(jiàn)課本p18