顯示廣告
隱藏 ✕
※ 本文為 BruceX 轉寄自 ptt.cc 更新時間: 2013-11-22 15:05:48
看板 Tech_Job
作者 zaqimon (dream)
標題 Re: [請益] 今天去面試IC設計軟體工程師被打爆的題目
時間 Sat Nov 16 20:39:25 2013



https://en.wikipedia.org/wiki/Lottery_mathematics#Minimum_number_of_tickets_for_a_match
Lottery mathematics - Wikipedia, the free encyclopedia
Lottery mathematics is used here to mean the calculation of the probabilities in a lottery game. The lottery game used in the examples below is one in which one selects 6 numbers from 49, and hopes that as many of those 6 as possible match the 6 that are randomly selected from the same pool of 49 nu ...
 
or http://goo.gl/M6ON5q
Lottery mathematics - Wikipedia, the free encyclopedia
Lottery mathematics is used here to mean the calculation of the probabilities in a lottery game. The lottery game used in the examples below is one in which one selects 6 numbers from 49, and hopes that as many of those 6 as possible match the 6 that are randomly selected from the same pool of 49 nu ...
 

It is a hard, in most cases open, mathematical problem to calculate the
minimum number of tickets one needs to purchase to guarantee that at least
one of these tickets matches at least 2 numbers. In the 5-from-90 lotto, the
minimum number that can guarantee a ticket with at least 2 matches is 100.

目前我只找到這兩組答案
L(90,5,5,2) = 100
L(42,6,6,3) = 123

看來這題應該是數學系博士班的題目吧
就等某位數學大師發明出某種公式解或是上下限夾擠吧

就跟前陣子才有一位數學家證明了
存在無窮多組質數對他們之間的差小於七千萬
現在這個差值已經縮小到一萬以內了

※ 引述《irishcafee (愛爾蘭咖啡)》之銘言:
: 你的想法是對的!!只是你是從自選號碼的角度去思考。
: 要保證中獎應該是我的答案沒錯!!
: 因為高中比競賽和大學練ACM都有算到這一題。
: ※ 引述《ejnfu ((-. .-)b)》之銘言:
: : 純討論 說一下我的想法
: : 因為題目是說"最少"要買幾張就可以中3個號碼以上
: : 直覺上不用買這麼多
: : 如果我們把題目稍微簡化一點
: : 假設是6個號碼(1~6)任選3個開獎  只要2個與開獎號碼相同即有獎
: : 一樣是求最少要買幾張可以保證中獎
: : 如果按照上面的算法應該是:
: : C3取0 x C3取3 + C3取1 x C3取2 + 1 = 11
: : 但實際
: : 你只需要買2張
: : 123
: : 456
: : 就可以保證中獎了
: : 為什麼呢
: : 因為開獎的第一個號碼必定落在上面兩張其中一張
: : 如果要不中獎的話
: : 那麼接下來的號碼就不能開出那一張剩下的兩個號碼
: : 但這代表著
: : 剩下要開出的兩個號碼必定會落在第二張
: : 所以第二張必中獎
: : 所以這題應該可以買更少的張數來保證中獎吧?
: : 歡迎討論

--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 1.200.87.60
※ 編輯: zaqimon         來自: 1.200.87.60          (11/16 20:41)
※ 編輯: zaqimon         來自: 1.200.87.60          (11/16 20:55)
ckaha:你在開玩笑嗎  這題是高中數學而已1F 11/16 21:14
Dsman:按照題目原意是這樣沒錯吧..  應該說題目出的不好2F 11/16 21:17
poeoe:高中數學???? wiki來源都引Journal了3F 11/16 21:19
yenku:出乎意料的少呀4F 11/16 21:21
bbbing:把沒中的最大可能買掉再加一張,這不一定是最小保證值啊5F 11/16 22:37
bbbing:因為這種最差狀況中,你買的號碼分布是嚴重傾斜的
bbbing:實際上這變成是"已知中獎號碼,故意去買沒中的"
bbbing:未知的情況下,應該是平均分布,那只會更少不會更多
ckaha:抱歉  樓上幾位+原PO說的沒錯   我忽略真實購買狀況了9F 11/16 22:48

--
※ 看板: Tech_Job 文章推薦值: 0 目前人氣: 0 累積人氣: 3536 
r)回覆 e)編輯 d)刪除 M)收藏 ^x)轉錄 同主題: =)首篇 [)上篇 ])下篇