O GoConqr está de visual novo! Conte para nós o que você achou.

Flashcards

Hash Functions

msladey Algorithms University Inglês 12 flashcards

Hash Functions

Flashcards do conjunto (12)

  1. 1What do we store in a dictionary data structure? What three operations should we be able to perform?We store (key,value) pairs. We want to perform add(x,v), lookup(x) and delete(x)
  2. 2What does a hash function do?What does a hash function do?
  3. 3What data structure is used, when collisions are resolved by chaining?Linked Lists
  4. 4When building a linked list with chaining, what are the time complexities for add, lookup and delete?O(1), O(length of chain containing x), O(length of chain containing x)
  5. 5If h(x) and h(y) are chosen uniformly and independantly from [m], what is Pr(h(x) = h(y))?1/m
  6. 6What is the expected run time per operation if we use a random hash function with chaining?What is the expected run time per operation if we use a random hash function with chaining?
  7. 7For each key in U, we specify an arbitrary position in T. Why is this a bad choice for a random hash function?We need ulogm bits, which is a ridiculous amount of space
  8. 8Why can we not just pick the hash function when we first see x?We would need to recall the hash function we use, therefore needing a dictionary to solve the dictionary problem!
  9. 9Define Weakly Universal HashingDefine Weakly Universal Hashing
  10. 10Explain why this scheme is weakly universalax + b is a linear transformation which spreads the keys over p values when taken modulo p. This causes no collisions. Only when taken modulo m do we get colliisionsExplain why this scheme is weakly universal
  11. 11What is the lemma for the longest chain in true randomness hashing?What is the lemma for the longest chain in true randomness hashing?
  12. 12What is the lemma for the longest chain in weakly universal hashing?What is the lemma for the longest chain in weakly universal hashing?

Informações

Descrição
Hashing
Criado por
msladey
Visualizações
63
Avaliação

Fale Conosco

Sobre o que é sua mensagem?

O que você acha do novo visual?

Você gostou?