A maths problem that first appeared in a test for Singapore's elite high school students has baffled internet users around the world after going viral with the hashtag #CherylsBirthday.

The question, involving a girl asking two boys to guess her birthday after giving them only vague details, first appeared in a test organised by the Singapore and Asian School Math Olympiads (SOSMA) on April 8.

Intended for 15 and 16-year-old elite secondary school students, the question states that Cheryl gives her new friends, Albert and Bernard, 10 possible dates when they asked when her birthday was. She proceeds to tell one the day, and the other the month.

Using only the information provided in the conversation, users must apply logic to deduce Cheryl's birthday.

To find the answer, we here at Guides have broken it down into steps.

The question

“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?”

Do not scroll down if you want to try and work it out for yourself!

The solution

Step 1 Does Albert know the month of Cheryl’s birthday? The statement tells us that Bernard does not know, so Albert must know the month.

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

Step 2 Read the first statement. Albert is certain that Bernard also doesn’t know. Therefore May and June must be ruled out; these are the only months in which the dates 18 and 19 appear. If Cheryl had told Bernard that her birthday was on the 18 or 19, he would have known the date as these dates only appear once.

Step 3 Thanks to that, Bernard is now certain that May and June are ruled out. He is left with three dates: July 16, August 15, and August 17. It can’t be the 14 as it still appears twice. If Cheryl had told Bernard that her birthday was on the 14, he still wouldn't know which month.

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

Step 4 With this deduction, Albert is able to deduce that Cheryl’s birthday is in July. It can’t be August because if it was, Bernard wouldn't know, as there are two dates remaing: 15 and 17.

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

The remaining date is July 16. That’s the answer… easy, eh?