Introducing the ~=~ operator

https://news.ycombinator.com/item?id=11048612
by JoelJacobson • 10 years ago
3 13 10 years ago

Is there any function or operator in any language that can unbiased without any constants or subjectivity return a boolean TRUE/FALSE if two different noisy sets of integers of the same size are equal?

Examples of desired output:

[0] ~=~ [0] -> TRUE

[0] ~=~ [1] -> FALSE

[84765,193] ~=~ [84765,193] -> TRUE

[84765,193] ~=~ [84765,32] -> FALSE

[1047072,1047216,1047441,1047521,1047682,59102,59361,59583,59818] ~=~ [1047085,1047276,1047471,1047754,1047938,59128,59364,59732,59945] -> TRUE

[1047072,1047216,1047441,1047521,1047682,59102,59361,59583,59818] ~=~ [1047085,1047276,1017471,1047754,1047938,59128,59364,59732,59945] -> FALSE

Rules:

* The operator is not allowed to know anything about the nature of integers it receives as input

* The operator is not allowed to know anything about the world, it must be immutable and without any constants at all

* The operator is not allowed to be in disagreement with humans about what sets of integers are to be considered equal. (Naturally, a stupid human will sometimes make a mistake, so if in disagreement, continue to multiply the group of humans with two and if the disagreement continues forever, the operator is useless and incorrect).

I have "discovered" an algorithm which always returns the same boolean value as a sufficiently intelligent human would return, but I'm sure this algorithm must already exist since it's so obvious.

Hopefully you hackers can tell me what this operator or algorithm is called so I don't have to spend the time to implement it in assembly language, since now I only have a reference implementation in a higher order language.

Related Stories

Loading related stories...

Source preview

news.ycombinator.com