[理工] hash function (probability)

看板Grad-ProbAsk作者 (JacobSyu)時間11年前 (2015/01/22 11:24), 編輯推噓1(107)
留言8則, 3人參與, 最新討論串1/1
102交大 計算機系統 第6題 The ideal one way hash function is collision free. Given y=h(x). Suppose x is of infinite length and y is of 8 bits. What is the probability that two different inputs, x and x', of the hash function collide? Ans.2/256=1/128 原因為何? 矛盾:y=h(x)為collision free, x and x'不同,怎麼可能產生collide? 機率應該為0? -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 220.138.218.240 ※ 文章網址: https://www.ptt.cc/bbs/Grad-ProbAsk/M.1421897099.A.DF0.html

01/22 11:55, , 1F
這題答案應該是1/256唷,ideal說的是理想情況,實際上只
01/22 11:55, 1F

01/22 11:55, , 2F
能越低越好。x和x'不一樣,但是透過h(x)的轉換可能會對
01/22 11:55, 2F

01/22 11:55, , 3F
到同一個bucket,而y有8bits,所以有2^8個bucket,碰撞
01/22 11:55, 3F

01/22 11:55, , 4F
機率為1/256。
01/22 11:55, 4F

01/22 12:14, , 5F
謝謝 1/256我就可以理解了
01/22 12:14, 5F

01/22 12:15, , 6F
但是選項沒有1/256...只有(a)0 (b)1 (c)1/8 (d)1/128
01/22 12:15, 6F

01/22 12:39, , 7F
1/256在下一頁最上面喔~
01/22 12:39, 7F

01/22 13:55, , 8F
謝謝...
01/22 13:55, 8F
文章代碼(AID): #1Km6sBtm (Grad-ProbAsk)