Egg Dilemma (Part 1)


http://www.powerpointbackgrounds.com/templates/all-the-eggs-in-one-basket-01.JPG

 

This problem, "Egg Dilemma", is taken from Teaching Children Mathematics, vol. 11, no. 1, August 2004, pp. 26-27 (the authors are Barbara Britton and Carla Tayeh).

 

Chris has some eggs to sell, and Maria, Ai-Ling, and Jermaine want to buy them. Chris sells half the eggs plus half an egg to Maria, then sells half the remaining eggs plus half an egg to Ai-Ling, and finally sells half the remaining eggs plus half an egg to Jermaine. At the end of the three sales, Chris is out of eggs. The strange thing is that Chris never had to break an egg. How many eggs did Chris begin with? Does only one solution exist? If so, explain why.

 

Students should be allowed to present their own solutions. But the solution given below should be presented, because it introduces some basic techniques that are used in many problems. In giving a handout you may want to give comments on a separate sheet.

 

Solution.

1. Mathematical formulation of the problem.

Let x be the variable that holds the number of eggs Chris has. Each time when Chris sells x/2 + 1/2 (eggs), x - (x/2 + 1/2) = x/2 - 1/2 (eggs) remain. So the variable x changes as follows,

       x/2 - 1/2 → x

After three such changes, x = 0 (0 eggs are left). The question is, what was the initial value of x?

 

Comment 1.

• x/2 - 1/2 → x is an assignment statement. It may be read, "Compute the value of the expression on the left side of the arrow, and store the result in the variable on the right side", or simply "Assign x/2 - 1/2 to x." Notice that the value of x on the left side is different from what it is on the right side of the arrow. The value of x has changed.

• In some computer languages this assignment is written differently,

   x := x/2 - 1/2,    or even x = x/2 - 1/2

But it is never read "x equals x/2 - 1/2."

• Let's look at one example of what this assignment statement does. If the value of x were 13, then after the assignment is carried out the new value of x would be 13/2 - 1/2 = 6.

 

2. Algebraic transformation.

Let's look at one change of the variable x. Let B be its value before the change and A be its value after the change. So we have,

      B/2 - 1/2 = A.

Solving for B, we have

      2*A + 1 = B.

 

Comment 2.

• The algebraic equation B/2 - 1/2 = A, is similar in structure to the assignment statement, x/2 - 1/2 → x. But their meanings are different. An assignment changes the value of a variable, and an equation says that the values of two expressions are the same.

 

3. Working backwards.

Because we know how to compute the previous value, B, of variable x, from its next value A, we can describe the whole process backwards, starting from x = 0, and computing its previous value by 2x + 1 → x.

 

Comment 3.

• The last part should be read. " and computing its previous value by assigning 2*x + 1 to x."

• One example: if the value of x were 11, the previous value would be 2*11 + 1 = 23.

 

4. Computation and testing.

Steps counted backward:      Value of x:       
  0 (at the end)
1 2*0 + 1 = 1 (before last step)
2 2*1 + 1 = 3 (before second step from the end)
3 2*3 + 1 = 7 (before 3rd step from the end)

Answer to the problem: Chris started with 7 eggs.

 

Steps forward:      What happened:      Value of x (no. of eggs left):
    7
1 3 1/2 + 1/2 = 4;    Gave 4 eggs to Maria. 3
2 1 1/2 + 1/2 = 2;    Gave 2 eggs to Ai-Ling. 1
3 1/2 + 1/2 = 1;    Gave 1 egg to Jermaine. 0

 

4. Comment.

An experienced problem-solver would mentally go through all four steps of the solution (as numbered above) in a few minutes and would provide the answer without writing anything down. But such a skill comes with experience and a thorough understanding of the method that has been employed.

 

Egg dilemma (Part 2)

 

A generalization from 3 buyers to n buyers.

 

Comment.

Notice that in the first three steps of our solution, we did not use the fact that the number of steps (the number of changes in the values of x) was n = 3. So the first thing we need to change is the method of computing the values of x (backwards from x=0).

 

5. A calculator program for computing x backwards.

We use the TI-34 II calculator. The values of x will be shown on the display. In this calculator, this value is also stored in the variable called Ans ("current answer").

 

Define

OP1=2Ans+1 (so OP1 contains B, which equals 2A+1)

(Blacken the = sign in order to see only the answer and not the operation.)

 

OP1 is now an assignment, 2*Ans + 1 → Ans. On the display you will see the current value of the variable Ans, and also (on the left) the number of times n that the operation was performed.

 

To run this program press,

0     ENTER

and repeat,

OP1

recording the displayed values. You will see

1

3

7

15

31

63

127

...

 

Comment 5.

• In most problems, if you can perform an arithmetic computation mentally, do it. But if you need to switch to written computations, it is usually better to use a calculator, because it is more reliable and faster.

• This computation could also be done on the TI-108 by the following program:

0 =

repeat, *2+1=

And on the TI-83 Plus by,

0     ENTER

2Ans + 1

repeat, ENTER

But neither calculator displays n. (You may display both x and n on the TI-83, but the program that does it is much more complex.)

 


6. Results of the computation. (n = number of changes in the value of x)

       n:        x:
    0
  1 1
  2 3
  3 7
  4 15
  5 31
  6 63
  7 127
  8 255
  9 511
  10 1023

 

This table gives the initial number of eggs Chris needs in order to deal with up to n =10 buyers.

 

Comment 6.

We do not need a calculator to see how much each buyer gets. Because x/2 + 1/2 = (x + 1)/2, we only need to divide an even number by 2, which can be done mentally, even for quite large numbers. For example, when x = 511, the buyer gets (511 + 1)/2 = 256 eggs.

 

7. Guessing a formula that relates n and x.

If we look carefully at the table above, we may notice that not only are all values of x odd, but that also each one of them is a power of 2, minus 1.

0 = 20 - 1, 1 = 21 - 1, 3 = 22 - 1, 7 = 23 - 1, … .

Now the relationship between n and x can be guessed: x = 2n - 1.

 

We can get a better understanding of what is going on, if we extend our table to show how many eggs each buyer gets.

       n:        x:        buyer gets:
    0  
  1 1 1
  2 3 2
  3 7 4
  4 15 8
  5 31 16
  6 63 32
  7 127 64
  8 255 128
  9 511 256
  10 1023 512

 

We see that the last column consists of consecutive powers of 2. By the sum of a geometric progression, we know that 1 + 2 + 22 + … + 2(n-1) = 2n - 1.

(To see this, multiply 1 + 2 + 22 + … + 2(n-1) by (2 - 1), and simplify.)

And because Chris sells all her eggs, therefore what she has now is the sum of what her buyers will eventually get.

 

Comment 7.

There is no general method for guessing a formula that fits some given data. Even if the formula is very simple, finding it may be prohibitively complex (although there are some powerful methods that work in special cases, which will be discussed later).

But if you have seen a pattern before several times, you may recognize it at a glance. And this is what happens here.

Students should know at least something about the difference between a plausible hypothesis confirmed by many examples with no exceptions, and a theorem. There are known cases of formulas which hold in trillions of cases, but which are still false for some rare examples. (Actually, the hypothesis formed here can be proven rather easily with the right techniques.)

But this doesn't mean that presenting proofs is always desirable. Proofs use many specialized techniques, and they are often based on assumptions that students (and other non-specialist) do not know. Attempting to present a proof in such a situation may lead to explaining a plausible hypothesis in terms of incomprehensible assumptions, by means of obscure reasoning that doesn't sound convincing at all.


Webpage Maintained by Owen Ramsey
Lesson Index