by JoelJacobson · 10y ago · 0 comments
The operator should take three (not two as suggested before) sets of integers as input of equal sample size.
The first two sets are already known to be equalish TRUE, as defined by either a human or a previous test of a smaller subset of the integer sets. The third set is a the new sample you want to compare.
Example output:
equalish('{0}','{0}','{0}') -> TRUE
equalish('{0}','{0}','{1}') -> FALSE
equalish('{110,105,120}','{113,107,121}','{110,106,120}') -> TRUE
equalish('{1047072,1047216,1047441,1047521,1047682,59102,59361,59583,59818}','{1047085,1047276,1047471,1047754,1047938,59128,59364,59732,59945}','{1047085,1047276,1017471,1047754,1047938,59128,59364,59732,59945}') -> TRUE
Due to transitivity:
A ~=~ B ~=~ C and
C ~=~ E ~=~ F implies that
A ~=~ F which would not necessarily be the case.
For instance:
Let X be a large set with many elements. Then a "reasonable intelligent human" might suggest that:
(X `union` {1}) ~=~ (X `union` {2})
And also:
(X `union` {2}) ~=~ (X `union` {3})
...... (X `union` {999999999999}) ~=~ (X `union` {1000000000000 })
which implies
(X `union` {1}) ~=~ (X `union` {1000000000000 })
, even if this is actually the case, you expect it not to be for some large enough number. Then your operator cannot be transitive, but then what use is the knowledge that input #1 is approximate equal to input #2?
But since you already "discovered" the algorithm, why not just show it, or the pseudo code, such that we could discover its true name?