Say we have a family of (not necessarily disjoint) sets S={S_{1}, S_{2}, S_{3}..S_{n}}. Say each set has size O(k). I need a hash-function h : S -> P (P could be anything) such that h(S_{i}) = h(S_{j}) IFF S_{i} and S_{j} intersect.
I want this hash function to be fast i.e. determining h(S_{i}) from S_{i} should be a fast operation, O(1), O(logk) etc
Can you tell me any of the following :
- Lower bound on complexity of such a function?
- Why such a function above cannot be achieved?
- Precise definition of such a hash function?
- Advice on why hash function might not be the best thing here, maybe something else is better?