# How can eight quants learn their average salary without revealing individual salaries? [closed]

Here is a problem from section 2.3 (Thinking Out of the Box) section of the popular book by Xinfeg Zhou titled 'Quant salary':

### Quant Salary

Eight quants from different banks are getting together for drinks. They are all interested in knowing the average salary of the group. Nevertheless, being cautious and humble individuals, everyone prefers not to disclose his or her salary to the group. Can you come up with a strategy for the quants to calculate the average salary without knowing other people's salaries?

The book provides the following solution:

Solution: This is a light-hearted problem with more than one answer. One approach is for the first quant to choose a random number, add it to his/her salary and give it to the second quant. The second quant will add his/her own salary to the result and give it to the third quant; and so on; the eighth quant will add his/her own salary to the result and give it back to the first quant. Then the first quant will deduct the 'random' number from the total and divide the 'real' total by 8 to yield the average salary.

The author mentions that there are alternative solutions to this problem. What are some alternative approaches?

### Further Thoughts

The problem of secure multiparty communication is one of the interesting problems in the field of cryptography and security. While my knowledge of the same is limited, I wonder if there has been some work done on the design of an algorithm which can perform computation on an encrypted version of its inputs and decrypting the outputs can reveal the result of the computation without revealing any information about the inputs. That is, can we design an algorithm to which every quant can submit an encrypted version of their salaries, get the output and infer the average salary from the output either by decrypting it with a key known to any number of the quants or otherwise, which would allow them to infer the average salary without revealing any information about the individual salaries?

• See also: Homomorphic Encryption, an open research topic today. Commented Jun 26 at 21:09