算法分析算法复习题(中英文)

算法分析算法复习题(中英文)

ID:47535963

大小:1.53 MB

页数:13页

时间:2020-01-13

算法分析算法复习题(中英文)_第1页
算法分析算法复习题(中英文)_第2页
算法分析算法复习题(中英文)_第3页
算法分析算法复习题(中英文)_第4页
算法分析算法复习题(中英文)_第5页
资源描述:

《算法分析算法复习题(中英文)》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库

1、(有翻译)1.TheO-notationprovidesanasymptoticupperbound.TheW-notationprovidesanasymptoticlowerbound.TheΘ-notationasymptoticallyafunctionformaboveandbelow.O型符号提供一个渐近的上限。Θ符号提供一个渐近下界。 Θ-符号渐近函数形式的上方和下方。2.Torepresentaheapasanarray,therootoftreeisA[1],andgiventheindexiofanode,theindicesofitsparentParent(

2、i){returnëi/2û;},leftchild,Left(i){return2*i;},rightchild,right(i){return2*i+1;}.代表一个堆中的一个数组,树的根节点是A[1],并且给出一个节点i,那么该节点的父节点是左孩子右孩子3.Becausetheheapofnelementsisabinarytree,theheightofanynodeisatmostQ(lgn).因为n个元素的堆是一个二叉树,任意节点的树高最多是4.Inoptimizationproblems,therecanbemanypossiblesolutions.Eachsolu

3、tionhasavalue,andwewishtofindasolutionwiththeoptimal(minimumormaximum)value.Wecallsuchasolutionanoptimalsolutiontotheproblem.在最优化问题中,有很多可能的解,每个解都有一个值,我们希望找到一个最优解(最大或最小),我们称这个解为最优解问题。5.optimalsubstructureifanoptimalsolutiontotheproblemcontainswithinitoptimalsolutionstosubproblems.最优子结构中问题的最优解,至

4、少包含它的最优解的子问题。6.AsubsequenceofXifthereexistsastrictlyincreasingsequenceofindicesofXsuchthatforallj=1,2,...,k,wehavexij=zj.LetX=andY=besequences,andletZ=beanyLCSofXandY.(1).Ifxm=yn,thenzk=xm=ynandZk-1isanLCSofXm-1andYn-1.(2).Ifxm≠yn,thenzk≠

5、xmimpliesthatZisanLCSofXm-1andY.(3).Ifxm≠yn,thenzk≠ynimpliesthatZisanLCSofXandYn-1.7.Agreedyalgorithmalwaysmakesthechoicethatlooksbestatthemoment.Thatis,itmakesalocallyoptimalchoiceinthehopethatthischoicewillleadtoagloballyoptimalsolution.贪心算法经常需要在某个时刻寻找最好的选择。正因如此,它在当下找到希望中的最优选择,以便引导出一个全局的最优解。

6、8.Thegreedy-choicepropertyandoptimalsub-structurearethetwokeyingredientsofgreedyalgorithm.贪心选择和最优子结构是贪心算法的两个重要组成部分。9.Whenarecursivealgorithmrevisitsthesameproblemoverandoveragain,wesaythattheoptimizationproblemhasoverlappingsubproblems.当一个递归算法一遍一遍的遍历同一个问题时,我们说这个最优化问题是重叠子问题。10.greedy-choiceprop

7、ertyisagloballyoptimalsolutioncanbearrivedatbymakingalocallyoptimal(greedy)choice.贪心选择性质是一个全局的最优解,这个最优解可以做一个全局的最优选择。11.AnapproachofMatrixmultiplicationcandevelopeaΘ(V4)-timealgorithmfortheall-pairsshortest-pathsproblemandthenimproveitsr

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。