Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
46 views

I ask this in the context of hashing where a prime greater than some constant is required for example in universal hashing: h(k) = [(a.k+b) mod p] mod m a and b are random numbers m is the size of ...
dk dk's user avatar
  • 1
5 votes
2 answers
2k views

I have input keys that can cheaply be converted to a uint64_t (ie, the input contains less than or equal to 64 bits). Each unique key (not yet in the map) will be assigned some data (a pointer to an ...
Carlo Wood's user avatar
  • 7,155
1 vote
0 answers
488 views

I was hoping to create an easily memorable hash something like 3 random words (what3words), so the idea would be to hash a java object and the result was three random words. Use case: I have objects ...
Henry Hargreaves's user avatar
0 votes
1 answer
591 views

I have some troubles understanding the implementation of a universal hash function in Java. The hash function (ax + b) mod p should be implemented in base of H_1. Also this implementation should work ...
Jan Lauber's user avatar
0 votes
1 answer
44 views

I want to save some data in a file like .cvs. One of the condition is, that the data can't change after write in the file. If I want to read the data, it should be save that the data were not change ...
Christian01's user avatar
1 vote
0 answers
117 views

We have n elements , m=2n and k, where K is the number of hash functions, m being the size of bit array and n the number of elements. What will be the value of k such that the probability of getting a ...
Razor's user avatar
  • 99
0 votes
1 answer
237 views

I'm trying to understand the usefullness of universal hashing over normal hashing, other than the function is randomly produced everytime, reading Cormen's book. From what i understand in universal ...
Antonis Paragioudakis's user avatar
0 votes
1 answer
730 views

In this problem, I was given the follow mapping U = {0, 1, 2, 3, 4, 5, 6, 7} to {0, 1} From this, there is an explicit universal hashing function that must be derived, with the hint that this can be ...
Joe Cur's user avatar
  • 45
-2 votes
1 answer
703 views

I wan't to generate token to verify the email of users, I learn about universal hashing (selecting a hash function at random from a family of hash functions) and I wrote this code in PHP Is it a ...
Trebizonder's user avatar
1 vote
1 answer
648 views

I'm looking for a quick and easy way to use a (universal) family of pairwise independent hash functions in my Java projects. Ideally, I would have some object UniversalFamily (representing the Family)...
PlsWork's user avatar
  • 2,208
0 votes
0 answers
82 views

I'm currently implementing a HashTable in C++ using universal hashing (matrix hashing). The way I implement the matrix is by making an array of pointers (which are merely random bits, they do not "...
mmiranda96's user avatar
1 vote
1 answer
590 views

I've spent days trying to make the library work on my system. The library has several algorithms which generate MPHFs. My understanding of minimal hash function is, that when I hash two distinct keys ...
truth_seeker's user avatar
0 votes
2 answers
350 views

In case you are not familiar with universal hashing, it's mainly an attempt to guarantee a low number of collisions (as opposed, say with using plain old modulo), using some rather simple math ...
AdHominem's user avatar
  • 1,262
1 vote
0 answers
105 views

I'm using Electron, Githubs desktop framework built using JS and HTML 5. I need to check if fileA is different to fileB, and similarly with 2 strings. These files and strings could be of equal size ...
Mike's user avatar
  • 8,887
3 votes
1 answer
506 views

If my intention is only to have a good hash function that spreads data evenly into all of the buckets, then I need not come up with a family of hash functions, I could just do with one good hash ...
Aravind's user avatar
  • 3,219
1 vote
0 answers
52 views

I need to hash a sequence S of numbers of length n^2 where each number is a sum of two numbers each of them is an element on one of the sequences: {x_1,..., x_n},{y_1,..., y_n}. I am using universal ...
tmac_balla's user avatar
3 votes
1 answer
679 views

What I know is: Consistent hashing: uniform distributed storage system Cone hashing: non uniform distributed storage system I want to know: How it works? What is the use of it? What is the difference ...
Hemanth Venkatappa's user avatar
2 votes
1 answer
284 views

I was reading this video lecture related to universal hashing. It shows the example of hashing IP addresses. Each IP address consists of 4, 32 bit integers, (x1,x2,x3,x4) with any xi having the ...
user12331's user avatar
  • 528
2 votes
2 answers
518 views

I am trying to understand how universal hashing works. It is defined h(x) = [(a*x + b) mod p] mod m where a,b - random numbers, m - size of hash table, x - key, and p - prime number. For example, I ...
Bob's user avatar
  • 10.9k
11 votes
2 answers
24k views

I'm implementing universal hashing and using the following universal hash function : h(k)=((A*k)mod 2^64) rsh 64-r where A is a random number between 2^61 and 2^62. The rand() function in C++ has ...
Ahmed's user avatar
  • 2,276
-1 votes
2 answers
436 views

How can I calculate the probability of having no collision after inserting 2 elements. answer is 4/9, but I do not see it how it is 4/9
user2149873's user avatar
-2 votes
1 answer
1k views

im simulating set intersection approximation using bloom filters. i have tried a lot of simple hash functions to hash the values to the filter. but its not good at avoiding collisions. so somebody ...
user1204343's user avatar
10 votes
4 answers
5k views

I know that I can hash singular values as keys in a dict. For example, I can hash 5 as one of the keys in a dict. I am currently facing a problem that requires me to hash a range of values. ...
inspectorG4dget's user avatar
3 votes
1 answer
883 views

to my current understanding Universal Hashing is a method whereby the hash function is chosen randomly at runtime in order to guarantee reasonable performance for any kind of input. I understand we ...
Beltrame's user avatar
  • 137
2 votes
2 answers
639 views

Hi I am reading the chapter about universal hashing on CLRS. On page 234 Corollary 11.4 Using universal hashing and collision resolution by chaining in a table with m slots, it takes expected ...
Alfred Zhong's user avatar
  • 7,191
8 votes
1 answer
2k views

I have been told that Hashtable in .NET uses rehashing in order to reduce/avoid collision. Ie. “Rehasing works as follows: assume we have a set of hash different functions, H1 ... Hn, and when ...
s_nair's user avatar
  • 800