Hacker News new | ask | show | jobs
by ajuc 3762 days ago
Math has long tradition of generalizing definitions to make sense for larger domains, when it's useful. See fractional powers, complex numbers, quaternions, and many more.

I can imagine defining uniqueness as a function returning real number from <0; 1> instead of a boolean value. For example:

    let U(p, x, X) be the uniqueness of property(function) p(x) for element x of set X 

    U(p, x, X) = 1.0 - (size of X')/(size of X\{x}), where
    X' = set of all elements x' of X such that p(x')=p(x) and x' != x
Property p of element x of set X is strictly unique when, and only when U(p, x, X) = 1

When it's useful? For example for speaking about minimizing collisions of hashes for given data.

Another way of thinking about it: uniqueness is 1-probability of uniformly randomly finding element with same value of p in X as x after removing x from X.