How should 50 red and 50 blue marbles be distributed between two jars so as to maximize the chance o

转载 2015年11月17日 16:50:22
Graduates on the 'i fucking love science group' are again debating this. Please show all your working:

You have 50 red marbles, 50 blue marbles and 2 jars.

Your friend will be randomly grabbing one marble from one of the jars. You must place all 100 marbles in the two jars however you'd like (you must use all 100 marbles and both jars). How would you maximize the chance that your friend will draw a red marble?


解答:The question is phrased vaguely, and consequently there are at least three different ways to interpret it:

1. Your friend will choose a jar uniformly at random, then choose a marble from that jar uniformly at random.

We want the average of the percentages of red marbles in both jars to be maximized.  If one jar contains more red than blue marbles, then the other jar contains more blue than red marbles.  Call these jars the "red jar" and the "blue jar," respectively [1].  Among all arrangements, the greatest possible probability that you draw a red marble from the red jar is 100%, realized in cases when there are no blue marbles in the red jar.  Among all arrangements, the greatest possible probability that you draw a red marble from the blue jar is 49/99, realized in the case when there are 49 red and 50 blue marbles in that jar.

Since the arrangement with one red marble in one jar and all the others in the other jar maximizes BOTH of the probabilities we're trying to maximize, it's optimal. [2] 

2. Your friend will examine the two jars, select a jar, and then take a marble uniformly at random from that jar, hoping to get a blue marble.(注意理解这种情况:你希望朋友取得红球的概率最大,然而朋友却希望取得蓝球,两个人的目标并不相同,真是坑朋友啊!!!)

In this case, if one jar has more red marbles than blue marbles, then the other has more blue marbles than red marbles, so you want to put equal numbers of red and blue marbles in each jar.

3. Your friend will examine the two jars, select a jar, and then take a marble at random from that jar, hoping to get a red marble.

This is the easiest case: just arrange it so that one of the jars doesn't have any blue marbles in it.

[1] If you want to be completely formal, let's say that if both jars have the same number of red and blue marbles then we assign the labels "red jar" and "blue jar" arbitrarily.

[2] This is of course the same as Anonymous' answer, which was posted while I was typing this up. Michael Hochster's answer and Breno Sakaguti's answer come to the same conclusion, but I like this version of the argument better. Of course, I only appreciate it because I understand their brute-force and more generalizable solutions to the problem; for someone who didn't, this might not be the best place to start.  In general in such a problem you won't be able to maximize both probabilities simultaneously, so you'd have to do something more like the other solutions.


相关文章推荐

The Difference between <resource-ref> and <resource-env-ref>,the title should be long...

Howdy  Good question (and one you should know for the exam) resource-ref is for "resource manager ...

mysql:Table 'xxxxx' is marked as crashed and should be repaired

MYSQL的MyISAM出了两次问题了,两次都是报Table 'xxxxx' is marked as crashed and should be repaired,上次是另外一个数据库,这次是这个数...

Error 'Table './csf/tmp_excel_data' is marked as crashed and should be repaired' on opening tables

主从同步出错了,从库里面的show slave status中报错如下: Error 'Table './csf/tmp_excel_data' is marked as crashed and s...

快速解决"****table is marked as crashed and should be repaired"故障

找到mysql的安装目录的bin/myisamchk工具,在命令行中输入: myisamchk -c -r ../data/tablename/posts.MYI 然后myisamchk ...
  • Tankcc
  • Tankcc
  • 2012年12月06日 10:41
  • 407

mysql错误:Table XXX is marked as crashed and should be repaired

Table '.\Tablename\posts' is marked as crashed and should be repaired 提示说论坛的帖子表posts被标记有问题,需要修复。我记得...
  • lhh1002
  • lhh1002
  • 2011年09月28日 16:47
  • 357

mysql: "tablename" is marked as crashed and should be repaired修复 问题分析: 当mysql出现这类提示时,大部分的现象为查询不到正常的

问题分析: 当mysql出现这类提示时,大部分的现象为查询不到正常的表记录,或者只能查询到部分。 主要的原因是对应表的索引文件被损坏,导致索引文件损坏的可能原因有: 频繁的读写表记录数据库服...
  • five3
  • five3
  • 2017年07月19日 16:44
  • 289

mysql Table 'XXX' is marked as crashed and should be repaired

平时用得好好的mysql 数据库,今天突然遇到 Table ‘XXX’ is marked as crashed and should be repaired 错误。不知道是什么原因造成的,在网上收集...

mysql错误:Table XXX is marked as crashed and should be repaire

一日正在上班,朋友的QQ图标就激烈的闪亮起来,一看,原来是论坛出现问题了,具体报错如下: Table '.\Tablename\posts' is marked as crashed and s...

快速解决"is marked as crashed and should be repaired"故障

具体报错如下: Table '.\Tablename\posts' is marked as crashed and should be repaired 提示说论坛的帖子表posts被标...
  • Tankcc
  • Tankcc
  • 2016年08月05日 10:45
  • 16870

[MySQL]快速解决"is marked as crashed and should be repaired"故障

转自:http://www.cnblogs.com/hakuci/archive/2012/03/20/2407723.html
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:How should 50 red and 50 blue marbles be distributed between two jars so as to maximize the chance o
举报原因:
原因补充:

(最多只允许输入30个字)