Robin-Hood Hashing in Data Structure


In this section we will see what is Robin-Hood Hashing scheme. This hashing is one of the technique of open addressing. This attempts to equalize the searching time of element by using the fairer collision resolution strategy. While we are trying to insert, if we want to insert element x at position xi, and there is already an element y is placed at yj = xi, then the younger of two elements must move on. So if i ≤ j, then we will try to insert x at position xi+1, xi+2 and so on. Otherwise we will store x at position xi, and try to insert y at position yj+1, yj+2 and so on.

According to Devroye et al. show that after performing n insertions on an initially empty table, whose size is 𝑚 = Α𝑛, using the Robin-Hood insertion algorithm, the expected value of worst case search time is −

$$E[W]=\Theta(log\:log\:n)$$

And its bound is tight. So this algorithm is a form of Open addressing, that has doubly logarithmic worst-case search time.

Updated on: 11-Aug-2020

234 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements