How to Solve Problems (George Polya):
- Understand the Problem
- Plan a Solution
- Carry Out Your Plan
- Review Your Solution
Understand the Problem
The first step into problem solving is to understand what the problem is and all the information that they provide you with. The question states that there are 2 drawers, a left and right one. The left one initially starts off with 64 pennies whereas the right drawer starts off with 0. This is the setup for the question.
Now there are roles associated with transferring pennies:
I: If the left drawer has an even number of pennies, you may transfer half of them to the right drawer. If the left drawer has an odd number of pennies, operation I is disallowed.
r: If the right drawer has an even number of pennies, you may transfer half of them to the left drawer. If the right drawer has an odd number of pennies, operation r is disallowed.
In short, while a drawer has an even number of pennies, you may transfer half of them to the other drawer.
Plan a Solution
Because of the constraint that only when an “even number” of pennies exists in the left (right) drawer, you may transfer half to the right (left) drawer. Therefore once one of the drawers has an odd number, then both the operations are disallowed and therefore the remaining pennies are left alone. As a result, when trying to get to a odd number in one of the drawers, you must do so in such a way so that it is the last shift. This is crucial to the understanding of the question.
Because of the property mentioned above, we can think of the question as “if we have an odd number, can we reach it by dividing a number in two?”. When working backwards, we are able to do the reverse of the operation which is multiply one side by two, and subtract the amount from the other.
[Original Operation: L = x/2, R = y + (x/2)]
[Backwards Operation: L = x*2, R = y – (x*2)]
One way of determining whether or not a desired number can be reached is to create a full tree diagram illustrating every possible path and checking if every number from 0-64 appears in at least one branch (though this is very tedious).
Carry Out Your Plan
Using the backwards operation is very useful since we just have to check if the multiplication of two results in a number x between 0 < x < 64. If not, perform the operation on the other end. This seems like a solid technique for finding numbers.
Example: Say we wish to find the number 15. Lets start from the bottom. Assume we have L = 15, R = 49. Since multiplying the right results in a number x > 64, multiply the L*2 and subtract it from the right. Now we have L = 30, R = 49 – 15 = 34. Since multiplying the right once again gives us a number greater than 64, perform I again. L = 60, R = 4. Now L*2 > 64, therefore perform r. L = 56, R = 8. Again perform r again and again. L = 48, R = 16 -> L = 32, R = 32, -> L = 64, R = 0. We found the chain! Therefore we can write a function that checks if the result of one side is greater than 64, and if so, perform the other operation. If we wish to return the actions (assuming the original operations), place the operations in backwards order.
If we make a tree diagram for all the possible values, we can see that it does indeed contain all the values from 0 – 64 combinations. Therefore it is possible to get any number of pennies from 0 – 64 in one of the drawers.
Review Your Solution
I think this is a very solid way of approaching the problem since the original direction was difficult to perform. By working backwards, a chain was able to form. This is all speculation and may not be entirely incorrect, but I have found no problems using it so far.
If you have any questions or flaws that you have found in the approach/hypothesis, leave a comment underneath!