作者zaqimon (dream)
看板Tech_Job
標題Re: [請益] 今天去面試IC設計軟體工程師被打爆的題目
時間Sat Nov 16 20:39:25 2013
https://en.wikipedia.org/wiki/Lottery_mathematics#Minimum_number_of_tickets_for_a_match or
http://goo.gl/M6ON5q 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:你在開玩笑嗎 這題是高中數學而已 11/16 21:14
推 Dsman:按照題目原意是這樣沒錯吧.. 應該說題目出的不好 11/16 21:17
推 poeoe:高中數學???? wiki來源都引Journal了 11/16 21:19
推 yenku:出乎意料的少呀 11/16 21:21
This entry passed through the Full-Text RSS service — if this is your content and you're reading it on someone else's site, please read the FAQ at fivefilters.org/content-only/faq.php#publishers. FiveFilters.org recommends: March Against Mainstream Media (More info).