- 1、本文档共62页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
问题求解与程序设计 称重问题.PPT
问题求解与程序设计第三讲 称重问题 李文新 2004.2 – 2004.6 内容提要 作业总结 - 1008 作业总结 - 1013 何林冬令营报告 – 称球问题 自学及讨论 – 征服者 作业 作业总结 - 1008 题意 Haab 19个月 前18个月每月20天 第19个月5天 0-19 月名 0-5 月名 Tzolkin 13个月 天数为20个轮转 1mix 2--- 3--- … 问题 将Haab日期转换成Tzolkin日期 源程序 1008 源程序 作业总结 - 1013 题意 12枚硬币,其中一枚是假币,可能轻也可能重 称三次,每次左右硬币数目相等,结果:轻重平 问题 求出假币,并给出其轻重 源程序 1013源程序 问题的提出 给定N个球 有个比标准球重的次品混入其中 你有一架天平,用最少的次数找出这个次品。 N = 3 N = 9 更一般的情况 更一般的情况 更一般的情况 n = 3k+1, n = 3k+2和n=3k类似,也是均分成三堆 每次称量把范围大致缩小到原来的1/3 因此:从n个球中找次品至多要称[log3n]次。([]统一表示取上整) 判定树 判定树 叶子代表结果 非叶子代表一次称量 每个非叶子节点都有三个孩子,表示天平左偏、右偏、平衡 判定树 判定树 N个叶子的三叉树的深度h = [log3n] 小结 引进了有力工具:判定树。将主观的直觉严谨化。 三分法是解决这类问题的根本着眼点。 三分时必须充分的均匀 Problem Conqueror’s batalion Table of Contents The problem Solution The problem CENTRAL EUROPEAN OLYMPIAD IN INFORMATICS 30 June – 6 July 2002 Day 1: conquer Conqueror’s battalion Time limit: 1 s Memory limit: 16 MB The problem In the whole history of mankind one can find several curious battles, like the following one in France, in 1747. . . The problem There was a fortress in Bassignac-le- Haut, a small village lying on the left bank of river Dordogne, just over the Chastang dam. From the dam up to the fortress there was a wide staircase made out of red marble. The problem One day in the morning, the guard spotted a large battalion Approaching the fortress, with a dreaded leader – The Conqueror. The problem When The Conqueror reached the fortress, he was already awaited by its commandant. The commandant proposed: “I see that you have many soldiers behind you, standing on the stairs. We can play a small ‘game’: The problem In each round, you will divide your soldiers into two groups in an arbitrary way. Then I will decide which one of them stays and which one goes home. Each soldier that stays will then move up one stair. The problem If at least one of your soldiers reaches the uppermost stair, you will be the winner, in the other case, you will be the loser. The problem The Conqueror immediately liked this ga
您可能关注的文档
最近下载
- 2024年智慧树《中华国学》考试题库(含答案).pdf VIP
- 2023年江苏省泰州市中考地理试卷真题(附答案)+2022年地理试卷及答案.docx
- 二年级下册 看图写话 助人为乐.ppt
- GB-50618-2011房屋建筑和市政基础设施工程质量检测技术管理规范.pdf VIP
- 李澄-急性原发性肠脂垂炎CT诊断只是课件.ppt
- 考低压电工证模拟试题(练习题附答案).doc VIP
- 2025高中英语外刊时文阅读 《黑神话:悟空》英文介绍课件.pptx
- DB34T 1589-2012 建筑节能门窗应用技术规程.pdf VIP
- 第四课 共同开发建设祖国 《中华民族大团结》七年级全一册(初中).pptx VIP
- 新审计法党课培训.ppt VIP
文档评论(0)