Tuesday, 4 December 2012

Last Post!

04/12/12  I think I actually did end up posting every other week.  Oh well.  On assignment 3:  I ended up having to rush through it in order to have enough time to write an essay due the following Monday and do the 207 assignment due the Sunday.  The first assignment question had me stumped for a while, so I had to go back and read more about DFSAs to figure it out.  I guess the exam is next week, but I think it should go over well.

    Now, for the problem solving bit.  I ended up trying the "negative coconuts" problem.  I started it right after making my last post, gave it about an hour, and well... forgot about it until recently.  My first strategy was to let the original pile of coconuts be a number x, then step through the event after each man wakes up.  After each man, x has 1/5 removed and an extra 1 removed for the monkey.
    I decided to scrap that plan after getting to about the 3rd man, since all the substitution was going to create a giant mess.  My next attempt at the problem involved a similar plan of starting with x as the number of coconuts each man receives in the morning, then working backwards.  Again, that was going to create a big, slightly more complicated mess.
   Looking over the problem, there are some simple facts:  The monkey received 5 coconuts before the morning, since each man gave him 1.  The number of coconuts in the pile as a man wakes up always has a remainder of 1 when divided by 5.  The number of coconuts after the last man wakes up is divisible by 5.
    So, I then wrote out the amount of coconuts after each man wakes up like so:
man 1(x2) : x - x/5 - 1
man 2(x3) : x2 -x2/5 - 1
And so forth, until x6 is also equal to 5y, where y is the amount each man gets in the morning.
    I attempted to work backwards again, stating that each step is 4/5 the previous one.  I ended up with x = (5^5)/(4^5)y.
    Since the original question doesn't actually provide any numbers besides that there are > 5 coconuts (since the monkey gets 5), the initial amount will depend on the amount each man gets in the end.

     Now, I sort of assumed that the subtraction of 1 coconut after each man would sort itself out to make my life easier.

After looking up the answer:  I was close.  The provided answer did each step opposite the way I did, and  it worked out better.  The solution also discussed the idea of starting with negative coconuts (as hinted by the title), which I figured was probably a solution, but dismissed since I think it's not really a "fair" way out if having a negative number of coconuts is impossible.  The answer is dependent on what you say each man got in the end, but it doesn't quite work out to what I got.  But at least I tried, right?