How Many Attempts to Find an Object in Random Boxes?

  • Context: High School 
  • Thread starter Thread starter mu
  • Start date Start date
  • Tags Tags
    Average
Click For Summary

Discussion Overview

The discussion revolves around calculating the average number of attempts required to find an object hidden in a set of boxes, specifically focusing on a scenario with 5 boxes and extending to a general case with N boxes. The conversation includes both a basic approach and a more complex generalization involving multiple objects.

Discussion Character

  • Exploratory
  • Mathematical reasoning

Main Points Raised

  • One participant proposes that if there are 5 boxes, the average number of attempts to find the object is 3, derived from the sum of attempts needed for each box divided by the number of boxes.
  • Another participant agrees with the initial reasoning and presents an alternative calculation method, using the probability of finding the object in any particular box.
  • A later post introduces a more general equation for the average number of picks needed to find one of k objects in N boxes, suggesting a different average based on the number of objects.

Areas of Agreement / Disagreement

Participants generally agree on the basic calculation for the case of 5 boxes, but the introduction of a more general case with multiple objects leads to differing perspectives on the average number of attempts required, indicating unresolved aspects of the discussion.

Contextual Notes

The discussion does not clarify the assumptions behind the generalization to k objects in N boxes, nor does it resolve the implications of different approaches to calculating the average attempts.

mu
Messages
7
Reaction score
0
Hi everyboby :smile:

I need something very simple for a personnal project, but I'm not quite sure I got it right. Here it is:

Suppose there are 5 boxes side-to-side. One of them contains an object (the probability is equal for all boxes, 1-in-5). On average, how many attempts does it take to find the object?


Here is what I figured:

if the object is in box 1, you need 1 attempt;
if the object is in box 2, you need 2 attemps;
etc.

After finding the object, you 'randomize' the system and try to find the object again. After doing this 5 times, the object will have been in each of the boxes 1 time (let's say that the system is REALLY random, or that we did a great number of tests). We will then have made 1, 2, 3, 4 and 5 attempts (not necessarily in that order) out of 5 tests. So, on average, we have made
[tex] \frac{{\left( {1 + 2 + 3 + 4 + 5} \right)}}{5} = 3[/tex]
attempts.

Generalizing to N boxes, we have
[tex] \left\langle n \right\rangle = \frac{1}{N}\sum\limits_{i = 1}^N i = \frac{{N + 1}}{2}[/tex]


So... is this right or am I wrong somewhere? It seems suspiciously simple. Anyway, thanks a lot for your help :smile: (and sorry about my english...)
 
Physics news on Phys.org
Looks okay to me. I may have reasoned slightly differently though :

Assume you are going to pick in the order 1, 2, 3, ...
The probability that the object is in any particular box is 1/N.

[tex]\left\langle n \right\rangle = \sum\limits_{i=1}^N{p_i~n_i} = \frac{1}{N} \frac{{N(N + 1)}}{2}[/tex]
 
Last edited:
Thanks for your quick reply :smile:

I appreciate the insight you provided with your alternative approach. It seems so evident now...

Thanks again
 
Well, it's quiet in here :zzz:

Not that anybody cares, but I pursued my little quest and found an equation for a more general problem. I don't know why I'm posting this... just sharing, I guess.

Suppose you have k objects in N boxes. On average, how many picks (n) will you need to find an object? Here's what I found:

[tex] \left\langle n \right\rangle = \frac{{\sum\limits_{i = 1}^N {i \cdot \left( \begin{array}{l}<br /> N - i \\ <br /> k - 1 \\ <br /> \end{array} \right)} }}{{\left( \begin{array}{l}<br /> N \\ <br /> k \\ <br /> \end{array} \right)}} = \frac{{N + 1}}{{k + 1}}[/tex]

Thanks to my good friend Maple for the simplification of the messy factorials.
 

Similar threads

  • · Replies 29 ·
Replies
29
Views
8K
  • · Replies 16 ·
Replies
16
Views
3K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
Replies
10
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 14 ·
Replies
14
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 8 ·
Replies
8
Views
3K