# How do you compare associativity (in cache) to chaining in hash table?

220 views
How do you compare associativity (in cache) to chaining in hash table?
in Revision

1 vote
In Associative Cache, all main memory blocks goes to same slot using function K mod N, same thing in chaining. K is main memory block no, N number of Cache Lines. If number of cache lines and number of slots in hash map are same, then there is direct relation ship between them.

## Related questions

1
2.6k views
Consider a hash table with $m$ slots that uses chaining for collision resolution. The table is initially empty. What is the probability that after 4 keys are inserted that at least a chain of size 3 is created? (Assume simple uniform hashing is used) $m^{&ndash;2}$ $m^{&ndash;4}$ $m^{&ndash;3} (m &ndash; 1)$ $3m^{&ndash;1}$
The number of different insertion sequences of numbers $\left \{ 7,20,32,50,66,77 \right \}$ on an initially empty hash table H of size $6$ and a hash function $h\left ( k \right )=k\mod6$ with linear probing scheme for collision resolution such that the hash table obtained after the insertion looks as ... ${\color{Blue} {2}}$ ${\color{Blue} {3}}$. ${\color{Blue} {4}}$ ${\color{Blue} {5}}$