今天去面試IC設計軟體工程師被打爆的題目 - 工程師
By Michael
at 2013-11-20T20:15
at 2013-11-20T20:15
Table of Contents
: (2)大樂透的規則是 49 個號碼當中,取 6 個號碼開獎;只要彩券有 3 個以上的號碼與
: 開獎結果相同,就是中獎。依此規則請問:
: a. 最少需買幾張才可以保證中一張?
: b. 概述如何以程式驗證 a.的答案。
其實如果能解出這題的話,可以去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 Michael
at 2013-11-24T01:33
at 2013-11-24T01:33
By Regina
at 2013-11-26T01:50
at 2013-11-26T01:50
By Blanche
at 2013-11-30T23:51
at 2013-11-30T23:51
By Selena
at 2013-12-02T06:53
at 2013-12-02T06:53
By Dorothy
at 2013-12-06T17:10
at 2013-12-06T17:10
By Daph Bay
at 2013-12-06T22:26
at 2013-12-06T22:26
By Brianna
at 2013-12-07T17:36
at 2013-12-07T17:36
By Doris
at 2013-12-08T12:22
at 2013-12-08T12:22
By Freda
at 2013-12-09T05:12
at 2013-12-09T05:12
By Aaliyah
at 2013-12-10T08:17
at 2013-12-10T08:17
By Freda
at 2013-12-11T19:48
at 2013-12-11T19:48
By Leila
at 2013-12-16T01:17
at 2013-12-16T01:17
By Franklin
at 2013-12-19T06:22
at 2013-12-19T06:22
By David
at 2013-12-19T10:00
at 2013-12-19T10:00
By David
at 2013-12-22T00:54
at 2013-12-22T00:54
By Aaliyah
at 2013-12-26T18:46
at 2013-12-26T18:46
By Odelette
at 2013-12-27T07:33
at 2013-12-27T07:33
By Damian
at 2013-12-31T17:17
at 2013-12-31T17:17
By Hazel
at 2014-01-01T01:00
at 2014-01-01T01:00
By Thomas
at 2014-01-03T02:29
at 2014-01-03T02:29
By Ula
at 2014-01-07T07:16
at 2014-01-07T07:16
By Caroline
at 2014-01-09T03:13
at 2014-01-09T03:13
Related Posts
offer請益 (群創、頎邦)
By Damian
at 2013-11-20T19:14
at 2013-11-20T19:14
佳和桂這間公司
By Dinah
at 2013-11-20T17:46
at 2013-11-20T17:46
Avery 亞睿 研替面試
By John
at 2013-11-20T17:36
at 2013-11-20T17:36
3
By Candice
at 2013-11-20T16:57
at 2013-11-20T16:57
世界先進專業測驗
By Damian
at 2013-11-20T16:11
at 2013-11-20T16:11