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!

Final Day

Final day at last!

But I must admit that I've been updating this SLOG only occasionally, and it got sloppier as the term approached to the end.  The assignment was quite time consuming than i originally thought, and as I compared the importance of this to other assignments that had to be done sooner, I tend to lose my motive to work on this.  Yet, this gave me with good opportunity to reflect and think about the course material, and for that I appreciate what this assignment deepened my knowledge in both quality and quantity.

DrRachet programs till today were easy to follow.   I found the commands related to the list functions, such as depth and flatten commands, were particularly difficult than other commands though.  Especially as I got to confirm this knowledge in tutorial today, I'm not confident with my answers.
As for computing history and mechanics, the establishment of internet and long range networks were particularly interesting since I use the product of it everyday and yet I didn't know such history of it.  

Wikipedia project was the most time consuming and also the most entertaining assignment that I've had so far.  I was happy to use my Japanese language to edit the details of the article, and getting to know how I'm able to edit the articles that might be seen a lot in a future gave me confidence with my work's power of publicity.

The course have been very entertaining and full of useful knowledge.  In fact I'm considering of taking advanced course for next year.  Let's see how the schedule turns out...