• C++ Programming for Financial Engineering
    Highly recommended by thousands of MFE students. Covers essential C++ topics with applications to financial engineering. Learn more Join!
    Python for Finance with Intro to Data Science
    Gain practical understanding of Python to read, understand, and write professional Python code for your first day on the job. Learn more Join!
    An Intuition-Based Options Primer for FE
    Ideal for entry level positions interviews and graduate studies, specializing in options trading arbitrage and options valuation models. Learn more Join!

confused about birthday problem question for 2 days. Help!

jnh

Joined
7/3/13
Messages
1
Points
11
Hey guys,
I found this interview question in a book but couldn't understand it. There's people online saying it doesn't make sense either. Can you guys have a look?
http://questionsininterview.com/welcome-to-questionsininterview-com/problem-solving-interview-questions/the-birthday-problem-interview-question/
Specifically, "By process of elimination, the month is not June or December" doesn't make sense to me. It seems like we can eliminate Jun 7, Jun 4, and Dec 2, but not the rest of the Dec dates.
My thinking is: we can eliminate Jun 7 and Dec 2 because they are unique days. So If C heard the 2nd or the 7th, then he would know the birthday. We can then eliminate June 4th because if "I" knew it were June and "I" know that it's not the 2nd, then it would have to June 4th which violates the condition. But, what if the boss told "me" that it was Dec, and told C that it was the 1st? in the case neither "I" nor C would know the birthday. So, how can we eliminate Dec 1 as a possible birthday?
Thanks!
 
Think about it like this:

A is the boss, C is your colleague, and 'you' are B.

Mar 4, Mar 5, Mar 8
Jun 4, Jun 7
Sep 1, Sep 5
Dec 1, Dec 2, Dec 8

B said “I don’t know A’s birthday; C doesn’t know it either.” How can B know that C does not know it?
  • In order for C to know it offhand, the day would have to be either 2 or 7.
  • B is told what the month is, so the only way B can be sure that C does not know it would be if B knows that the month is not June or December.
Mar 4, Mar 5, Mar 8
Sep 1, Sep 5

Now that June and December are eliminated (which C now knows from B's statement), the only way C can then say that he now knows the birthday, would be if it's on a unique day: 4, 8, or 1.

Mar 4, Mar 8
Sep 1

Then, hearing C's statement, the only way B can know the birthday would be if the month is unique: September.

Hence, the assistant now knows that the birthday is September 1.

But, what if the boss told "me" that it was Dec, and told C that it was the 1st? in the case neither "I" nor C would know the birthday. So, how can we eliminate Dec 1 as a possible birthday?

The flaw in the above reasoning is that it violates the premise of the problem. The problem itself states that you (B) was told the month, so B knows that the month is not December! The fact that 'you' (B) stated that “I don’t know A’s birthday; C doesn’t know it either," must mean that 'you' (B) know the month is not December.

Put the other way, if B was told that the month was June or December then he cannot truthfully state that he knows for a fact that C does not know the birthday, since it can then be on a unique day.

The reason this problem is tricky is because of the usage of the word 'you'. It becomes confusing as you are the one solving the problem (from the perspective of the 'assistant') as well as trying to be the 'you' in the problem. If you take a step back it is pretty simple.
 
The flaw in the above reasoning is that it violates the premise of the problem. The problem itself states that you (B) was told the month, so B knows that the month is not December! The fact that 'you' (B) stated that “I don’t know A’s birthday;C doesn’t know it either," must mean that 'you' (B) know the month is not December.

I guess I'm a little confused at this.

How can B know that the month is not December.

If he knows that C does not know A's birthday, then this only eliminates December 2nd. Which still leaves the two dates Dec 1 and Dec 8.

There are 3 dates in total for December. Not 2.
 
I hate the wording of this problem. When I say "you," I mean it in the same perspective as in the problem.

You look at the list of 10 days. You know C only has the day. You already have the month. You figure out that 2 and 7 are unique days, and thus a person who knows the day could only know the month too if the day were 2 or 7. You can't possibly know the day with just the month, so you already have to admit to not knowing the day. But you also know the situations where C would know them, and the only way to say that you know C doesn't know would be that you know the month is not June or December.

C analyzes the situation and realizes that the only way that you could know that he doesn't know based solely on the day is if you know the month is not June or December. Now he knows that, too. So he looks at the other months, and he announces that he knows the right month and day.

The only way it's possible for him to know that would be if, again, he was told a unique day in the months that are still possible. Only March and September are possible at this point, and the unique set remaining is March 4, March 8, and September 1. C announces he knows the correct birthday, so it must be one of these three days.

You know the month, and you announce that you know the correct birthday once you know that it's March 4, March 8, or September 1. This means you know the month is September. The administrative assistant, who knew nothing from the start, can work through all of this and come up with the solution.
 
If you know that C didn't know A's bday, the month has to be March or September
When A says he didn't know it before but now does, it's got to be the 1st
So it's September 1st
 
Back
Top