Friday, 5 April 2013

Penny piles

Noticed the mail from professor about problem solving.
I'm not sure whether I've posted some of my thoughts about problems with
mathematical or programming nature, but to make sure with that I thought I should
make another post.  Hope I can submit this post in time...

Penny Piles:

I'll skip the detailed explanation of the problem due to the time (copy of the pdf is linked to the mail
by professor), but core aspect of this problem is to produce a number between 0 and 64 in
either of two piles of pennies, starting from 64 on one and 0 on another, by only halving the even number of the pile.

Since the total number of pennies would not change from 64, and there are only two possible piles,
we know that the sum of the two pile would be 64.  Due to this nature, our work can be halved as we
notice that by proving how to make a pile from 0 to 32 it would also prove that of 33 to 64.
We can say a same thing for numbers from 0 to 32, meaning, as we prove how to make number from 0 to 16, it would also prove that of 17 to 32.  Same goes for 0 to 16, 0 to 8, 0 to 4, 2 and then 1.

This assumption can be confirmed by starting the pile from any number that we wish to produce, and then sum the pennies into a single 64 pile.  Evens are easy to produce since doubling their number would also be even, and thus the operation can be proceeded for either doubling or halving the pile to make further changes.  As for odds, their doubles would also be an even number, and thus that same of the even can be said.  As long as the pile is in the even number, the procedure to halve either pile can be continued, and saying that all odds can be formed by halving the even, indicates that any number of pile of pennies can be produces in this problem.

The problem shares the nature of digitals and binary element.  As even and odd can be translated into 0 and 1 to the end, the fact that binary is able to produce any number also proves that this problem can make any number.

1 min left.  I must post this.
Hope I've explained enough so that I would make sense.
Pity that I can't add tree image to show halving processes and stuff.
Well, thanks for the term, and hope I'll see CSC next year!

No comments:

Post a Comment