WoodCentral Forums

Est. 1998 — 27 years of woodworking knowledge

Friday puzzler -- secret pay

Posts

Friday puzzler -- secret pay

#1

Friday puzzler -- secret pay

Alex Y

A group of eight people wants to find out their average salary, but want to do it without any of them being able to know what any other one in the group makes. How can they do that?

Re: Friday puzzler -- secret pay

#2

P.S.

Alex Y

Here's how I saw this puzzle originally worded:

"A group of friends wants to know their average salary such that no individual person's salary can be deduced. How can this problem be solved with a pen and paper?"

If I changed it in any substantial way, it was unintended.

I can think of three (so far) solutions, but have not seen what the originator of the puzzle intended. Will be interested to see what the folks here come up with, and will share what the originator intended once I have seen it.

Let me take one solution off the table, since I am sure it was not what was intended:

Everyone writes his or her salary on a slip of paper and puts in in a "ballot box" style box. The box is opened and the slips added. Divide by 8.

Re: Friday puzzler -- secret pay

#3

Re: P.S.

Larry Barrett

I think this will work:

Each person picks a number at random, without telling the group. Then each person turns to the person on their left and whispers "add my random number to your salary before you report it", then turns to the person on their right and whispers "subtract my random number from your salary before you report it". So when each person provides an input to the group, it represents their salary altered by two random numbers. When the group input numbers are added and divided to get the average, the + and - random numbers all cancel.

Re: Friday puzzler -- secret pay

#4

I don't think so

Alex Y

If Alan, Ben, and Charlie are sitting in a row, Alan and Charlie can compare their random numbers, without revealing their own salaries, to deduce Ben's salary.

BTW, one of my three "solutions" suffered the same fate, so I am left with only one other than the ballot box.

Re: Friday puzzler -- secret pay

#5

Re: Friday puzzler -- secret pay

Bill Earl

I can think of a solution that involves 16 slips of paper. (and no hat!)

Re: Friday puzzler -- secret pay

#6

Re: Friday puzzler -- secret pay

Alex Y

Out with it! Mine involves either eight or sixteen slips of paper, but requires a hat, which is not fundamentally different from a ballot box.

Re: Friday puzzler -- secret pay

#7

Re: Friday puzzler -- secret pay

Bill Earl

First person writes an arbitrary number on a slip of paper and passes it to the next person. The next person adds his own arbitrary number to the first, writes it on a different slip of paper and passes it to the next person. This continues around back to the first person.

At this point he has a slip of paper containing the sum of all 8 arbitrarily chosen numbers.

From that total, he subtracts the difference between his arbitrary number and his actual salary, writes that value on another slip and passes it to the next person. Everyone does the same until it gets back to the first person.

At this point he has a slip of paper containing the sum of all 8 salaries. Calculating the average is left as an exercise for the reader. :D

Re: Friday puzzler -- secret pay

#8

Re: Friday puzzler -- secret pay

Larry Barrett

Clever. I think the last guy in the line can compute the average, even before passing his slip back to the first guy in line.

Re: Friday puzzler -- secret pay

#9

I don't know...

Alex Y

This seems to suffer the same fate as Larry's solution and one of mine.

Assume Adam, Ben, and Chuck are sitting in that order. By comparing notes on the first round, Adam and Chuck can, without revealing their own salary or secret number, deduce Ben's secret number. Then, after the second round, Adam and Chuck can again compare notes to deduce the difference between Ben's secret number and his pay.

Re: Friday puzzler -- secret pay

#10

A little google research

Alex Y

has led me to the conclusion that the puzzle as I received it and reported here has been mis-stated. Maybe the standard should be that no-one directly reveals this or her own salary, not that no one's salary can be deduced. Every solution I have seen online is a version of what Larry and Bill gave as solutions.

If I hear anything more, I'll post it. Meanwhile, congrats to both Larry and Bill.

P.S. Another solution is disallowed by the pencil and paper rule --use RSA encryption. But that still is "not practically determinable" rather than "can't be deduced".

Re: Friday puzzler -- secret pay

#11

An answer with no random numbers

Alex Y

I think this works, but is still subject to Alan and Chuck jointly deducing Ben's salary.

The people sit in a circle, and one person tells the person to his left the one's digit of his salary. The second person adds his one's digit, and tells the third person... on the second round, add ten times the tens digit,...

When the last person hears the same number at the end of two rounds, the process stops as he then has the total of the salaries.

Re: Friday puzzler -- secret pay

#12

Re: An answer with no random numbers

Bill Earl

Very clever. But it could take all night if Warren Buffett was in the group.

Re: Friday puzzler -- secret pay

#13

Re: An answer with no random numbers

Larry Barrett

and everyone would know all of the most significant digits of Warren's salary.

Re: Friday puzzler -- secret pay

#14

Re: An answer with no random numbers

Alex Y

Only 6 rounds. I did say "salary", not "income", right? ;)

👍 This page answered my questions

Your vote helps other woodworkers quickly find the answers and techniques that actually work in the shop.