Math Is Fun Forum

  Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

You are not logged in.

#1 2016-03-17 04:13:03

samuel.bradley.99
Member
Registered: 2016-03-16
Posts: 51

Stack of books

In a stack of 31 identical books, I am searching 5 which contain a dedication by an old friend, written in the first page. How many books do I have to check, on average, in order to locate the ones I am looking for?

Offline

#2 2016-03-17 06:03:13

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Stack of books

Are you searching for 5 books that have this dedication or are you searching 5 books at a time?


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#3 2016-03-17 06:59:47

samuel.bradley.99
Member
Registered: 2016-03-16
Posts: 51

Re: Stack of books

I am searching for these particular 5 books, of the stack of 31. This means I start picking books at random, open the cover to see if they have the dedication and then put them aside, to continue with the remaining. I can be very lucky and find all 5 at my first few attempts, or have to check all 31 books until I get them all.

We are asking for the average number of books that I must check.

bobbym wrote:

Are you searching for 5 books that have this dedication or are you searching 5 books at a time?

Offline

#4 2016-03-17 07:05:30

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Stack of books

Are there only 5 books in the bunch or are there more.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#5 2016-03-17 07:09:26

samuel.bradley.99
Member
Registered: 2016-03-16
Posts: 51

Re: Stack of books

I don't know what you mean by "bunch"...
I pick one book at a time, check for the dedication and then continue. As soon as I find all 5, I stop.

bobbym wrote:

Are there only 5 books in the bunch or are there more.

Offline

#6 2016-03-17 07:15:09

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Stack of books

All 5, that implies there are only 5 of these books that have the dedication. That is correct?


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#7 2016-03-17 07:16:57

samuel.bradley.99
Member
Registered: 2016-03-16
Posts: 51

Re: Stack of books

Ahh yes. Only 5 have the dedication.

bobbym wrote:

All 5, that implies there are only 5 of these books that have the dedication. That is correct?

Offline

#8 2016-03-18 18:42:38

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Stack of books

Hi;

I am getting an expected value of 80 / 3 checks to find all 5.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#9 2016-03-19 03:39:16

samuel.bradley.99
Member
Registered: 2016-03-16
Posts: 51

Re: Stack of books

Dear Bobby,
Only by intuition, I would expect a smaller number, although I don't know the answer.
Can you share solution?

bobbym wrote:

Hi;

I am getting an expected value of 80 / 3 checks to find all 5.

Offline

#10 2016-03-19 03:56:13

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Stack of books

Intuition has no place in expectation but even so the expected amount for just one book out of 31 is around 16 so 80 / 3 for 5 is not unbelievable.

The answer was derived in 3 ways:

1) A simulation produced 26.666151 as well as a possible formula.

2) I then checked every possible arrangement of books there are only

arrangements and got an answer of 80 / 3.

3) There is a distribution for problems like this, it is called the negative hypergeometric distribution. Using it I get


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#11 2016-03-19 21:55:06

samuel.bradley.99
Member
Registered: 2016-03-16
Posts: 51

Re: Stack of books

Dear Bobby,
I agree that intuition is not the proper way of solving math problems smile

I trust your solution is correct. Can you please explain No 2 an in particular, how you got 80/3 from the total number of possible arrangements? If I understand well, this is the number of ways to select 5 out of 31.

Many thanks,
Sam

bobbym wrote:

Intuition has no place in expectation but even so the expected amount for just one book out of 31 is around 16 so 80 / 3 for 5 is not unbelievable.

The answer was derived in 3 ways:

1) A simulation produced 26.666151 as well as a possible formula.

2) I then checked every possible arrangement of books there are only

arrangements and got an answer of 80 / 3.

3) There is a distribution for problems like this, it is called the negative hypergeometric distribution. Using it I get

Offline

#12 2016-03-20 04:30:51

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Stack of books

I agree that intuition is not the proper way of solving math problems

I do not. Without our intuition we would not be able to solve any problem at all.

I used a computer for both 1 and 2. For 2
I generated all possible  collections of 31 books and then just calculated the exact answer from that.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

Board footer

Powered by FluxBB