Egg Dropping Puzzle: Here Is The Assumptions

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 9

Egg Dropping Puzzle

Let n ,k be positive integers. Given that the number of test eggs available is n and
there is a k-storey building. We are performing a egg dropping test to find out the
lowest floor of the building which causes and egg to break.
Here is the assumptions:
1. An egg that survives a fall can be used again.
2. A broken egg must be discarded.
3. The effect of a fall is the same for all eggs.
4. If an egg breaks when dropped, then it would break if dropped from a higher
window.
5. If an egg survives a fall, then it would be survive if dropped from a lower window.
6. It is not ruled out that the first-floor windows break, nor is it ruled out that the
k-th floor windows do not cause an egg to break.

Problem :
What is the least number of egg-droppings that is guaranteed to work in all cases?

Mathematically, we need to use a notation to denote the least number of egg-


droppings !!

Definition
Let n ,k be positive integers. Given that the number of test eggs available is n and
there is a k-storey building. Then, the least number of egg-droppings that is
guaranteed to work in all cases is denoted by W (n , k ) .

For n = 1 ,
Given that there is only one test egg and a k-storey building. Hence, in order to be
sure of obtaining the right result, we have to drop the egg from the first-floor
window step by step until the egg breaks.

Since the worst scenario is that the egg breaks on the k-th floor only , we conclude
that the least number of egg-droppings W ( 1, k )=k .
For n = 2 ,
Given that there are two test eggs and a k-storey building.
First, we suppose that the first egg is dropped from the unknown floor x/f where
x ∈ ⟦ 1, k ⟧ . Then, there are two possibilities.
(Starting floor: x/ f)

In the first situation, the test on the (x+1)-to-k th floor with two eggs is equivalent to
test on the (k-x)-storey building with two eggs. Hence, the least number of eggs
dropping in the first situation is 1+W (2, k −x) .
In the second situation, the test on the 1-to-(x-1) th floor with one egg is equivalent
to test on the (x-1)-storey building with one egg. Hence, the least number of eggs
dropping in the first situation is 1+W (1, x−1) .

Combining two situation, in order to guarantee a right result, we conclude that the
least number of eggs dropping (Starting from x-th floor) is
1+max { W ( 2, k−x ) , W (1, x−1)}

Hence, we deduce that the least number of eggs dropping for testing on the k-storey
building with two eggs W (2, k ) is
W ( 2, k )=1+min ⁡{ max { W ( 2, k−x ) , W ( 1, x−1 ) } ∨x ∈ ⟦ 1, k ⟧ }

Knowing that W ( 2,0 )=0,W ( 2,1 )=1∧W ( 1, k )=k , so we have


W ( 2, k )=1+min ⁡{ max { W ( 2, k−x ) , x−1 }∨x ∈ ⟦ 1, k ⟧ }
By using the recursion formula, we get
W ( 2,2 )=1+min ⁡{ max { W ( 2,2−x ) , x −1 }∨x ∈ ⟦ 1,2 ⟧ }

¿ 1+min {max { W ( 2,1 ) , 0 } , max { W ( 2,0 ) , 1 } }

¿ 1+1
¿2
W ( 2,3 )=1+min ⁡{max { W ( 2,3−x ) , x−1 } ∨x ∈ ⟦ 1,3 ⟧ }

¿ 1+min {max { W ( 2,2 ) , 0 } , max { W ( 2,1 ) ,1 } , max { W ( 2,0 ) , 2 } }

¿ 1+min {2,1,2 }
¿ 1+1
¿2
W ( 2,4 ) =1+ min ⁡{max { W (2,4−x ) , x−1 }∨x ∈ ⟦ 1,4 ⟧ }
¿ 1+min { max { 2,0 } , max { 2,1 } ,max {1,2 } , max {0,3 }}
¿ 1+min {2,2,2,3 }
¿ 1+2
¿3
Continuously, we have the following chart:
k W ( 2, k ) k W ( 2, k ) k W ( 2, k ) k W ( 2, k ) k W ( 2, k ) k W ( 2, k )
0 0 1 4 2 6 3 8 4 9 5 10
0 0 0 0 0
1 1 1 5 2 6 3 8 4 9 5 10
1 1 1 1 1
2 2 1 5 2 7 3 8 4 9 5 10
2 2 2 2 2
3 2 1 5 2 7 3 8 4 9 5 10
3 3 3 3 3
4 3 1 5 2 7 3 8 4 9 5 10
4 4 4 4 4
5 3 1 5 2 7 3 8 4 9 5 10
5 5 5 5 5
6 3 1 6 2 7 3 8 4 10 5 11
6 6 6 6 6
7 4 1 6 2 7 3 9 4 10 5 11
7 7 7 7 7
8 4 1 6 2 7 3 9 4 10 5 11
8 8 8 8 8
9 4 1 6 2 8 3 9 4 10 5 11
9 9 9 9 9
Here, we find some patterns about the number W ( 2, k ) .
{1,3,6,10,15,21,28,46,......................} are the triangle numbers such that the n-th
1
triangle number is n(n+1) .
2

Lemma
1
Let k be a positive integer. W (2, k )(W (2, k )+1)=k if and only if
2
W (2, k +1)−W (2, k)=1∧W (2,k )−W (2, k−1)=0 .

Theorem
Let k be a positive integer. Then, the the least number of egg-droppings that is
guaranteed to work with two eggs W (2, k ) is
1
W (2, k )=⌊ (1+ √ 8 k −1) ⌋
2
Remark: ⌊ x ⌋ is the floor function which is defined to be
⌊ x ⌋=max {m∈ Z∨m ≤ x } .

General formula of egg dropping puzzle


Let n ,k be positive integers. Given that the number of test eggs available is n and
there is a k-storey building. The least number of egg-droppings that is guaranteed to
work in all cases is denoted by W (n , k ) . Then, we have the following recursion
formula:
W ( n , k )=1+min ⁡{max { W ( n , k −x ) , W ( n−1, x−1 ) } ∨x ∈ ⟦ 1, k ⟧ }

By using Visual C++ program, we have the following result:


For n = 3 ,
k W ( 3, k ) k W ( 3, k ) k W ( 3, k ) k W ( 3, k ) k W ( 3, k ) k W ( 3, k )
0 0 1 4 2 5 3 6 4 6 5 7
0 0 0 0 0
1 1 1 4 2 5 3 6 4 6 5 7
1 1 1 1 1
2 2 1 4 2 5 3 6 4 7 5 7
2 2 2 2 2
3 2 1 4 2 5 3 6 4 7 5 7
3 3 3 3 3
4 3 1 4 2 5 3 6 4 7 5 7
4 4 4 4 4
5 3 1 5 2 5 3 6 4 7 5 7
5 5 5 5 5
6 3 1 5 2 6 3 6 4 7 5 7
6 6 6 6 6
7 3 1 5 2 6 3 6 4 7 5 7
7 7 7 7 7
8 4 1 5 2 6 3 6 4 7 5 7
8 8 8 8 8
9 4 1 5 2 6 3 6 4 7 5 7
9 9 9 9 9
From the chart, we find some patterns about the number W ( 3, k ) .
{1,2,2,3,3,3,3,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,.......
................................................}
No. of appearance of 1 = 1 No. of appearance of 2 = 2
No. of appearance of 3 = 4 No. of appearance of 4 = 7
No. of appearance of 5 = 11 No. of appearance of 6 = 16
So, we get a sequence {1,2,4,7,11,16,..............}
Those numbers are also similar to the triangle number which have a property
1+1 = 2, 2+2 = 4, 4+3 = 7, 7+4 = 11, 11+5 = 16
1 2
The n-th term of the sequence {1,2,4,7,11,16,.............} = 2 (n −n+2)

Hence, we deduce that the n-th term of the sequence {1,3,7,14,25,41,............} is


n

∑ 12 (k 2−k+ 2)
k=1

By using summation formula, we get that


n

∑ 12 ( k 2−k +2 ) = 16 n( n2 +5)
k=1

Lemma
1
Let k be a positive integer. W (3, k )(W (3, k)2 +5)=k if and only if
6
W (3, k +1)−W (3, k)=1∧W (3, k )−W (3, k−1)=0 .

By using the Cardano's method , we have


Theorem
Let k be a positive integer. Then, the the least number of egg-droppings that is
guaranteed to work with two eggs W (2, k ) is

√ √
3
W ( 3, k )=⌈ 3 k + 9 k 2 +
125 3
27 √ √
+ 3 k− 9 k 2+

Remark: ⌈ x ⌉ is the ceiling function which is defined to be


125
27

⌈ x ⌉=min {m∈ Z∨m ≥ x } .

For n = 4 ,
k W ( 4, k ) k W ( 4, k ) k W ( 4, k ) k W ( 4, k ) k W ( 4, k ) k W ( 4, k )
0 0 1 4 2 5 3 5 4 6 5 6
0 0 0 0 0
1 1 1 4 2 5 3 6 4 6 5 6
1 1 1 1 1
2 2 1 4 2 5 3 6 4 6 5 6
2 2 2 2 2
3 2 1 4 2 5 3 6 4 6 5 6
3 3 3 3 3
4 3 1 4 2 5 3 6 4 6 5 6
4 4 4 4 4
5 3 1 4 2 5 3 6 4 6 5 6
5 5 5 5 5
6 3 1 5 2 5 3 6 4 6 5 6
6 6 6 6 6
7 3 1 5 2 5 3 6 4 6 5 7
7 7 7 7 7
8 4 1 5 2 5 3 6 4 6 5 7
8 8 8 8 8
9 4 1 5 2 5 3 6 4 6 5 7
9 9 9 9 9
No. of appearance of 1 = 1 No. of appearance of 2 = 2
No. of appearance of 3 = 4 No. of appearance of 4 = 8
No. of appearance of 5 = 15 No. of appearance of 6 = 26
The sequence {1,2,4,8,15,26,......................} have the property
1+1 = 2, 2+2 = 4, 4+4 = 8, 8+7 = 15, 15+11 = 26, ...................................................
1 3 2
The n-th term of the sequence {1,2,4,8,15,26,.............} = 6 ( n −3 n +8 n)
Hence, we deduce that the n-th term of the sequence {1,3,7,15,30,56,............} is
n

∑ 16 (k 3 −3 k 2 +8 k )
k=1

By using summation formula, we get that


n

∑ 16 ( k 3−3 k 2+ 8 k )= 24
1
n(1+n)(n 2−3 n+14)
k=1

Lemma
1
Let k be a positive integer. W (4, k )(1+W ( 4, k))(W (4, k )2−3 W (4,k )+14)=k if
24
and only if W (4, k +1)−W ( 4,k )=1∧W (3, k )−W (3, k−1)=0 .
The general formula of W(4,k) is too complicated. So, it is meaningless to use this
formula for calculating W(4,k). Furthermore, by the Galois Theory, for any
n ∈ N such that n ≥ 5 , the degree n polynomial do not have general solutions.
Hence, we would stop constructing the general formula.

Observation
2nd 1 2 3 4 5 6 7 8 9 10 11 12 13 .....................
3rd 1 2 4 7 11 16 22 29 37 46 56 67 79 92 ......................
4th 1 2 4 8 15 26 42 64 93 130 176 232 299 378 470 .....................

 th 1 2 4 8 16 32 64 128 256 512 1024 2048 4096 8192 16384 32768 65536 131072 ......................................

This "numbers mountain" provide a fast algorithm for calculating W ( n , k ) .

Definition
¿
Let n be a positive integer such that n ≥2 . Then, {π n (m)∨mϵ N } is a
¿
sequence of number which is defined to be π n (m)=Card { k ϵ N |W ( n , k )=m } .
Example:
π 2 (6)=Card { k ϵ N ¿|W ( 2, k )=6 }=Card {16,17,18,19,20,21 }=6
π 3 (4)=Card { k ϵ N ¿|W ( 3,k )=4 }=Card {8,9,10,11,12,13,14 }=7
{π 2 (m)∨mϵ N ¿ }={1,2,3,4,5,6,… … … }=N ¿
¿ 1 2 ¿
{π 3 (m)∨mϵ N }={1,2,4,7,11,16, … … … }={ ( k −k +2 ) ∨kϵ N }
2
¿ 1 3 2 ¿
{π 4 (m)∨mϵ N }={1,2,4,7,11,16, … … … }={ ( k −3 k +8 k )∨kϵ N }
6
Theorem
Let n be a positive integer such that n ≥2 . Then, the following
holds:
m −1
‧ π n +1 ( m )=1+ ∑ π n ( k ) , for any m∈ N with m≥ 2
k=1

‧ π n ( 1 )=1

Fast Algorithm For Calculating W(n,k)


Case 1: For n=1 ,then W ( 1, k )=k , for any k ∈ N .
Case 2: For n ≥1 ,then we use the following procedure to calculate W ( n , k ) .
First, we need to construct a trapezoid as the following figure.
2nd 1 2
3rd 1 2 4
4th 1 2 4 8
5th 1 2 4 8 16

nth 1 2 4 8 16 .................................... 2n-2


(n+1)th 1 2 4 8 16 32 .................................... 2n-1

Next, we would construct the trapezoid sidelong until we find out a number m such
m+1
that π n+1 ( m )−1, π n +1 ( ¿−1 ) . Then, W ( n , k )=m .
k ∈¿

Example
Suppose that the number of test eggs available is 4 and there is a 200-storey
building. What is the least number of egg-droppings that is guaranteed to work in
all cases of the egg dropping puzzle W ( 4,200 ) ?
2nd 1 2 3 4 5 6 7
3rd 1 2 4 7 11 16 22 29
4th 1 2 4 8 15 26 42 64 93
5th 1 2 4 8 16 31 57 99 163 256

10
Since π 6 ( 9 )−1, π 6 ( ¿−1 )=¿ , by theorem W ( 4,200 ) =9 .
200∈ ¿

You might also like