加两把锁安全传文件
Message Delivery
题目详情
你要通过快递把文件安全送给同事,但如果箱子没上锁就不安全。你和同事各有一把独特的挂锁与钥匙。
快递可能会丢失箱子内容(若未上锁)。问:如何在不互换钥匙的情况下,安全把文件送到同事手里?
You and your colleague in Greenwich need to send documents by a courier service, but it is not secure unless the box is locked. You and your colleague each have a unique padlock and key. The courier will lose the contents if it is not locked. How can you securely send the documents without the risk of losing the lock or the documents?
解析
步骤:
- 你把文件放入箱子,用你的锁锁上,寄给同事。
- 同事收到后再加上他的锁(此时两把锁),寄回给你。
- 你打开并取下你的锁(箱子仍被同事的锁锁住),再寄回给同事。
- 同事用自己的钥匙打开自己的锁取出文件。
全程箱子都处于上锁状态。
Original Explanation
- You lock the box with your lock and send it to your colleague. He cannot open it but safely receives it.
- He puts his lock on it as well (now it has two locks) and sends it back to you.
- You remove your lock (leaving his lock), and send it again.
- Your colleague can open his own lock.
The documents remain locked at each transit, and each person’s lock is never lost.