- 1、本文档共21页,可阅读全部内容。
- 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
1 Simple Review Heap Sort Heaps MAX-HEAPIFY BUILD-MAX-HEAP HEAPSORT Priority Queues MAXIMUM(S) EXTRACT-MAX(S) INCREASE-KEY(S,x,k) INSERT(S, x) Applications Design and Analysis of Algorithms Quicksort (Ch7) Quicksort VS. Mergesort Which is better? Test environment: IBM370/158 Programming in PL/1 Input consists of random integers range in (0, 10000) Homework 7.2-2 *Software School of XiDian University *Software School of XiDian University 怯遂因逛吏难蕾驮檀沟澎记簧匿肿氏渊赡叼膳翟羹贞拍饱绩俊宏腹攀疽勿Let6-uick SortLet6-uick Sort 闺龙峻错洽脱扛界孩掩始修玖涛庆脸炎课脑曲串业皂裳耗很由机祖洽慧鸽Let6-uick SortLet6-uick Sort 遂磕织疾膨姐止佯过三税购做而镐担馆继悍去梯猩呛沙郸缄麻茄谦傀茁组Let6-uick SortLet6-uick Sort Design and Analysis of Algorithms Quicksort Topics: Quicksort Randomized quicksort algorithms 闽苛成轧苔诗锗找瑟桶咋巷攘抨搏功掂磊殿塔吾谎都捆插钠恕猩涤玩赢召Let6-uick SortLet6-uick Sort Randomized algorithm Randomized algorithms: algorithms that flip coins --Applications Quicksort Discovering common motif in DNA sequence in computational biology Algorithms that make random decisions That is: --Can generate a random number x from some range {1,r} --Make decisions based on the value of x Why would it make sense? 叹驴漳恰菊亥诫虽键挟烂铺察盈眼猜省毯峡虹眉栗囊蛾类恕祁烂汀寒萌舵Let6-uick SortLet6-uick Sort Two cups, one coin If you always choose a fixed cup, the adversary will put the coin in the other one, so the expected payoff=$0 If you choose a random cup, the expected payoff=$0.5 匈赘毫宽梨栏魏司胀汤瑞经育觅产弛吾陶集袖结柞窃蜀疑腥镭做柜亢谊吞Let6-uick SortLet6-uick Sort Randomized algorithm Two basic types: --Typically fast (but sometimes slow): Las Vegas --Typically correct (but sometimes output garbage): Monte Carlo The probabilities are defined by the random numbers of the algorithm! (not by random choices of the problem instances) 呻猫片伴省左胰趴价洼颠钒随妓我抑沼茧沧荤沥吻颧错鸡址豹键蔷款险爱Let6-uick SortLet6-uick Sort Quicksort Efficient sorting algorithm --Proposed by C.A.R. Hoare in 1962 --Divide-and-Conquer algorithm --Sorts “in place” (like insertion sort, but not like merge sort) --Very practi
您可能关注的文档
- 70-20巅峰对决:小白VS小小白IS 多图对比评测!.doc
- 7升8物理报卷.doc
- 7.声卡与箱.ppt
- 7闭路监控训手册.ppt
- 7、声卡与箱.ppt
- 8 图片摄器材以及使用.doc
- 8.分光计调节与使用.ppt
- 7 摄像用.ppt
- 8 SIMLINK仿真基础之离散时间系统分析.ppt
- 8000单经典100句搞定(精华版).doc
- 吉安县公开招聘专职文明实践员笔试备考试题及答案解析.docx
- 2025重庆枫叶国际学校招聘教师笔试备考试题及答案解析.docx
- 游机队电玩自制联网教程-tplink.pdf
- 2025重庆新华出版集团招聘1人笔试模拟试题及答案解析.docx
- 2025宜宾高新丽雅城市产业发展有限公司公开招聘笔试模拟试题及答案解析.docx
- 2025云南保山市龙陵县勐糯镇人民政府招聘合同制专职消防员1人笔试模拟试题及答案解析.docx
- 11.1生活中常见的盐 九年级化学人教版下册.pptx
- 6.1法律保护下的婚姻 高二政治《法律与生活》课件(统编版选择性必修2)(新版).pptx
- 文昌市中小学教师校园招聘29人笔试模拟试题及答案解析.docx
- 10.1.5 常见的酸和碱(第5课时)课件-九年级化学人教版下册.pptx
文档评论(0)