今天去面試IC設計軟體工程師被打爆的題目 - 工程師
By Emily
at 2013-11-22T00:15
at 2013-11-22T00:15
Table of Contents
我跟J一樣想法
總張數 X = C(49, 6)
中獎張數 Y = C(6,6)*C(43,0)+C(6,5)*C(43,1)+C(6,4)*C(43,2)+C(6,3)*C(43,3)
槓龜張數 Z = X - Y
想像自己正在對獎,最倒楣要對幾張才會中
一直對不中的機率 = Z/X * (Z-1)/(X-1) * (Z-2)/(X-2) * ......* (Z-n)/(X-n) = 0
理論上,買 Z+1 張必中
實際上,看n為多少可以讓不中的機率趨近於0
那買n+1張大概就會中了
※ 引述《javatea (:))》之銘言:
: MIT教授沒那麼簡單 好嗎...
: 這不是什麼難解的問題吧
: 英文看起來有比較高級嗎? 有幾個人是真的看過這到底是寫什麼?
: 今天問你49個號碼選6個號碼開獎 (中獎定義:3個以上相同球)
: 問你最少要買幾張可以期望中一張
: 這應該只是數字大了一點而已
: 把問題簡化成 6個號碼開2個號碼開獎 (中獎定義:1個以上相同球)
: 大家會算不出來?
: ex:把所有中獎機率算出來 得到一個機率, 就可以算期望值了
: 面試遇到問題很複雜數字很大 別一開始就被嚇到
: 試著去拆問題 簡化問題
: 面試也就是看你處理問題的想法而已
: 另外英文不好就別亂用google
: ※ 引述《maplefog (楓霧)》之銘言:
: : 其實如果能解出這題的話,可以去MIT當數學教授,
: : 真正的解答還沒有人解出來,
: : 有找到一篇文章,
: : 目前找到的上界為163張,解法如下:
: : 參考請google:Betting Wheels, Lotteries & Lotto Designs
: : We can get an upper bound by noticing the construction that gives:
: : L(49,6,6,3) <= L(22,6,3,3) + L(27,6,4,3) <= 77+86 = 163.
: : Proof: Take any p=6-set out of the 49 elements. Either there are at least 3
: : elements from the 22 elements and we have one of the 77 blocks intersecting
: : the 6-set in at least three elements or there are at least 4 elements from
: : the 27 elements and there is a block intersecting the 6-set in at least 3
: : elements.
: : Now LD(22,6,3,3;77) is a well-known combinatorial design and you could not
: : get a better lotto design.
: : Whereas LD(27,6,4,3;86) was found by a computer program using a simulated
: : annealing algorithm. It can probably be improved.
: : But even if LD(27,6,4,3;86) was the best you could do, there may be better
: : ways to split the 49 elements or better different constructions.
: : 所以原PO被洗臉別太難過,因為主管連自己也不知道答案
--
總張數 X = C(49, 6)
中獎張數 Y = C(6,6)*C(43,0)+C(6,5)*C(43,1)+C(6,4)*C(43,2)+C(6,3)*C(43,3)
槓龜張數 Z = X - Y
想像自己正在對獎,最倒楣要對幾張才會中
一直對不中的機率 = Z/X * (Z-1)/(X-1) * (Z-2)/(X-2) * ......* (Z-n)/(X-n) = 0
理論上,買 Z+1 張必中
實際上,看n為多少可以讓不中的機率趨近於0
那買n+1張大概就會中了
※ 引述《javatea (:))》之銘言:
: MIT教授沒那麼簡單 好嗎...
: 這不是什麼難解的問題吧
: 英文看起來有比較高級嗎? 有幾個人是真的看過這到底是寫什麼?
: 今天問你49個號碼選6個號碼開獎 (中獎定義:3個以上相同球)
: 問你最少要買幾張可以期望中一張
: 這應該只是數字大了一點而已
: 把問題簡化成 6個號碼開2個號碼開獎 (中獎定義:1個以上相同球)
: 大家會算不出來?
: ex:把所有中獎機率算出來 得到一個機率, 就可以算期望值了
: 面試遇到問題很複雜數字很大 別一開始就被嚇到
: 試著去拆問題 簡化問題
: 面試也就是看你處理問題的想法而已
: 另外英文不好就別亂用google
: ※ 引述《maplefog (楓霧)》之銘言:
: : 其實如果能解出這題的話,可以去MIT當數學教授,
: : 真正的解答還沒有人解出來,
: : 有找到一篇文章,
: : 目前找到的上界為163張,解法如下:
: : 參考請google:Betting Wheels, Lotteries & Lotto Designs
: : We can get an upper bound by noticing the construction that gives:
: : L(49,6,6,3) <= L(22,6,3,3) + L(27,6,4,3) <= 77+86 = 163.
: : Proof: Take any p=6-set out of the 49 elements. Either there are at least 3
: : elements from the 22 elements and we have one of the 77 blocks intersecting
: : the 6-set in at least three elements or there are at least 4 elements from
: : the 27 elements and there is a block intersecting the 6-set in at least 3
: : elements.
: : Now LD(22,6,3,3;77) is a well-known combinatorial design and you could not
: : get a better lotto design.
: : Whereas LD(27,6,4,3;86) was found by a computer program using a simulated
: : annealing algorithm. It can probably be improved.
: : But even if LD(27,6,4,3;86) was the best you could do, there may be better
: : ways to split the 49 elements or better different constructions.
: : 所以原PO被洗臉別太難過,因為主管連自己也不知道答案
--
All Comments
By Frederic
at 2013-11-23T16:08
at 2013-11-23T16:08
By Selena
at 2013-11-27T19:07
at 2013-11-27T19:07
By Dinah
at 2013-12-01T16:09
at 2013-12-01T16:09
By Belly
at 2013-12-04T14:04
at 2013-12-04T14:04
By William
at 2013-12-04T15:47
at 2013-12-04T15:47
By Ophelia
at 2013-12-05T09:24
at 2013-12-05T09:24
By William
at 2013-12-06T22:12
at 2013-12-06T22:12
By Rae
at 2013-12-11T21:59
at 2013-12-11T21:59
By Leila
at 2013-12-15T07:38
at 2013-12-15T07:38
By Ophelia
at 2013-12-18T02:35
at 2013-12-18T02:35
By Eden
at 2013-12-22T12:57
at 2013-12-22T12:57
By Charlotte
at 2013-12-27T05:00
at 2013-12-27T05:00
By Delia
at 2013-12-31T07:46
at 2013-12-31T07:46
By Connor
at 2014-01-04T11:15
at 2014-01-04T11:15
By Zanna
at 2014-01-06T13:31
at 2014-01-06T13:31
By Zenobia
at 2014-01-07T06:48
at 2014-01-07T06:48
By Carolina Franco
at 2014-01-09T21:23
at 2014-01-09T21:23
By Ida
at 2014-01-13T21:49
at 2014-01-13T21:49
By Gary
at 2014-01-14T20:38
at 2014-01-14T20:38
By Necoo
at 2014-01-17T13:07
at 2014-01-17T13:07
By Sandy
at 2014-01-19T22:29
at 2014-01-19T22:29
By Agnes
at 2014-01-22T05:16
at 2014-01-22T05:16
By Barb Cronin
at 2014-01-26T01:58
at 2014-01-26T01:58
By Yuri
at 2014-01-26T14:03
at 2014-01-26T14:03
By Gilbert
at 2014-01-29T02:59
at 2014-01-29T02:59
Related Posts
offer選擇
By Rosalind
at 2013-11-21T22:36
at 2013-11-21T22:36
研替心得 (Mozilla/美商謀智)
By Hamiltion
at 2013-11-21T21:18
at 2013-11-21T21:18
今天去面試IC設計軟體工程師被打爆的題目
By Bethany
at 2013-11-21T20:48
at 2013-11-21T20:48
凌陽科技研替面試
By Ethan
at 2013-11-21T19:56
at 2013-11-21T19:56
南科 IC設計
By Eartha
at 2013-11-21T19:39
at 2013-11-21T19:39