Chinaunix首页 | 论坛 | 博客
  • 博客访问: 753867
  • 博文数量: 217
  • 博客积分: 2401
  • 博客等级: 大尉
  • 技术积分: 2030
  • 用 户 组: 普通用户
  • 注册时间: 2008-03-16 06:58
个人简介

怎么介绍?

文章分类

全部博文(217)

文章存档

2023年(2)

2022年(3)

2021年(29)

2020年(12)

2019年(5)

2018年(5)

2017年(5)

2016年(3)

2015年(6)

2014年(12)

2013年(16)

2012年(9)

2011年(6)

2010年(15)

2009年(30)

2008年(59)

我的朋友

分类:

2008-04-10 14:21:16


" You are given 5 bags containing 100 coins each. The bags can contain
c
oins of 3 different types that look identical. The first type weighs 9 g
rams, the second type 10 and the third type 11 grams. Each bag contains
coins of equal weight but you do not know how many of the 5 bags are of
the different types. (i.e. all 5 bags might well contain 9 gram coins as
far as you are concerned). You are given a huge digital balance. How ma
ny times do you need to use the balance to clearly determine the type of
coin contained in each bag?



1 coin from bag 1
3 coins from bag 2
9 coins from bag 3
27 coins from bag 4
81 coins from bag 5

You are done.



是不是需要把结果分解成
a0+a1*3+a2*9+a3*27+a4*81
来判断每个盒子装的是哪种coin?

把和mod 3 得到 a0

然后 mod 9 结合 a0 得到 a1,依次类推

Edit:

For n different types of coin in m bags, we choose

n^0 from the first bag

n^1 from the second bag

n^2 from the third

...

...

n^(m-1) from the m-th

阅读(697) | 评论(0) | 转发(0) |
0

上一篇:Vega

下一篇:options

给主人留下些什么吧!~~