Skip to content

Instantly share code, notes, and snippets.

@teddychan
Created April 15, 2015 14:54
Show Gist options
  • Save teddychan/4b19aa342bac8028244b to your computer and use it in GitHub Desktop.
Save teddychan/4b19aa342bac8028244b to your computer and use it in GitHub Desktop.

My team send this IQ test to me:

Albert and Bernard just became friends with Cheryl, and they want to know when her birthday is. Cheryl gives them a list of 10 possible dates. 
May 15, May 16, May 19 
June 17, June 18 
July 14, July 16 
August 14, August 15, August 17 

Cheryl then tells Albert and Bernard separately the month and the day of her birthday respectively. 

Albert: I don’t know when Cheryl’s birthday is, but I know that Bernard does not know too. 

Bernard: At first I don’t know when Cheryl’s birthday is, but I know now. 

Albert: Then I also know when Cheryl’s birthday is. 

So when is Cheryl’s birthday?

My answer is Aug 17th

Here is why:

  1. I assume the statment from A and B are true (obviously it can be a mistake).
  2. I assme C is not a stupid girl.

Step 1

The answer must not be May 19, June 18.

Otherwise B can get the answer easily.

May 15, May 16, May 19

June 17, June 18

July 14, July 16

August 14, August 15, August 17

Step 2

Since A said he sure B don't know the answer (same as my first guess).

The month should NOT be June.

Otherwise, A will get the answer June 17.

Now only:

May 15, May 16, May 19

June 17, June 18

July 14, July 16

August 14, August 15, August 17

Now interesting

May 15, May 16

July 14, July 16

August 14, August 15, August 17

As B heard A said: I don’t know when Cheryl’s birthday is, but I know that Bernard does not know too.

The only possible date is August 17, as he only get 17 So that can he say: At first I don’t know when Cheryl’s birthday is, but I know now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment