Feb 18, 2010

How to Average?

Suppose 3 colleagues want to average their salaries. Each of them only knows his salary and have no idea about others. However, everyone does not want other people know his salary. If there is a calculator, how could they average their salaries without revealing their salaries?

有三個同事,想算出他們的平均薪水。每個人只知道自己的薪水,但同時又不希望別人知道自己的薪水。如何利用一台計算機,在不洩露自己薪水的情況下,算出三人的平均薪水?

Hint: The calculator is not necessary. They need to pass the information to others.

提示:不一定需要計算機,只要他們能把訊息傳給其它人。

No comments:

Post a Comment