All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Algorithms
The Pregnant Secretary (Posted on 2004-02-21) Difficulty: 3 of 5
The secretary at a computers company is pregnant! It may have been one of the three partners' fault, or maybe someone else's. If a partner was the guilty party, he knows it... but he doesn't want the others to know it was him.

The three partners agree that they must know whether it was one of them who made the girl pregnant (thus possibly allowing a suit against the company) or if it was someone else.

How can they decide if one of them is to blame, without anybody having to accept being the father, if that was the case?

(Some notes: They might just write on papers either "I DID IT" or "I WASN'T IT", but the handwriting might give the guilty party away. Putting a white or black marble in an urn (white=innocent, black=guilty) might work, but someone could possibly see what color was being put in; also, if the guilty one went first, the second could peek inside and realize the answer. The optimum solution should not require much --or any-- extra equipment, and should "resist" inquisitive partners. And, of course, being all of them quite capable hackers, computers are out of the question!)

See The Solution Submitted by Federico Kereki    
Rating: 4.0000 (8 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution Or more simply..... | Comment 10 of 28 |

I think this Al-Gore-ithm is correct, but I'm tired, and I am still reeling from that "Letters to Numbers" puzzle. But anyway...

A guilty partner will know that the other two are innocent. An innocent partner will only know that he himself is innocent. So if  the 3 partners are A, B and C, A whispers an arbitrary number X into B's ear. Only A and B know what X is. B mentally adds to X the number of partners that B knows to be innocent, and whispers that number into C's ear. C mentally adds to it the number of partners that C knows to be innocent, and whispers that number back into A's ear.

If the number A hears back from C is X+3, he knows that either B or C has added 2, and A can announce that somebody is guilty. If A hears X+2, and A knows that he (A) is guilty, he will announce that somebody is guilty. If A hears X+2 and knows that he (A) is innocent, he will announce that all three are innocent.

Case 1: A is guilty. A whispers 6 to B, B whispers 7 to C, C whispers 8 to A, A declares that someone is guilty (since A knows that A is guilty).

Case 2: B is guilty. A whispers 6 to B, B whispers 8 to C, C whispers 9 to A, A declares that someone is guilty.

Case 3: C is guilty. A whispers 6 to B, B whispers 7 to C, C whispers 9 to A, A declares that someone is guilty.

Case 4: Nobody is guilty. A whipsers 6 to B, B whispers 7 to C, C whispers 8 to A, A decalres that eveyone is innocent (since A knows that A is innocent).

If someone is guilty but A and B are innocent, A won't be able to tell if it's Case2 or Case 3, and B won't know if it's Case 1 or Case 3. If someone is guilty but B and C are innocent, B won't know if it's Case 1 or Case 3, and C (who doesn't know what number A originally whispered to B) won't know if it's Case 1 or Case 2. If someone is guilty but A and C are innocent, A won't know if it's Case 2 or Case 3, and C won't know if it's Case 1 or Case 2. 

 

 

Edited on February 22, 2004, 2:51 am
  Posted by Penny on 2004-02-22 02:39:01

Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (3)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information