- 1、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
算法和数据结构12
2004-3 L.Chen TOURNAMENT TREES Chapter 10 Tournament Trees Winner trees. Loser Trees. Winner Tree Complete binary tree with n external nodes and n – 1 internal nodes. External nodes represent tournament players. Each internal node represents a match played between its two children; the winner of the match is stored at the internal node. Root has overall winner. Winner Tree For 16 Players Winner Tree For 16 Players Winner Tree For 16 Players Complexity Of Initialize O(1) time to play match at each match node. n – 1 match nodes. O(n) time to initialize n player winner tree. Winner Tree Operations Initialize O(n) time Get winner O(1) time Remove winner and replay O(log n) time More precisely Theta(log n) Tie breaker (player on left wins in case of a tie). Replace Winner And Replay Replace Winner And Replay Replace Winner And Replay Replace Winner And Replay Loser Tree Each match node stores the match loser rather than the match winner. Min Loser Tree For 16 Players Min Loser Tree For 16 Players Min Loser Tree For 16 Players Min Loser Tree For 16 Players Min Loser Tree For 16 Players Min Loser Tree For 16 Players Min Loser Tree For 16 Players Complexity Of Loser Tree Initialize One match at each match node. One store of a left child winner. Total time is O(n). More precisely Theta(n). Complexity Of Replay One match at each level that has a match node. O(log n) More precisely Theta(log n). Applications Tournament Tree: Run generation. k-way merging of runs during an external merge sort. Truck loading. Truck Loading n packages to be loaded into trucks each package has a weight each truck has a capacity of c tons minimize number of trucks Bin Packing n items to be packed into bins each item has a size each bin has a capacity of c tons minimize number of bins Bin Packing Truck loading is same as bin packing. Truck is a bin that is to be packed (loaded). Package is an item/element. Bin packing to minimize number of bins is NP-hard. Several fast heuristics have been propos
您可能关注的文档
最近下载
- 二年级美术上册亮眼睛课件省公开课一等奖新课获奖课件.pptx VIP
- 2025年部编人教版(统编新教材)初中语文八年级上册教学计划及进度表.docx
- 初中信息技术课程的项目化教学设计与实施方案探讨教学研究课题报告.docx
- 2025年四川省资阳市中考道德与法治真题卷(含答案与解析).pdf VIP
- EndnoteX8培训学习教程教学.pptx VIP
- 300T汽车吊性能说明书-XCA300_1全地面起重机技术规格书+[主臂风电臂加超起].pdf VIP
- 四川省护士规范化培训登记考核手册【模板】.pdf VIP
- 福建省女职工劳动保护条例试题及答案.docx VIP
- 新课标人教版数学六年级上册全册各单元教材解读精品课件.pptx VIP
- 2025年应急管理执法考试题库(附答案).docx VIP
文档评论(0)