Brain Teasers
Avg Salary ??
Three coworkers would like to know their average salary.
However, they are self-conscious and don't want to tell each other their own salaries, for fear of either being ridiculed or getting their houses robbed. How can they find their average salary, without disclosing their own salaries?
However, they are self-conscious and don't want to tell each other their own salaries, for fear of either being ridiculed or getting their houses robbed. How can they find their average salary, without disclosing their own salaries?
Answer
Guy 1 adds a constant to his salary and tells guy 2. Guy 2 adds his salary and tells Guy 3. Guy 3 adds his salary and tells Guy 1. Guy 1 subtracts the original constant and then divides by 3 to get the average.Hide Answer Show Answer
What Next?
View a Similar Brain Teaser...
If you become a registered user you can vote on this brain teaser, keep track of which ones you have seen, and even make your own.
Solve a Puzzle
Comments
That's pretty confusing. What's a constant? (Great job, whenever I don't understand a teaser, whoever wrote it did a good job)
I understand the math behind it, but what does it get you. An average of 3 salaries don't tell you much.
hey drussel its me again!!!!! ur an engineer right so u must be pretty good at math i guess well i got this one bc im good at math lol
hmm i agree with flipflop cuz ive never in my life heard of a consant but anyhow it was good!
i had 2 read the answer twice, but i understood it cuz algebra 1 is still semi-fresh
For those of you confused of what a constant is, here is my explanation, by an example.
Guy 1 salary = $10,000
Constant = $8,000
Guy 2 salary = $12,000
Guy 3 = $20,000
total = [$50,000 - $8,000] (constant) / 3 = $14,000
Average salary = $14,000
Thus everyone can know the average of everyones salary, but no one will know what anyone actually makes.
Guy 1 salary = $10,000
Constant = $8,000
Guy 2 salary = $12,000
Guy 3 = $20,000
total = [$50,000 - $8,000] (constant) / 3 = $14,000
Average salary = $14,000
Thus everyone can know the average of everyones salary, but no one will know what anyone actually makes.
A constant is basically a number that can be added, subtracted, multiplied, whatever. The "constant" is always the same, it does not change. This is to differentiate from "variable" which changes it's value. Hope that helps!
I can think of another way to accomplish the same feat -- Worker 1 splits his salary into two parts. So if he makes $20,000, he thinks of it as $18,000 and $2,000. He tells Worker 2 "$18,000" and Worker 3 "$2,000". Each of the other workers does the same. Now each person can add together the two numbers they heard from their two neighbors and write that number down. When you sum all of the numbers written down, you will have the sum of all of the workers' salaries. Dividing this by three will give you the average. When splitting a number, you could even use negative numbers, so the person who makes $20,000 could say $25,000 to one person and -$5,000 to another.
Given that there were no restrictions placed on their method, I would say to ask someone in Personnel.
Dec 13, 2007
Okay... so... why can't each of the three of them just anonymously write their salary onto a piece of paper and place them together? Then none of them know whose salary belongs to whom. Seems to work to me.
Dec 13, 2007
Just thought of something else. With the given solution, what's to stop guys 1 and 2 from conspiring together to find guy 3's salary? ...And subsequently rob him, because apparently they are pretty shady characters.
Very clever!
I knew the solution must involve information shared by pairs of people, but not shared with the third.
My solution was similar to tsimkin's, except unlike tsimkin's, my solution doesn't reveal the salaries. In tsimkin's approach, since you give half the value to each person, and then must provide the sum of the two halves on order to sum the total, it is easy for each person to determine the other half of the salary that each person gave the other person. For example, if Tom tells Ted $3000 and tells Tim $15000, and Ted tells Tom $5000 and tells Tim $10000, then when Tim provides $25000 to be added, then Tom know that Ted's salary is (25000 - 15000) + 5000 = 15000.
My solution was to have each person divide their salary into three sections and tell each of the others one of the sections and keep one to himself. Then each person reveals the sum of the two portions from the other people PLUS the remaining portion from his salary. The three values are summed and divided by three to get the average.
I knew the solution must involve information shared by pairs of people, but not shared with the third.
My solution was similar to tsimkin's, except unlike tsimkin's, my solution doesn't reveal the salaries. In tsimkin's approach, since you give half the value to each person, and then must provide the sum of the two halves on order to sum the total, it is easy for each person to determine the other half of the salary that each person gave the other person. For example, if Tom tells Ted $3000 and tells Tim $15000, and Ted tells Tom $5000 and tells Tim $10000, then when Tim provides $25000 to be added, then Tom know that Ted's salary is (25000 - 15000) + 5000 = 15000.
My solution was to have each person divide their salary into three sections and tell each of the others one of the sections and keep one to himself. Then each person reveals the sum of the two portions from the other people PLUS the remaining portion from his salary. The three values are summed and divided by three to get the average.
javaguru -- nicely done, and this method does indeed correct for the hole I left in m method.
To post a comment, please create an account and sign in.
Follow Braingle!