Thursday, April 4, 2013

Problem solving!


Penny piles problem:

Understand the Problem:

There are 2 drawers, left one with 64 pennies, and the right one without any:

The objective is to arrange the pennies so that one of them has 48 pennies, by following 2 steps:

L: 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 amount of pennies, this step is not computable.

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 amount of pennies, this step is not computable.


Way of solving the question:

Draw a tree diagram on a piece of paper:
Pro: easy to sketch, easy to follow
Con: Takes a lot of time, especially for smaller odd values.



Solution:
1.     L -----à This leaves us with 32 pennies in each drawer
2.     L -----à This leaves us with 16 pennies in the left drawer and 48 in the right drawer.

Now, the question proceeds to ask to choose a value between 0 and 64, the chosen value will be the target value (x) to leave in a drawer.

Let x be 20:
1.     L -----à This leaves us with 32 pennies in each drawer.
2.     L -----à This leaves us with 16 pennies in the left drawer and 48 in the right drawer.
3.     R -----à This leaves us with 40 pennies in the left drawer and 24 on the right drawer
4.     L -----à This leaves us with 20 in the left drawer and 24 on the right drawer

Took more steps, but still more simple
Let’s try giving x the value of 4
1.     L -----à This leaves us with 32 pennies in each drawer.
2.     L -----à This leaves us with 16 pennies in the left drawer and 48 in the right drawer.
3.     L -----à This leaves us with 8 pennies in the left drawer and 56 on the right drawer
4.     L -----à This leaves us with 4 in the left drawer and 60 on the right drawer

Q&A:

Q: Are there any numbers in the range [0,64] that are impossible to reach?
A: Yes, the following values are impossible to reach: 0, several odd values such as 61 and 3.

Q: What about starting with a different number of pennies on the left drawer?
A: For numbers smaller than 64, each number will yield less possible numbers, whilst using any odd number will automatically make the problem void. With numbers larger than 64, some numbers may yield more numbers, but other like 70, will yield less.




Am i doing this right?

1 comment: