- 08 Apr '05 07:10Suppose two co-workers each take one lunch break per day. They arrive at the cafeteria independently at random times between 12 PM and 1 PM, and each stays for exactly x minutes. The probability that either co-worker arrives while the other is in the cafeteria is 40%.

If x = a - b*(c)^0.5, then find (a + b + c).

You also are given: a, b, and c are positive integers. And c is not divisible by the square of any prime number.

I found this problem on a standardized mathematics exam, and I have worked it out several times, always getting the same answer. But my answer differs slightly from their answer sheet (I think they have a misprint). I am hoping that one of you can solve it to either confirm my answer or show me why my answer is wrong.

cheers, - 08 Apr '05 11:42

Let's see what we get:*Originally posted by davegage***Suppose two co-workers each take one lunch break per day. They arrive at the cafeteria independently at random times between 12 PM and 1 PM, and each stays for exactly x minutes. The probability that either co-worker arrives while the other is in the cafeteria is 40%.**

If x = a - b*(c)^0.5, then find (a + b + c).

You also are given: a, b, and c a ...[text shortened]... of you can solve it to either confirm my answer or show me why my answer is wrong.

cheers,

Let A be the arrival time of one co-worker, and B the arrival time of the other. The the probability that the second worker arrives while the first one is there is P(0 <= (B-A) <= x). Using independence, this is integral(f(t)P(t <= B <= t+x))dt, where f is the pdf of A. At this point we have to assume 'at random' means 'uniformly at random' (why do pre-university examiners always pretend that random means uniform?), so f(t) is 1/60 over the range 0 to 60 (I'm calling 12 PM 0 for convenience), and the integral becomes

integral[0,60-x](1/60 * x/60)dt + integral[60-x,60](1/60*(60-t)/60)dt

= (60-x)x/3600 + (t/60 -(t^2)/7200)[60-x,60]

= (60-x)x/3600 + 1/2 - (60-x)/60 + (60-x)(60-x)/7200

= (60-x)(60+x)/7200 - (30-x)/60

which is 0.4. For convenience let x = 60k:

(1-k)(1+k)/2 - (1-2k)/2 = 0.4

1 - k^2 - 1 + 2k - 0.8 = 0

k^2 -2k +0.8 = 0

=> k = (2 +-sqrt(4-3.2))/2

= 1 +-sqrt(0.8)/2

so x = 60 +-30*sqrt(0.8)

= 60 +-6*sqrt(20)

Now why does this specify a,b and c uniquely? The answer is that the roots of positive squarefree integers are linearly independent over the rationals, but I don't want to prove that here. For your purposes I think you're just allowed to assume that the solution is unique.

So a = 60, b = 6, c = 20 and their sum is 86.

Did I get the same as you? - 08 Apr '05 15:46

thanks, acolyte:*Originally posted by Acolyte***Let's see what we get:**

Let A be the arrival time of one co-worker, and B the arrival time of the other. The the probability that the second worker arrives while the first one is there is P(0 <= (B-A) <= x). Using independence, this is integral(f(t)P(t <= B <= t+x))dt, where f is the pdf of A. At this point we have to assume 'at random' means 'unifo ...[text shortened]... lution is unique.

So a = 60, b = 6, c = 20 and their sum is 86.

Did I get the same as you?

you and I did the problem more or less the same way.

but note that the problem also stipulates that c not be divisible by the square of any prime. since your c is divisible by 4 (2 is prime), it's not the answer they want. but if we factor the 4 out, we get

x = 60 +- 12 sqrt(5), so a+b+c = 77.

This is the answer I got, and now you did as well independently.

So this makes me think the answer they quote is wrong (they say it's 87), unless someone else can see fault in acolyte's logic?? - 08 Apr '05 16:45

Oops. You're quite right. I can't see where the examiner might have diverged from your answer.*Originally posted by davegage***thanks, acolyte:**

you and I did the problem more or less the same way.

but note that the problem also stipulates that c not be divisible by the square of any prime. since your c is divisible by 4 (2 is prime), it's not the answer they want. but if we factor the 4 out, we get

x = 60 +- 12 sqrt(5), so a+b+c = 77.

This is the answer I got, and n ...[text shortened]... they quote is wrong (they say it's 87), unless someone else can see fault in acolyte's logic?? - 08 Apr '05 18:54

i got the answer 87 with:*Originally posted by davegage***Suppose two co-workers each take one lunch break per day. They arrive at the cafeteria independently at random times between 12 PM and 1 PM, and each stays for exactly x minutes. The probability that either co-worker arrives while the other is in the cafeteria is 40%.**

If x = a - b*(c)^0.5, then find (a + b + c).

You also are given: a, b, and c a ...[text shortened]... of you can solve it to either confirm my answer or show me why my answer is wrong.

cheers,

a=60, b=12, c=15.

the way i've learned to deal with problems like these is to view the probability of success (both coworkers being in the cafeteria at the same time) as a shaded region of a square, where the axes represent the time of arrival.

consider a square with coordinates (0,0) through (60,60); the unshaded region would be the triangles formed by:

(0,x) (60-x,60) (0,60)

and

(x,0) (60,60-x) (60,0)

Assuming that the randomness is uniform, the probability of success becomes the ratio of the shaded region with the whole region; this results in the quadratic equation

x^2 - 120x + 1440 = 0

which yields the answer given above.

Looking at the solution posted by Acolyte, the only thing I can see at fault is the reasoning 0 < (B-A) < x. Shouldn't it be: 0<|B-A|<x ? (with absolute values).

- <-- i've always wanted to do that - 08 Apr '05 20:54

wow, that's great. thanks for your post.*Originally posted by psychopath42***i got the answer 87 with:**

a=60, b=12, c=15.

the way i've learned to deal with problems like these is to view the probability of success (both coworkers being in the cafeteria at the same time) as a shaded region of a square, where the axes represent the time of arrival.

consider a square with coordinates (0,0) through (60,60); the unshaded regio ...[text shortened]... houldn't it be: 0<|B-A|<x ? (with absolute values).

- <-- i've always wanted to do that

your solution is simple and i can't find anything wrong with your logic when i work it out, so i am guessing now the correct answer is 87 and there is some minor flaw with my and acolyte's logic.

interesting, the polynomials we get differ only by a factor of 2 in the last term:

yours: x^2 - 120x + 1440 = 0

mine: x^2 - 120x + 2880 = 0

this may help to expose the flaw in our logic (i don't see the flaw yet)

thanks again...that was driving me nuts for a while now. - 09 Apr '05 17:15 / 4 editsIf one co-worker stays is in the cafeteria for t(1) hours and the other for t(2) hours the probablity that they meet

= [t(1) + t(2)] - (1/2)*[t(1)^2 + t(2)^2]

where 0 =< t(1),t(2) =< 1

The probability that n co-workers*all*meet if they each stay for t hours

= nt^(n-1) - (n-1)t^n

where 0 =< t =< 1 - 09 Apr '05 20:59

Hmm. It could be that we've got different answers by interpreting the question differently. You're taking the probability that both co-workers are in the cafeteria at the same time to be 40%. davegage and I took 40% to refer to the probability that a*Originally posted by psychopath42***the way i've learned to deal with problems like these is to view the probability of success (both coworkers being in the cafeteria at the same time) as a shaded region of a square, where the axes represent the time of arrival.***given*co-worker arrives while the other one is there; the probability that they meet in the cafe would thus be 80%. - 10 Apr '05 05:50I think I found the fallacy in my earlier thinking:

Consider the expected amount of time each co-worker spends in the cafeteria between 12 PM and 1 PM, given that they arrive at some random time in that span of time (with uniform probability) and they spend x minutes there. This expected amount of time is given by:

INT[0,60-x]{(dt/60)x} + INT[60-x,60]{(dt/60)(60-t)}

Note that these are exactly like Acolyte's integrals, except his are probabilities, whereas mine are in time (they just differ by the factor of 60).

I then reasoned that this expected time should be 24 minutes so that the probability of the other coworker arriving while the one is there is 24/60 = 0.4. Acolyte did the same reasoning by setting his integrals to 0.4.

But I think this was wrong because it should be that the expected time for each individual is 12 so that the total expected time during the hour is 24. So i think that i have should have set my integrals to 12 and Acolyte's to 0.2. This gives the right answer of 87, and accounts for the discrepancy of 2 in the polynomials.

In the end I think I like Psychopath's method best. By representing the two arrival times on the axes, you can say with certainty for any point (x,y) whether the second co-worker arrives while the first is there or not. Then assuming the uniform distribution, you can just take the ratio of areas, as psychopath did.

thanks to all those who posted...it really helped.