Problem: https://wwwcgi.cdf.toronto.edu/~heap/cgi-bin/Solvent/wiki.pl?Problem_Solving_Home_Page/PennyPiles
Understanding:
We are first asked if it is possible to use the given operations to achieve a result so that one of the drawers has 48 pennies. We are constrained in that the two operations transfer half the pennies from L to R or R to L respectively, but only if there are an even number of pennies in the drawer on which we wish to operate. Since we start with no pennies in the right drawer and 64 in the left, we can do this in two operations:
L -- move half the pennies, that is 64/2 = 32 to the right drawer. Now the left drawer has 32 pennies in it, as does the right drawer.
L -- move half the pennies from the left drawer to the right drawer. That is, move 32/2=16 pennies from the left drawer, adding them to the 32 already in the right drawer, yielding 48 pennies in the right drawer.
The second part of the problem is to try to find a sequence of operations so that one of the drawers has other numbers in the range [0,64].
It is possible to produce one number in the range [0,64]. We just did that with 48 pennies. A second example would be that six left moves leaves one penny in the left drawer and 63 in the other. Along the way to (1,63) we also produce (32,32), (16,48), (8,56), (4,60), and (2,62). So it is indeed possible to produce other numbers in the range [0,64] in one of the drawers.
Though the problem as stated does not ask the question, it is interesting to see if it is possible to produce ALL numbers in the range [0,64] in one of the drawers. That may be possible if we add an additional operation. We just showed how to produce (1,63). Unfortunately, at that point, there is no way to produce any other number of pennies in either drawer, since both drawers now have an odd number of pennies. There needs to be at least one additional operation:
DR - at any point, you can dump all the pennies from the right drawer into the left drawer.
It is also useful to add a fourth rule:
DL - at any point, you can dump all the pennies from the left drawer into the right drawer.
The addition of these two rules will mean that it is possible to produce any number of pennies in the range [0,64] in either the left drawer or the right drawer.
The problem also asks about other starting numbers. Well, first off, an odd number won't do, since you can't make any move (other than 1/2 of 0!). So the starting numbers have to be even. But not just any even numbers. For example, try 30. You can do one move: 15 from one drawer to the other. Then you stop. In fact, this will eventually happen for all even numbers, except powers of 2. In fact, I believe that for any power of two, you can use the operations to produce any number from 0 to 2^k in both drawers (though not at the same time)
Tuesday, September 23, 2008
Subscribe to:
Post Comments (Atom)

1 comment:
Okay, if I understand DR and DL correctly, they reset the problem to one of two initial positions. How do you show that you can now reach any number in the range [0,64] in either drawer? What about extending the problem to 128 pennies?
Post a Comment