Fog Creek Software
Discussion Board




I don't know, so she doesn't know so I know so ...

This is a fun one.
Solve for x and y.

Each is >=1 and <=100

Fred is told z, product of x and y.
Jenny is told a, sum of x and y. 
Fred and jenny do not know each other's numbers, but they're in the same room.
Fred says, "I don't know what x and y are."
Jenny says, "I don't konw what x and y are."
Fred then says, "Then I DO know what x and y are."
Jenny then says, "Then I do too."

There ya go.

David Haner
Tuesday, November 05, 2002

x = 2
y = 2
z = x + y = 2 + 2
a = x * y = 2 * 2

Andrew Burton
Wednesday, November 06, 2002

Nope, it's not 2 and 2.

If it was 2 and 2 then Jenny not know the answer can't help Fred know, because if x and y are both 2 then:

1) Jenny has 4 for the sum.

2) 4 can be made by either adding 1 and 3 or 2 and 2

1 * 3 = 3, which is Prime, so Fred would not have said he didn' t know if he had this, so Jenny knows if she has 4 that fred has 4, so she then knows that it's 2 and 2.

However, jenny said she didn't know.

David Haner
Thursday, November 07, 2002

Let me see if I can rephrase my explanation of why 2 and 2 for x and y doesn't work.  My previous explanation was not English.

If Jenny has 4 for the sum, then there are 2 possible x,y sets.

If it's 1,3 then Jenny knows that Fred would have said he knows, since Fred would have had 3.  If Fred has 3 he always knows that x and y are 1 and 3 (3 is prime).
Fred, however said he didn't know right off the bat.

Therefore if Jenny has 4 for the sum, she knows that the x,y pair must be 2,2.  She would have said immediately that she knew.  However, she didn't.  So, she didn't have 4, 4.

David Haner
Thursday, November 07, 2002

x and y are 1 and 4.  z = x*y = 4, so F doesn't know if its 1,4 or 2,2.  However, F knows that if it is 2,2, c=x+y=4, and thus J will know that it is 2,2 (if it were 1,3, J knows that F would know because 1*3=3 is the only possible solution).  So, when J doesn't know, F knows that it is 1,4.  Then, J knows that it is 1,4 as well (as opposed to 2,3).

Roy Pollock
Thursday, November 07, 2002

How do we know that when they say they know what x and y are, either Fred or Jenny are telling the truth, or indeed CORRECT.

Without confirmation of this, all we can surmise from their first statements, is that

z is not a prime number (if it was, then the denominators would be ovious)

a is not 2 or 3 (because again the two numbers would be obvious)

Therefore, 'z' could be take the following values
{4,6,8,9,10,12,14,15,16, ....... 98,99,100]

Similarly, 'a' could take any of the following values
{4,5,6,7,8,9,10,11,12 ..... 98,99,100}

If Fred does not know what the x and y are, then they both know that z is not a prime number

If Jenny does not know what x and y are, then they both know that a is not 1 or two.

That is all they know, and any supposition by Fred that he knows, is *bullshit*

Without validation of Fred's claim, then Jenny too is talking *bullshit*.

That's the response I would give.

tapiwa
Monday, November 11, 2002

>If Fred does not know what the x and y are, then they
> both know that z is not a prime number

Fred actually knows quite a bit more than this - he's been told what z is. That's how he can make further deductions.

Paul

Paul Viney
Monday, November 11, 2002

Does anyone know how to write this as a mathematical statement or formula?

David Haner
Friday, November 22, 2002

*  Recent Topics

*  Fog Creek Home