Author Topic: Math problem that went viral.  (Read 10455 times)

50centdollars

  • Guest
Math problem that went viral.
« on: April 15, 2015, 10:28:37 AM »
Apparently, it's all the rage online the last few days. It started with a posting on Facebook, by Kenneth Kong, a television host in Singapore.

http://www.nytimes.com/2015/04/15/science/a-math-problem-from-singapore-goes-viral-when-is-cheryls-birthday.html


Albert and Bernard just met Cheryl. “When’s your birthday?” Albert asked Cheryl.

Cheryl thought a second and said, “I’m not going to tell you, but I’ll give you some clues.” She wrote down a list of 10 dates:

May 15, May 16, May 19

June 17, June 18

July 14, July 16

August 14, August 15, August 17

“My birthday is one of these,” she said.

Then Cheryl whispered in Albert’s ear the month — and only the month — of her birthday. To Bernard, she whispered the day, and only the day.

“Can you figure it out now?” she asked Albert.

Albert: I don’t know when your birthday is, but I know Bernard doesn’t know, either.

Bernard: I didn’t know originally, but now I do.

Albert: Well, now I know, too!

When is Cheryl’s birthday?


tombgrt

  • Lifetime Member
  • Hero Member
  • *****
  • Posts: 1944
Re: Math problem that went viral.
« Reply #1 on: April 15, 2015, 10:36:42 AM »
Yes, fun riddle. Embarrassed to say that I needed quite some time to solve it completely. Don't think it will be too hard for many here, especially if they have done things like this before.

I remember someone here posting Einstein's five-houses riddle once and a lot of us solved that one and this one is easier. Still a lot of fun and a challenge! :)

wawallace

  • Newbie
  • *
  • Posts: 28
Re: Math problem that went viral.
« Reply #2 on: April 15, 2015, 10:39:28 AM »
The trick is to remember that all of the participants have information that you don't. If you try to solve from their perspective you'll not be able to answer, because this is a second level problem.

Jurgis

  • Hero Member
  • *****
  • Posts: 5779
    • Porfolio
Re: Math problem that went viral.
« Reply #3 on: April 15, 2015, 10:40:56 AM »
I know that you know that I know the answer. But that does not help anyone else solving the riddle.  :P

Yeah, it kinda similar to "what color hat is on your head" problems.
"Human civilization? It might be a good idea." - Not Gandhi
"Before you can be rich, you must be poor." - Nef Anyo
"Money is an illusion" - Not Karl Marx
-----------------------

snow pea

  • Newbie
  • *
  • Posts: 48
Re: Math problem that went viral.
« Reply #4 on: April 15, 2015, 11:01:05 AM »
Hanabi is an excellent, elegant card game which scratches a similar itch to this sort of problem.

leeway

  • Jr. Member
  • **
  • Posts: 51
Re: Math problem that went viral.
« Reply #5 on: April 16, 2015, 08:22:46 AM »
this one is relatively straight forward with this type of problems. I just spent an evening and more to solve a similar but much more complicated problem:
2 numbers a and b, a >=b, both integers between 2 and 99. Mr. P knows the sum S=a+b, and Mr. Q knows the product M=a*b. Here is the conversation:
Q: I don't know what are a and b.
P: I know you don't know, and I don't know either.
Q: I know now.
P: I also know now.

What are a and b?

constructive

  • Hero Member
  • *****
  • Posts: 974
    • My Seeking Alpha articles
Re: Math problem that went viral.
« Reply #6 on: April 16, 2015, 08:32:34 AM »
this one is relatively straight forward with this type of problems. I just spent an evening and more to solve a similar but much more complicated problem:
2 numbers a and b, a >=b, both integers between 2 and 99. Mr. P knows the sum S=a+b, and Mr. Q knows the product M=a*b. Here is the conversation:
Q: I don't know what are a and b.
P: I know you don't know, and I don't know either.
Q: I know now.
P: I also know now.

What are a and b?

Does this statement mean P knows that Q doesn't know based on what Q has just said, or independently? If he knows because Q said it 2 seconds ago that is kind of a useless comment.

leeway

  • Jr. Member
  • **
  • Posts: 51
Re: Math problem that went viral.
« Reply #7 on: April 16, 2015, 08:48:34 AM »
P's statement (P knows Q does not know) is based on the info P has, ie the sum of the two integers.

rkbabang

  • Lifetime Member
  • Hero Member
  • *****
  • Posts: 5137
Re: Math problem that went viral.
« Reply #8 on: April 16, 2015, 10:08:51 AM »
this one is relatively straight forward with this type of problems. I just spent an evening and more to solve a similar but much more complicated problem:
2 numbers a and b, a >=b, both integers between 2 and 99. Mr. P knows the sum S=a+b, and Mr. Q knows the product M=a*b. Here is the conversation:
Q: I don't know what are a and b.
P: I know you don't know, and I don't know either.
Q: I know now.
P: I also know now.

What are a and b?

That's a tough one. I'll take your word for it that there is a solution.  I tried to brute force it by writing a simple python script to output every possible answer of S and M (pun not intended) leaving out only the obvious ones such as a=b=2 or M being a prime number.   I looked at the results and I think I see many values that could meet the conversation without either figuring out the answer.   Such as:   

   S=10:   
  P would know that (a,b) = (5, 5) or (6, 4) or (7, 3) or (8, 2)
  P would also know that M = 25 or 24 or 21 or 16
  All of those values for M have more than one possible value of (a,b).

 This is the same of you start with S = 11 or S=12.
 I don't get how Q knows the answer just by knowing that P doesn't know and knows he doesn't know.  It seems like that leaves a ton of possibilities.


I have to think about it more.

By the way this is the python script:

import os, sys, math

def is_prime(num):
    if num > 2 and num % 2 == 0:
        return False
    for n in range(3, int(math.sqrt(num)) + 1, 2):
        if num % n == 0:
            return False
    return True

results = "";

for a in range(2,100,1):
    for b in range(2,100,1):
        if b <= a and (a+b) > 5 and (a*b) > 8 and not is_prime(a*b):
            results += "a={}, b={}, S={}, M={}\n".format(a, b, a+b, a*b);

f = open("s_and_m.txt","w");
f.write(results)
f.close()


EDIT:  I just realized that 25 doesn't have more than one a,b pair.  I'm going to figure this out.
« Last Edit: April 16, 2015, 10:11:12 AM by rkbabang »

Jurgis

  • Hero Member
  • *****
  • Posts: 5779
    • Porfolio
Re: Math problem that went viral.
« Reply #9 on: April 16, 2015, 11:31:14 AM »
Edit: yes, there is a single solution that follows from the inferences of conversation between P & Q.

I wrote a Python script and got the answer. It would be somewhat hard, but possible to do it by hand.

If anyone wants spoilers the answer is also at http://www.mathpropress.com/archive/iams/vol14.ascii

Now back to wasting my workday on other non-productive endeavors like value investing  8)
« Last Edit: April 16, 2015, 11:34:45 AM by Jurgis »
"Human civilization? It might be a good idea." - Not Gandhi
"Before you can be rich, you must be poor." - Nef Anyo
"Money is an illusion" - Not Karl Marx
-----------------------