当前位置:网站首页>2022阿里巴巴全球数学竞赛 第4题 虎虎生威(盲盒问题、集卡问题)解决思路
2022阿里巴巴全球数学竞赛 第4题 虎虎生威(盲盒问题、集卡问题)解决思路
2022-07-02 04:52:00 【MICAHHH】
题目
来自 2022阿里巴巴全球数学竞赛 第4题(单选题)
基础概念
数学期望
在概率论和统计学中,数学期望(mathematic expectation)(或均值,亦简称期望)是试验中每次可能结果的概率乘以其结果的总和,是最基本的数学特征之一。
在这道题中,数学期望就是平均需要抽多少张卡才能集齐。
假如胖虎想赢一把就睡觉,赢的概率是1/10的话,需要的次数及其概率的关系,是几何分布的(前面都失败,最后一次成功,就是几何分布),概率平均值10就是胖虎平均需要的次数。(10场最后一场赢了,这种情况概率约为0.04,但是却是整个概率图的平均概率,对应的10就是平均次数了)
满足几何分布的问题,从计算上会有个简单的公式——期望就是概率的倒数。
胖虎10%的成功概率,期望当然就是10。
题解
“虎生威”问题
数学期望 = 1(第一次抽到任意卡)+ 3/2(第二次抽到不重复的卡)+ 3(第三次抽到不重复的卡) = 5.5
“水浒传108卡”问题
也是数学期望相乘
数学推导后就算出了期望:568(平均需要买568包)
可以看到,n越大,数学期望就越大。
“虎虎生威”问题
出现了“重复”的情况。
此题可以用蒙特卡罗方法求解
蒙特卡罗方法又称统计模拟法、随机抽样技术,是一种随机模拟方法,以概率和统计理论方法为基础的一种计算方法,是使用随机数(或更常见的伪随机数)来解决很多计算问题的方法。将所求解的问题同一定的概率模型相联系,用电子计算机实现统计模拟或抽样,以获得问题的近似解。为象征性地表明这一方法的概率统计特征,故借用赌城蒙特卡罗命名。
算法如下:(就是很多次模拟,每一次都循环抽卡直到抽到虎虎生威为止,记录次数,最终算平均次数)
考虑到时间问题,需要更加科学的方法求解。
我们进行分类讨论。
需要抽到四张卡,所以我们将各种集齐卡片的情况分类出来,每种情况都会有四轮,到哪一轮就代表抽到了第几张卡,计算需要的次数(也就是这一轮的期望)。
第一轮期望 | 第二轮期望 | 第三轮期望 | 第四轮期望 | |
---|---|---|---|---|
第一轮抽到虎 | 1(虎) | 1(随意) | 3/2 | 3 |
第一轮抽到生,第二轮抽到虎 | 1(生) | 1(虎) | 3/2 | 3 |
第一轮抽到生,第二轮抽到威 | 1(生) | 1(威) | 3 | 3 |
第一轮抽到生,第二轮抽到生 | 1(生) | 1(生) | / | / |
第一轮抽到威,第二轮抽到虎 | 1(威) | 1(虎) | 3/2 | 3 |
第一轮抽到威,第二轮抽到威 | 1(威) | 1(威) | / | / |
第一轮抽到威,第二轮抽到生 | 1(威) | 1(生) | 3 | 3 |
表中,第一轮和第二轮都为1的原因,就是因为情况被分出来了,抽到哪个是被我们确定了,所以概率为1,期望为1。
/ 代表此情况特殊,因为抽到生相当于回到了原点。
看似无法算下去,其实我们只要将第一轮抽到生和第二轮抽到生的情况都设为x,那么就能够算出x的数学期望是多少。
x(第一轮抽到生) = 1/3(第二轮抽到虎) * 9/2 + 1/3(第二轮抽到威) * 6 + 1/3 * x(第二轮抽到生)+ 1(第二轮的一次)
注:其实也可以理解为:
x(第一轮抽到生) = 1/3(第二轮抽到虎) * 11/2 + 1/3(第二轮抽到威) * 7 + 1/3 * (x+1)(第二轮抽到生)
最终得到x是27/4
同理,也可以得到第一次抽中威的情况也是27/4
那么表格变为:
最终数学期望就是三种情况相乘,等于7.333。
边栏推荐
- [graduation season · advanced technology Er] young people have dreams, why are they afraid of hesitation
- Go GC garbage collection notes (three color mark)
- MySQL table insert Chinese change? Solution to the problem of No
- Social media search engine optimization and its importance
- How do I interview for a successful software testing position? If you want to get a high salary, you must see the offer
- Ten thousand volumes are known to all, and one page of a book is always relevant. TVP reading club will take you through the reading puzzle!
- 10 minute quick start UI automation ----- puppeter
- Exposure X8 Standard Version picture post filter PS, LR and other software plug-ins
- Precipitate yourself and stay up late to sort out 100 knowledge points of interface testing professional literacy
- Cannot activate CONDA virtual environment in vscode
猜你喜欢
win11安装pytorch-gpu遇到的坑
Idea automatic package import and automatic package deletion settings
Rhcsa --- work on the third day
[high speed bus] Introduction to jesd204b
CorelDRAW graphics suite2022 free graphic design software
Let genuine SMS pressure measurement open source code
06 装饰(Decorator)模式
Summary of main account information of zhengdaliu 4
万卷共知,一书一页总关情,TVP读书会带你突围阅读迷障!
Orthogonal test method and function diagram method for test case design
随机推荐
Lay the foundation for children's programming to become a basic discipline
洛谷入门3【循环结构】题单题解
oracle 存储过程与job任务设置
Detailed process of DC-1 range construction and penetration practice (DC range Series)
Use of Baidu map
Learn what definitelytyped is through the typescript development environment of SAP ui5
Starting from the classification of database, I understand the map database
Federal learning: dividing non IID samples according to Dirichlet distribution
C language practice - binary search (half search)
Deep understanding of lambda expressions
What are the rules and trading hours of agricultural futures contracts? How much is the handling fee deposit?
Interview question: do you know the difference between deep copy and shallow copy? What is a reference copy?
win10 磁盘管理 压缩卷 无法启动问题
解决:代理抛出异常错误
Rhcsa --- work on the fourth day
How to configure PostgreSQL 12.9 to allow remote connections
ansible安装与使用
Solution: the agent throws an exception error
正大留4的主账户信息汇总
ThinkPHP kernel work order system source code commercial open source version multi user + multi customer service + SMS + email notification