3 ms·
Are you familiar with the Millionaires' problem? [1] There's an easy solution when you're looking for an average salary (and everyone doesn't mind doing a litt
by macobo 13y ago
Are you familiar with the Millionaires' problem? [1]
There's an easy solution when you're looking for an average salary (and everyone doesn't mind doing a little bit of calculation). The first person thinks of a random number, adds his salary to it and tells it to the person on his/her right (so noone else hears!). The next one adds his salary and tells it to the next person and so on. When it re-reaches the first person, he then subtracts the original random number.
The result is the sum of their salaries, which can then be divided to yield an average. All done in a way that no one person learns what the salary of any other person was.
[1]: http://en.wikipedia.org/wiki/Yaos_Millionaires_Problem http://en.wikipedia.org/wiki/Yaos_Millionaires_Problem (link sadly broken by HN url parsing?)
- narcissus 13y agoI have actually heard of this process before. In fact, it was this 'problem' that originally made me think of the site, but then I realised that if I'm doing in online, I may as well automate it a bit and came to this 'solution'. That is to say, I'm all for people doing it that way if they like. If, however, they'd rather use an 'app' or whatever, then they're more than welcome to use this.
- hashmymustache 13y agotl;dr salt the sum
- andrewem 13y agoWorking link: http://en.wikipedia.org/wiki/Yao%27s_Millionaires%27_Problem http://en.wikipedia.org/wiki/Yao%27s_Millionaires%27_Problem