You are sitting in front of two drawers. The left drawer contains 64 pennies, the right drawer contains nothing. Can you arrange things so that one of the drawers has 48 pennies, using the following two operations:
- L If the left pile has an even number of pennies, transfer half of them to the right pile. If the left pile has an odd number of pennies, operation L is disallowed.
- R If the right pile has an even number of pennies, transfer half of them to the left pile. If the right pile has an odd number of pennies, operation R is disallowed.
Understanding the Problem
- in this problem, we are trying to see if we can rearrange the drawers so that we can obtain 48 pennies in one drawer, and ultimately try to obtain any number of pennies in the range of [0,64].
- we are able to manipulate our condition by shifting pennies from drawers only if an even amount is present. This will allow us to try to obtain any number in this range. For example: If there are 20 pennies in the right drawer, we are able to transfer half of these pennies to the left draw so that 10 is remaining in the right. But, if 21 pennies are present in the right drawer, we cannot move any amount of pennies at all.
Devising a Plan
- since our desired amount of coins is any number in the range [0, 64] and 48 specifically, we can define the amount of pennies in both drawers as (x,y) where x is the number of pennies in the left drawer and y is the number of pennies in the right drawer, whose sum is equal to 64.
- we will continually add and remove pennies from each drawer using the restrictions of L and R defined in the problem to show that both x and y can be any number from [0, 64]
Carrying out the Plan
- After carrying out the operations, the following is the results of all the possible combination that can be obtained in each successive step.
Step 1: L:64, R:0
Step 2: L:32, R:32
Step 3: L:16, R:48 / L:48, R: 16
Step 4: L: 8, R: 56 / L: 40, R:24 / L:24, R:40 / L:56, R:8
Step 5: L: 4, R: 60 / L 36, R 28 / L20, R44 / L52, R12 / L12, R52 / L44, R20 / L28, R36 / L60, R4
Step 6: L: 2, R: 62 / L34, R30 / L18, R46/ L50, R14 / L10, R54 / L42, R22 / L26, R38 / L58, R6 / L6, R58 / L38, R26 / L22, R42 / L54, R10 / L14, R50 / L46, R18 / L30, R34 / L62, R2
Step 7: L: 1, R: 63 / L33, R31 / L17, R47 / L49, R15 / L9, R55 / L 41, R23 / L25, R39 / L57, R7 / L5, R59 / L37, R27 / L21, R43 / L53, R11 / L13, R51 / L45, R19 / L29, R35 / L61, R3 / L3, R61 / L35, R29 / L19, R45 / L51, R13 / L11, R53 / L43, R21 / L27, R37 / L59, R5 / L7, R57 / L39, R25 / L23, R41 / L55, R9 / L15, R49 / L47, R17 / L31, R33 / L63, R1
- As shown through this data, we have been able to obtain 48 pennies in a drawer by the third step. Furthermore, we have been able to show that all the numbers in the range [0, 64] can be obtained in as little as seven steps of initally starting. However, it is impossible to transfer 64 pennies from one drawer to the other because this would break our conditions. We wouldn't be able to transfer the last penny present in (L63, R1) or (L1, R63). Therefore as a possible restriction we can say that if a drawer has either 64 or 0 pennies, then the second drawer is unable to obtain that amount of pennies.
- if we were to start with a different amount of pennies, we would still be able to obtain any number in this range as long as the initial amount of pennies is an even number that corresponds to 2^x, where x is any number. For example if the initial amount of pennies in one drawer is 128 or 2^7, we would be able to obtain any number in the range of [0, 128]. But, if the initial amount of pennies in one drawer is 110 for example, when divided in half, this would give two odd numbers 55 and 55. This would not allow us to obtain our any number in the range because they are both odd.
Looking Back
- I feel the results shown are accurate and correctly solves the problem. Solving the problem another way may not be possible, but nothing is impossible.