Romeo & Juliet meetup

A forum for good logic/math puzzles.

Moderators: jestingrabbit, Moderators General, Prelates

User avatar
fjafjan
THE fjafjan
Posts: 4766
Joined: Fri Oct 06, 2006 12:22 pm UTC
Location: Down south up north in the west of eastern west.
Contact:

Romeo & Juliet meetup

Postby fjafjan » Mon Dec 14, 2009 12:33 am UTC

Okey so I might mix up some minor detail but I believe the problem is as such (and if there uncertainties do ask)

Romeo and Juliet are to meet in the town square, but they cannot decide a fixed time because then they will get caught. So they have decided to meet sometime between 23.00 and 00.00 but neither party knows when the other will arrive. Because they don't want to get caught they will only stay at the town square for ten minutes, and they will always leave when the clock strikes 00.00. They will always arrive at a "full minute" ie they will not arrive 23:45.23.
If one party is leaving the same minute another is arriving they will meet.

What is the probability Romeo and Juliet will meet?
I solved this problem (I thought) but was told my answer was incorrect, so I might as well let you guys go at it first and then I will say what I think is the right answer and what is supposedly the right answer.
//Yepp, THE fjafjan (who's THE fjafjan?)
Liza wrote:Fjafjan, your hair is so lovely that I want to go to Sweden, collect the bit you cut off in your latest haircut and keep it in my room, and smell it. And eventually use it to complete my shrine dedicated to you.

epok88
Posts: 10
Joined: Sat Nov 28, 2009 6:01 pm UTC

Re: Romeo & Juliet meetup

Postby epok88 » Mon Dec 14, 2009 12:44 am UTC

Spoiler:
There are 50 possible 10 minute intervals (0 to 10, 1 to 11, ... , 50 to 60) and each interval has 10 overlapping intervals (ie 18 to 28 has intervals 8 to 18, 9 to 19.... in it. the exception is the first and last 10 intervals. from here it's fairly easy to calculate...should be just less than 1/5 (ballpark approx)

User avatar
skeptical scientist
closed-minded spiritualist
Posts: 6142
Joined: Tue Nov 28, 2006 6:09 am UTC
Location: San Francisco

Re: Romeo & Juliet meetup

Postby skeptical scientist » Mon Dec 14, 2009 2:03 am UTC

Assuming each decides independently on a random time between 11:00 and 11:59 to arrive, and if one arrives at the exact instant the other leaves then they fail to meet,
Spoiler:
their chance of meeting is [math]\frac1{60}\left[\frac{10}{60}+\frac{11}{60}+\frac{12}{60}+\frac{13}{60}+\frac{14}{60}+\frac{15}{60}+\frac{16}{60}+\frac{17}{60}+\frac{18}{60}+\frac{19}{60}+\frac{19}{60}+\frac{19}{60}+\ldots+\frac{19}{60}+\frac{18}{60}+\frac{17}{60}+\frac{16}{60}+\frac{15}{60}+\frac{14}{60}+\frac{13}{60}+\frac{12}{60}+\frac{11}{60}+\frac{10}{60}\right].[/math] If one arrives at 11:00, the other must arrive some time between 11:00 and 11:09, for 10 possibilities. Each minute later increases the number of possibilities by 1, to a maximum of 19 (the same time, up to 9 minutes before, or up to 9 minutes after, for all times between 11:09 and 11:50). At 11:51, this starts to drop again, until 11:59, when it is back down to 10 possibilities. Thus we have
[math]\frac{1}{60^2}\left[19\cdot42+2\sum_{i=10}^{18} i \right]=\frac{1}{3600}\left[798+2\frac{28\cdot9}{2}\right]=\frac{7}{24}.[/math]

Epok's approximation is rather far off, because there are at least 10 and up to 19 overlapping intervals, rather than at most 10.
I'm looking forward to the day when the SNES emulator on my computer works by emulating the elementary particles in an actual, physical box with Nintendo stamped on the side.

"With math, all things are possible." —Rebecca Watson

User avatar
BoomFrog
Posts: 1070
Joined: Mon Jan 15, 2007 5:59 am UTC
Location: Seattle

Re: Romeo & Juliet meetup

Postby BoomFrog » Mon Dec 14, 2009 4:08 am UTC

Skep, one of your assumptions is not based on the OP.
fjafjan wrote:If one party is leaving the same minute another is arriving they will meet.

I also assumed that it was possible to arrive at 00:00 and if the other is there meet, otherwise immediately leave.
Spoiler:
Math is very similar to Skeptical's

There are 61 moments to arrive (each minute inclusive.) In the "middle minutes" 23:10-23:50 there are 21 moments that your beau could choose to arrive that results in a meetup. So that's 41/61*21/61.

For the early and late minutes you lose once chance each step you take closer to the border so (20+19+18..+11)*2/(61*61)

Total is: 1171/3721 which is about 31.5% chance to meet. Seems a bit clunky, usually these things have neater answers.


What answer were you told Fja?

Joke answer:
Spoiler:
Being prefect logicians (and mutually aware of each others logical reliability) they choose to only arrive between 23:10 and 23:50 to maximize their chances. But knowing the other will do the same they then narrow the time further and further until deciding to both come at exactly 23:30. They meet 100% of the time but are also caught because they accidentally set a fixed time.
"Everything I need to know about parenting I learned from cooking. Don't be afraid to experiment, and eat your mistakes." - Cronos

User avatar
skeptical scientist
closed-minded spiritualist
Posts: 6142
Joined: Tue Nov 28, 2006 6:09 am UTC
Location: San Francisco

Re: Romeo & Juliet meetup

Postby skeptical scientist » Mon Dec 14, 2009 4:55 am UTC

I prefer my assumptions as they lead to a simpler answer. 8) In any case, the solution method will be the same.
I'm looking forward to the day when the SNES emulator on my computer works by emulating the elementary particles in an actual, physical box with Nintendo stamped on the side.

"With math, all things are possible." —Rebecca Watson

User avatar
fjafjan
THE fjafjan
Posts: 4766
Joined: Fri Oct 06, 2006 12:22 pm UTC
Location: Down south up north in the west of eastern west.
Contact:

Re: Romeo & Juliet meetup

Postby fjafjan » Mon Dec 14, 2009 10:26 am UTC

Yeah you guys had the same solution as me, where I assumed the max of 20 minutes. the 'correct' answer was supposedly 1/36 if you drew a graph and calculated the area under it (trying to aquire it atm). This problem was a problem for my little sister so when I solved it I figured
A the answer was (as you said) 'clunky'
B a bit too hard for a 9th grader (but not extremly)
So yeah, I too arrived at first two sums of 10/60+11/60...19/60, then one sum of 40*20/60 for the "middle" times, all multiplied by 1/60, so I got some ugly fraction.
//Yepp, THE fjafjan (who's THE fjafjan?)
Liza wrote:Fjafjan, your hair is so lovely that I want to go to Sweden, collect the bit you cut off in your latest haircut and keep it in my room, and smell it. And eventually use it to complete my shrine dedicated to you.

User avatar
Kingreaper
Posts: 170
Joined: Sun Jan 27, 2008 4:23 pm UTC

Re: Romeo & Juliet meetup

Postby Kingreaper » Mon Dec 14, 2009 1:54 pm UTC

[quote="fjafjan"]Yeah you guys had the same solution as me, where I assumed the max of 20 minutes. the 'correct' answer was supposedly 1/36quote]
If they always arrived at a precise ten minute interval, ie. 11:00, 11:10, 11:20 etc. and only met if they arrived at the same one, the answer would still be 1/6. 1/7 if you include arriving at precisely midnight as an option.

And that's discounting the possibilities of overlapping times which increase the probability of their meeting for obvious reasons.

How on earth the "correct" answer is lower probability than that scenario I cannot fathom. Let alone 1/36

Nitrodon
Posts: 497
Joined: Wed Dec 19, 2007 5:11 pm UTC

Re: Romeo & Juliet meetup

Postby Nitrodon » Mon Dec 14, 2009 2:26 pm UTC

The answer in the continuous case is 11/36, not 1/36.

User avatar
jestingrabbit
Factoids are just Datas that haven't grown up yet
Posts: 5967
Joined: Tue Nov 28, 2006 9:50 pm UTC
Location: Sydney

Re: Romeo & Juliet meetup

Postby jestingrabbit » Mon Dec 14, 2009 3:13 pm UTC

fjafjan wrote:1/36


I don't know what's right, but that is incredibly wrong. I would suggest that your sister propose a wager to the teacher. Not only will she make some money, but someone that far off should receive some sort of humiliation if they're going to teach that wrongness to others.
ameretrifle wrote:Magic space feudalism is therefore a viable idea.

User avatar
skeptical scientist
closed-minded spiritualist
Posts: 6142
Joined: Tue Nov 28, 2006 6:09 am UTC
Location: San Francisco

Re: Romeo & Juliet meetup

Postby skeptical scientist » Mon Dec 14, 2009 3:48 pm UTC

I'm guessing he meant 11/36. In any case, the problem specifically stated that they always arrive at multiples of one minute, so the continuous case answer is just wrong for the problem as stated.
I'm looking forward to the day when the SNES emulator on my computer works by emulating the elementary particles in an actual, physical box with Nintendo stamped on the side.

"With math, all things are possible." —Rebecca Watson

User avatar
fjafjan
THE fjafjan
Posts: 4766
Joined: Fri Oct 06, 2006 12:22 pm UTC
Location: Down south up north in the west of eastern west.
Contact:

Re: Romeo & Juliet meetup

Postby fjafjan » Mon Dec 14, 2009 8:19 pm UTC

Nitrodon wrote:The answer in the continuous case is 11/36, not 1/36.

Ah! I might have misstated and this was the given answer (It was my first suspicion that the correct answer was just the same question in the continuous form but because I was told it was incorrect at a dinner party I couldn't bring out pen paper and solve it... Still, the question was not asked in for the continuous case but either 1 or 10 minutes arrival possibilities.
//Yepp, THE fjafjan (who's THE fjafjan?)
Liza wrote:Fjafjan, your hair is so lovely that I want to go to Sweden, collect the bit you cut off in your latest haircut and keep it in my room, and smell it. And eventually use it to complete my shrine dedicated to you.

User avatar
rigwarl
Posts: 759
Joined: Wed Dec 09, 2009 9:36 pm UTC

Re: Romeo & Juliet meetup

Postby rigwarl » Mon Dec 21, 2009 5:15 pm UTC

Spoiler:
You can solve this problem easily by using a 2D graph

rattusprat
Posts: 26
Joined: Mon Nov 09, 2009 8:49 am UTC

Re: Romeo & Juliet meetup

Postby rattusprat » Tue Dec 22, 2009 10:30 am UTC

Do we assume that Romeo & Juliet are intelligent and logical people? (given they will both kill themselves in a couple of days time this may not be a valid assumption).

Juliet can rationalise that it would be foolish to arrive at minute 5 for example. She would then only see Romeo if he arrived at minute 0-15. Juliet could realise she would be better to arrive at minute 10 than minute 5, as she would still see Romeo if he arrived at minute 0-15, but would also see him if he arrived at minutes 16-20.

Using this (or similar) logic, neither Romeo or Juliet will arrive in the first 10 or final 10 minutes of the hour. I will leave someone else to do the maths, but this will increase the probability, would it not?

As an aside, if this were done as an experiment with 1000 pairs of people, I would expect most to lob between about minutes 20-40 and the number of pairs that would meet would be somewhere near 500, possiblity higher.

User avatar
Adacore
Posts: 2755
Joined: Fri Feb 20, 2009 12:35 pm UTC
Location: 한국 창원

Re: Romeo & Juliet meetup

Postby Adacore » Tue Dec 22, 2009 5:17 pm UTC

You've also got to factor in that they're both young and flighty (so may well be running later than they planned) and desperately in love (so might hurry to get there early). Perhaps those factors cancel out? :mrgreen:

Ledzepp
Posts: 3
Joined: Thu Dec 17, 2009 11:04 am UTC

Re: Romeo & Juliet meetup

Postby Ledzepp » Thu Dec 24, 2009 7:43 am UTC

Spoiler:
max difference between their arrival timing would be 10 min..rite....if juliet comes at 2300 romio has to come at max 2310...there there are 11 ways they can meet similarly in 11 ways btw 2301- 2310....max time at which juliet can leave is 2350 so 2350 - 0000, so total of 11*51 ie 561....in this case i have assumed that juliet is coming first...now if romio comes first then that would be a diff case so..total ways would be 561+510 as 51 case would be when they both comes at the same time...now total number of ways they both can come is 51*51 ie 2601 so the prob would be 1071/2601

User avatar
TheChewanater
Posts: 1279
Joined: Sat Aug 08, 2009 5:24 am UTC
Location: lol why am I still wearing a Santa suit?

Re: Romeo & Juliet meetup

Postby TheChewanater » Sun Dec 27, 2009 8:38 am UTC

Serious:
Spoiler:
Well, I though I'd try to write a program to do this, since I think I know how to find the answer but not how to do it on my own.

This is actually, literally, the first Python thing I've ever made, and likey the last (or one of very few).

What I did was very simple. For every possible combination of times they could have arrived (60*60), check if Romeo arrived within 10 minutes after Juliet or if Juliet arrived within 10 minutes after Romeo. If one of them is true, move the success counter up by one.

EDIT: Slight error, fixed.

Code: Select all

#!/usr/bin/env python

success = 0
total = 0

for rom in range(60):
   for jul in range(60):
      if jul <= rom:
         if rom < jul + 10:
            success += 1
      else:
         if rom <= jul:
            if jul < rom + 10:
               success += 1
            
      total += 1

print str(100 * success / total) + "%"

It prints "29%". I don't know if that's right, though.

Joke:
Spoiler:
They decide beforehand that their meeting time will be determined by the word count of their last conversation, which, being perfect logisticians, they figured out that there would be a 100% chance, given the location of all particles and energy in the universe, that they would decide on having to memorize. If it's even, it's 11PM. If it's odd, it's 12AM. If it uses hyphonated words or words such as "cannot" (which one of them may misspell "can not"), it's canceled because Romeo is with her sister.
ImageImage
http://internetometer.com/give/4279
No one can agree how to count how many types of people there are. You could ask two people and get 10 different answers.

BoFairfield
Posts: 3
Joined: Wed Dec 30, 2009 6:08 am UTC

Re: Romeo & Juliet meetup

Postby BoFairfield » Wed Dec 30, 2009 6:24 am UTC

Since there are a relatively small number of cases, I just wrote a quick java program to test each one.
Spoiler:
here's the method body:

Code: Select all

int count = 0, total = 0;
    for(int r = 0; r <= 60; r++)
      for(int j = 0; j <= 60; j++)
      {
        if( Math.abs(r-j) <= 10)
          count++;
        total++;
      }
    System.out.println(count + "/" + total + "=" + (float)count/total);


That returns 1171/3721, or 31.47%, confirming everyone's answer.
Chewanater, I'm not familiar with Python, but I believe that you are making one, maybe two errors.
firstly: If one leaves the same minute the other comes, that counts as a meeting. Therefore, your lines of code:

Code: Select all

if rom < jul + 10:
...
if jul < rom + 10:

should use <= rather than <.
secondly: I think that your for loops are each making a midnight-exclusive 60 iterations, rather than the midnight-inclusive 61 that most people have been using in this thread. However, that's just because I was only able to replicate your results that way; I don't know the syntax of loops in Python.

User avatar
TheChewanater
Posts: 1279
Joined: Sat Aug 08, 2009 5:24 am UTC
Location: lol why am I still wearing a Santa suit?

Re: Romeo & Juliet meetup

Postby TheChewanater » Wed Dec 30, 2009 6:52 am UTC

BoFairfield wrote:I don't know the syntax of loops in Python.[/spoiler]


Ah, I think you're right. I don't know exactly how loops work in Python either, which might explain why I got a different answer in C++. Although, I did do it much differently.
Spoiler:
I get 31.9444%. Is one of use doing something wrong (I didn't look at your code or try to interpret your equations), or is this a FPU fail?

Code: Select all

#include <iostream>
#include <math.h>

int main()
{
   float meet = 0;
   float total = 0;
   
   for (int rom = 0; rom < 60; rom ++)
   {
      for (int jul = 0; jul < 60; jul ++)
      {
         if (fabs(jul -rom) <=10)
         {
            meet ++;
         }
         total ++;
      }
   }
   
   std::cout << 100 * meet / total << '%'  << '\n';
}
ImageImage
http://internetometer.com/give/4279
No one can agree how to count how many types of people there are. You could ask two people and get 10 different answers.

BoFairfield
Posts: 3
Joined: Wed Dec 30, 2009 6:08 am UTC

Re: Romeo & Juliet meetup

Postby BoFairfield » Wed Dec 30, 2009 5:53 pm UTC

you got 1150/3600, which is because your for loops don't include midnight, whereas I got 1171/3721 because mine do. The OP doesn't specify which way is correct, but it's just a difference of <= vs < in the for loop headers


Return to “Logic Puzzles”

Who is online

Users browsing this forum: No registered users and 11 guests