回复:IBM 11月:猜因子(2.5星)

来源: AceOnRiver 2009-11-03 07:06:27 [] [旧帖] [给我悄悄话] 本文已被阅读: 次 (620 bytes)
本文内容已被 [ AceOnRiver ] 在 2009-12-19 10:40:17 编辑过。如有问题,请报告版主或论坛管理删除.
1. 5
the worst case: asking the whether the number can be divided by 2,3,5,7 or 11.

2. 53/23
if the minimum divisor is 2, need to ask only 1 question, we have [162/2]=81 such numbers;
if the minimum divisor is 3, minimum 2 questions, we have [162/2]-[162/6]=27 such numbers;
similarly, for minimum divisor of 5, 11 numbers and 3 questions; for minimum divisor of 7, 7 numbers and 4 questions; for minimum divisor of 11, 3 numbers and 5 questions; for prime numbers greater than 11, 32 numbers and 5 questions.
so the expected value is (81*2+27*2+11*3+7*4+3*5+32*5)/161 = 371/161 = 53/23

所有跟帖: 

Correction -AceOnRiver- 给 AceOnRiver 发送悄悄话 (188 bytes) () 11/03/2009 postreply 12:11:20

请您先登陆,再发跟帖!

发现Adblock插件

如要继续浏览
请支持本站 请务必在本站关闭/移除任何Adblock

关闭Adblock后 请点击

请参考如何关闭Adblock/Adblock plus

安装Adblock plus用户请点击浏览器图标
选择“Disable on www.wenxuecity.com”

安装Adblock用户请点击图标
选择“don't run on pages on this domain”