因為固定長度,所以checksum呢件事保證會有重覆(白鴿籠原則)

但對於某一特定chekcum
譬如   ba1f2511fc30423bdbb183fe33f3dd0f
有冇保證會有重覆呢?
(好似唔關programming事)

但對於某一特定chekcum
譬如   ba1f2511fc30423bdbb183fe33f3dd0f
有冇保證會有重覆呢?
(好似唔關program ...
Wiwacomia 發表於 2024-3-27 15:09


你講緊咩? 你都識講 pigeonhole principle, 每個 checksum 都可以 derived from many inputs

TOP

你講緊咩? 你都識講 pigeonhole principle, 每個 checksum 都可以 derived from many inputs ...
xader 發表於 2024-3-27 19:01


32位=只有固定個獨立數值,多咗input=有啲output會重覆,
唔代表必然有多個input可以生成特定ba1f....呢個output呀。
可以無限個input生成有限個32位數字,其中每個output出現頻率不同呀

以上係單憑白鴿籠原則諗出來,
實際條數點生成冇睇

TOP

32位=只有固定個獨立數值,多咗input=有啲output會重覆,
唔代表必然有多個input可以生成特定ba1f.... ...
Wiwacomia 發表於 2024-3-27 19:20



    Uniformity
A good hash function should map the expected inputs as evenly as possible over its output range. That is, every hash value in the output range should be generated with roughly the same probability. The reason for this last requirement is that the cost of hashing-based methods goes up sharply as the number of collisions—pairs of inputs that are mapped to the same hash value—increases. If some hash values are more likely to occur than others, a larger fraction of the lookup operations will have to search through a larger set of colliding table entries.

你講緊 Hash function uniformity

TOP

本帖最後由 Wiwacomia 於 2024-3-27 21:55 編輯
Uniformity
A good hash function should map the expected inputs as evenly as possible over its ...
xader 發表於 2024-3-27 20:52



    係啦,咁一般用到的方法都應該係好的啦,咁佢地有冇保證#1所講嘅嘢?
因為如果只有一個值特別係unique,其餘平均,都非常之平均

TOP

係,一定會有重覆checksum 但唔同input

TOP

係,一定會有重覆checksum 但唔同input
淚v3v 發表於 2024-3-29 22:41



    都話唔係講白鴿籠咯
無限個波0,1,2,3...號放入三個籃ABC,
單數放A,雙數放B,兩者都不就放C。
「對於某一特定chekcum」C,係unique。

TOP

白鴿籠愈少愈容易重覆

但對於某一特定chekcum
譬如   ba1f2511fc30423bdbb183fe33f3dd0f
有冇保證會有重覆呢?
(好似唔關program ...
Wiwacomia 發表於 2024-3-27 15:09

TOP

都話唔係講白鴿籠咯
無限個波0,1,2,3...號放入三個籃ABC,
單數放A,雙數放B,兩者都不就放C。
「對 ...
Wiwacomia 發表於 2024-3-30 00:30


其實唔係好明你up 乜
checksum 定 chekcum?
你不如組織下先

TOP

其實唔係好明你up 乜
checksum 定 chekcum?
你不如組織下先
淚v3v 發表於 2024-3-30 16:24


#7 例子,C係unique。
而家一般用到的checksum,有冇保證冇C出現
咁樣明唔明?

TOP