Skip to main content

Questions tagged [hash]

Mathematical function that maps arbitrarily-sized data to fixed-size integers, often used as keys in hash tables or to help ensure data integrity

0 votes
0 answers
49 views

I am hashing a bunch of strings made up of a finite number of known keyword strings (n many keyword strings). Here I want to generate a perfect hash s.t. each ...
yosmo78's user avatar
  • 187
0 votes
0 answers
34 views

When using the CGen tool to convert the SHA-256 algorithm into Conjunctive Normal Form (CNF), the input and output bits are represented by DMAC literals. However, I am specifically interested in ...
pc gangroli's user avatar
0 votes
0 answers
56 views

Given the consistent hashing ring system, i.e., with $S$ serves, $C$ clients and a random hash function $h$, how can we choose the number of virtual nodes per server $V$, so that the probability that ...
user3563894's user avatar
3 votes
1 answer
134 views

For $n$ elements, a two-level hash table contains an $O(n)$ top-level hash table whose entries are hash tables also. Each table samples from a 2-universal family. To hash an element $x$, we first hash ...
thh's user avatar
  • 31
1 vote
1 answer
68 views

I want to generate numbers in the range $0 \leq n < 2000$ in a random order. The risk of using "generic random number generator" $\mod 2000$ is that it will cycle sooner in that range, or ...
user avatar
3 votes
1 answer
183 views

Daniel J Bernstein's "Multiply 33 and add" simple hash is surprisingly hard to find the original reference to. Googling provides descriptions in language implementations such as PHP ...
qwr's user avatar
  • 630
1 vote
2 answers
146 views

Is there some algorithm that can transform any string input (of any length) into a shortest possible coherent/unique numeric identifiant. By "coherent", I mean that the same input will ...
aurya's user avatar
  • 111
1 vote
1 answer
449 views

I was learning the Polynomial Hash function in python, the one used in Rabin Karp Algorithm This is the implementation I was taught: ...
reverseambition's user avatar
1 vote
1 answer
108 views

Lets assume that the load factor of a hash table of size $n$ became inappropriate. The process of re-hashing involves choosing a new hash function. A good choice of a new function will make the cost ...
Daniel's user avatar
  • 341
1 vote
1 answer
172 views

I had a difficult assignment in my Data Structures and Algorithms class. We need to implement a program that computes a function f(n) based on the following known values of n and f(n): n : 9689 ...
Shiyao Ju's user avatar
0 votes
1 answer
53 views

Suppose I have integers that follows a power distribution: $P(n) \propto 1/(n + 1)^\alpha, n \geq 0$ What hash function is a good choice to avoid collisions. The usecase is keys in an ...
user877329's user avatar
1 vote
1 answer
102 views

Given a cryptographic hash, $ \text{hash}(A || B || C) $, and the last block added to the hash, $ C $, can you determine $ \text{hash}(A || B) $? In other words, can you roll back the last round of a ...
Zaz's user avatar
  • 155
0 votes
2 answers
252 views

I have two 64-bit numbers a and b which have a few properties: only 49 out of the 64 bits are used (15 bits are always 0), and ...
Rak Laptudirm's user avatar
1 vote
1 answer
78 views

Given an array with the size of $n$ of integer numbers. Our goal will be to analyze the expected running time of an algorithm that uses a hash table to find (if exists) a pair $(a,b)$ subject to $2<...
ErroR's user avatar
  • 1,954
1 vote
2 answers
265 views

Do any streaming hash functions exist that provide the same result if the input is reversed? That is to say, is there some hash function, $h$, such that: $$ h(h(h(h(0, x_1), x_2), ...), x_n) = h(h(h(h(...
Zaz's user avatar
  • 155

15 30 50 per page
1
2 3 4 5
23