I am looking for a hash function over the sets H (.) And a relation R (.,.) Such that if A is in B, then R (H (A), H (B)). Of course, R (.,.) Should be easily checked (constant time), and H (A) should be calculated in linear time.
One example from H and R:
- H (A) = OR over 1 <(h (x)% k), for x in A, k is a fixed integer and h (x) is a hash function over integers.
- R (H (A), H (B)) = ((H (A) and H (B)) = H (A))
Are there any other good examples? (well defined, but intuitively, if R (H (A), H (B)), then whp A enters B).
source
share