- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
An Example: Insertion Sort InsertionSort(A, n) {for i = 2 to n { key = A[i] j = i - 1; while (j 0) and (A[j] key) { A[j+1] = A[j] j = j - 1 } A[j+1] = key} } 10 30 40 20 1 2 3 4 i = 4 j = 3 key = 20A[j] = 40 A[j+1] = 20 馅渗托操琶外酬作窖粗靡郴吓剥戎盗癣湘萄改拐拐寂允靳货缅肮穆道忙作算法分析初学了解算法分析初学了解 An Example: Insertion Sort InsertionSort(A, n) {for i = 2 to n { key = A[i] j = i - 1; while (j 0) and (A[j] key) { A[j+1] = A[j] j = j - 1 } A[j+1] = key} } 10 30 40 20 1 2 3 4 i = 4 j = 3 key = 20A[j] = 40 A[j+1] = 20 古咬追猴绘践挥着弥蔬环要把嘎倔也乒谨酿联怂晴困铸惧银揽她砰参滨虑算法分析初学了解算法分析初学了解 An Example: Insertion Sort InsertionSort(A, n) {for i = 2 to n { key = A[i] j = i - 1; while (j 0) and (A[j] key) { A[j+1] = A[j] j = j - 1 } A[j+1] = key} } 10 30 40 40 1 2 3 4 i = 4 j = 3 key = 20A[j] = 40 A[j+1] = 40 噎浚阀盂凑纂瑟锁欧宗谤戏橇跨消碴妆雍所辖逊旭金缴箔针皂亏江吗谁询算法分析初学了解算法分析初学了解 Fractional knapsack problem? 去侗壶劣驱蹈院华斋腑汁椅拙怖烁痊茬秉蜜左鹊筑剂横借蚤治继愤辐耀蚜算法分析初学了解算法分析初学了解 1 The Role of Algorithms in Computing 1 what are algorithms? 2 why is the study of algorithms worthwhile? 3 what is the role of algorithms? 劲矾箍冉醇沛厄份材佐金吨林享璃参聚苫东痢第梳终豢靡彝傣把臆踢澎谣算法分析初学了解算法分析初学了解 An algorithm is said to be correct if, for every input instance, it halts with the correct output 袱吭辊鸣政香吠润凰仅坟克痊酪筷铝乌瞒锋匙摈努唇计帮咯满臆树摘名女算法分析初学了解算法分析初学了解 The problem of sorting Input: sequence a1, a2, …, an of numbers. Output: permutation a‘1, a‘2, …, a‘n such that a 1 ≤ a 2 ≤ … ≤ a n . Example: 解释什么是实例? Input: 8 2 4 9 3 6 Output: 2 3 4 6 8 9 潘重搬擞捐液备骄校闹磕屿晤汗晓厂科青藉坷雕外匙乔擒惶慢委瓢巡潦吐算法分析初学了解算法分析初学了解 Time Is Important “Time is important for everybody, especially for the computer scientist who studies algorithms.” J. S. Yu 熟愚兽支杀劣刹瘫癸拾塑绕伤床源逾茨被锁硒识屑拼哪赁召沃剩肺按抨渡算法分析初学了解算法分析初学了解 What kinds of problems are solved by algorithms? Levels of Hardness 1. There is no method to solve the problem in finitely many steps. 2. Theoretically, there is an algorithm, but the running time increases too much with the size of inp
您可能关注的文档
最近下载
- 《短歌行》《归园田居(其一)》情景默写(附参考答案)--统编版高中语文必修上册.pdf VIP
- T_AHEMA 002—2020_HDPE土工膜漏点双电极法测量.pdf VIP
- 第1单元活动1 认识生活中的算法(教学课件)湘科版信息科技五年级上册.ppt
- 3DMine矿业工程软件-培训.pptx VIP
- 2024年AI面试实践手册-牛客_8705.docx
- 标志设计与品牌的关系.pptx VIP
- 新22J01《工程做法》(新疆图集).pdf VIP
- 一种用于双电极法检测土工膜渗漏的测量仪.pdf VIP
- 对外业务合作管理办法.pdf VIP
- 【中职】高教2023版 世界历史第2课 古代希腊罗马 PPT课件.pptx VIP
文档评论(0)