10. Dictionaries

Поделиться
HTML-код
  • Опубликовано: 11 дек 2024

Комментарии • 7

  • @macewindu1827
    @macewindu1827 7 лет назад +1

    A Question on Universality vs. Pair-Wise independence:
    The output of a hash function is used to map a particular value to a particular slot. The same output value hashes to the same slot.
    h(x) = h(y) means that the output of the hashing function for key x is the same as the output for the hashing function for key y. If the outputs are the same, the keys will hash to the same slot; if they are different, they will hash to different slots.
    In pair-wise independence, the probability that h(x1) maps to a particular slot t1 is 1/m. The probability that h(x2) maps to the SAME slot is 1/m and to a different slot is (m-1)/m. Therefore, the probability that the two outputs have the same output value is 1/(m^2).
    I've just asserted that the probability for the same event (two items hashing to the same slot) can be two different things, (1/m and 1/m^2) which is clearly wrong.
    Where am I getting tripped up on this?
    Thank you in advance!

    • @digama0
      @digama0 6 лет назад

      The probability that h(x) = h(y) = t for some specific t is 1/m^2 (since this is the intersection of independent events h(x) = t, h(y) = t), but if you consider all m possibilities for t, the total is 1/m^2 * m = 1/m, which gives the probability that h(x) = h(y).

  • @EN-hm6zx
    @EN-hm6zx 11 месяцев назад

    1:09:17
    cuckoo hashing

  • @roylee3196
    @roylee3196 8 лет назад +1

    great lecture!

  • @lukaszplachecki8723
    @lukaszplachecki8723 4 месяца назад

    🎉

  • @DEFINITELYNOTBORED
    @DEFINITELYNOTBORED 2 года назад

    😲😲😲

  • @xagent6327
    @xagent6327 8 месяцев назад

    :)