Jump to content
BrainDen.com - Brain Teasers
  • 1

Grabbing marbles


bonanova
 Share

Question

You are wearing gloves while trying to retrieve the marbles contained in a bag. Because of the gloves, you're doing a pretty poor job of it. With each grab, you are only able to retrieve a random number of marbles, evenly distributed between 1 and n, the number of marbles currently in the bag. With 30 marbles initially in the bag, how many grabs do you expect it will take to retrieve them all?

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 1
  Reveal hidden contents

 

Link to comment
Share on other sites

  • 0

That agrees with simulations I ran, which gave, approximately,

  Reveal hidden contents

Nice solve.

Link to comment
Share on other sites

  • 0
  On 3/24/2018 at 2:37 PM, bonanova said:

That agrees with simulations I ran, which gave, approximately,

  Reveal hidden contents

Nice solve.

Thanks.

Expand  

 

Link to comment
Share on other sites

  • 0

I think this puzzle is exactly the same as the traffic jam puzzle I posted recently, although that's not obvious at first glance.

@plainglazed found a solution in which he formed clusters of cars by recursively locating the slowest of a group of cars, assuming on average it was in the center of the remaining cars. This corresponds to "grabbing" on average one-half of the remaining marbles from the bag. Picture the marbles in a line and, grabbing a random percentage of them starting from one end. This has to end up having the same number of marble grabs and car clusters. It leads to a logarithmic answer, but to the wrong base -- it should be the natural loge, not log2, which gives too large an answer. Instead of decreasing the number by 1/2 each grab, the remaining number is decreased by 1/e each grab. Same must go for locating the slowest of the remaining cars.

@plasmid found a solution that leads to Sum { 1/k }, which as you point out is ln { n } + gamma, and is here confirmed by simulation. What I can't find is a corresponding analysis for the marbles problem (although plainglazed's approach is applicable to both problems) that will lead to that same sum, instead of yours, where both sums appear to be correct.

This has been fun to think about.

.

Link to comment
Share on other sites

  • 0
  On 3/25/2018 at 5:44 AM, bonanova said:

I think this puzzle is exactly the same as the traffic jam puzzle I posted recently, although that's not obvious at first glance.

@plainglazed found a solution in which he formed clusters of cars by recursively locating the slowest of a group of cars, assuming on average it was in the center of the remaining cars. This corresponds to "grabbing" on average one-half of the remaining marbles from the bag. Picture the marbles in a line and, grabbing a random percentage of them starting from one end. This has to end up having the same number of marble grabs and car clusters. It leads to a logarithmic answer, but to the wrong base -- it should be the natural loge, not log2, which gives too large an answer. Instead of decreasing the number by 1/2 each grab, the remaining number is decreased by 1/e each grab. Same must go for locating the slowest of the remaining cars.

@plasmid found a solution that leads to Sum { 1/k }, which as you point out is ln { n } + gamma, and is here confirmed by simulation. What I can't find is a corresponding analysis for the marbles problem (although plainglazed's approach is applicable to both problems) that will lead to that same sum, instead of yours, where both sums appear to be correct.

This has been fun to think about.

.

Expand  

Though they are similar, I see at least one huge difference. In the traffic jam puzzle, you cut ANY part. In the marble problem, you cut the REMAINING part. Enough for different formulae.

Remains me of http://brainden.com/forum/topic/18168-squirrel/

Link to comment
Share on other sites

  • 0
  On 3/25/2018 at 8:57 AM, harey said:

Though they are similar, I see at least one huge difference. In the traffic jam puzzle, you cut ANY part. In the marble problem, you cut the REMAINING part. Enough for different formulae.

Expand  

The cars in front of the slowest car are the remaining cars. (Each slowest car captures those behind it.)

Link to comment
Share on other sites

  • 0
  On 3/25/2018 at 5:44 AM, bonanova said:

What I can't find is a corresponding analysis for the marbles problem (although plainglazed's approach is applicable to both problems) that will lead to that same sum, instead of yours, where both sums appear to be correct.

Expand  

I see now: plainglazed's formula is the simplification of my formula I was so hard looking for. On paper, I got a kind of unreadable proof, so I fed them into my computer. Up to n=30, no difference with 6 decimals.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...