One night, there was a sudden storm blowing over the Everfree Forest, which resulted in several of the ducks living at Fluttershy's cottage to misplace their ducklings: using the word 'lost' would imply they'd never get found again. And as brave as Fluttershy was (which is to say generally never), there was still a limit to her tracking skills. As it turned out though, she happened to see an advert in Equestria Daily yesterday for an animal rescuer from the Minotaur Lands, and decides that she's got nothing to lose apart from a service fee for trying.
As it turns out, the rescuer was a rather old but surprisingly buff guy, who looked as though he'd picked a fight with about seven hydras all at once and lost. Despite the fact that he only had one good eye and was apparently deaf in the left ear, assured Fluttershy that he can track and retrieve all sixty-three ducklings that went missing. With the job clarified, the rescuer went on to discuss the matter of payment.
Unfortunately, all of Fluttershy's spare bits was allocated to looking after the rest of her animal critters, and so she was left with no choice but to pay in collateral. As it happened, she had a gold chain necklace made up of (by a frankly contrived coincidence) sixty-three links. She decided to part with that, but owing to the disproportionate value of the chain, Fluttershy refused to pay up front. The animal rescuer, however, suspicious of Princess Celestia's foreign policy and of ponies in general, wouldn't take a payment afterwards in the event of Fluttershy reneging on the deal.
Fortunately, as any good friend can tell you, a compromise solves everything. They agree that Fluttershy will pay the rescuer one link for every successful rescue, protecting both from foul play. Unfortunately, it IS a rather pretty necklace and the minotaur doesn't want it ruined beyond repair, so he demands Fluttershy make no more than three breaks in the chain.
Completely stymied, Fluttershy now needs you to sort out this problem. And maybe learn some sort of lesson in friendship if it turns out there is one.
Hmm. I'm sure I've heard this one before, but damned if I can remember the solution.
Its a straight line of links right? If so i think i got it
cut the 5th, 9th and 17th rings
You now have 1,1,1,4,8,16,and 32 rings in groups
Pay 1 the first time
Pay another 1 the 2nd and 3rd time
Pay the 4 and get back the 3 single rings when the fourth animal is found
So on and so forth
Simple binary, more or less
Ah, I remember this one back from school. Only there were six links. O-o-oka-a-ay...
For the first animal Fluttershy pays one link. For the second one she pays a two-link and gets one link in return. For the third one she pays that one link...
N - 1 breaks allowed give us:
1 +...+ n = (n^2 + n) / 2 >= 63;
N(n+1) >= 126;
N = 11; 12;
She'd need to break the chain into one link, two-link, three-link etc. all the way to 11-link -- which would be 10 breaks... Yeah, we need to take a different approach.
Were she allowed to break into six parts, she'd break it as follows: one link, two-link, 4-link, 8-link, 16-link and 32-link. When in binary, it'll look like 1 link, 10-link, 100-link, 1000-link, 10000-link and 100000-link, and, using those, she'd be able to count in binary up to 63 (111111b). For six binary digits -- five breaks.
What would happen, if she used the 4-based system instead? 63 (10) = 333 (4), so: 3-link, 12-link and 48-link. Total -- two breaks. Now let us add just on more break to split that 3-link into 1 link and 2-link -- and voilĂ !
FS pays 3 links for 3 animals as described above... and gets into a stalemate: she can't pay for the fourth! The solution is to be tweaked.
63 (10) = 2100 (3) = 333 (4) = 223 (5) = 143 (6) = 120 (7) = 77 (8) = 70 (9)...
Upon considering the above representations of 63, I, after a very long time, have decided, the solution should be as follows:
Fluttershy splits the chain as stated above, into 3, 12 and 48, and also defines three stahes each part could go through: t first stage takes the third of the part, th second one takes two thirds, and the third o takes whole. 1-st animal = 3-link 1-st stage = 1 link; 2-nd animal = 3-link 2-nd stage = 2 links; 3-rd animal = 3-link 3-rd stage = 3 links.
As shown, this allows for a part to represent digits from 1 to 3 (incl.). Now consider this: 3 (10) = 3 (4), 12 (10) = 30 (4), and 48 (10) = 300 (4). That "3" in the numbers, as we've seen, may become "1" or "2", depending on the stage a chain's part goes through. Therefore such a system allows to represent natural numbers from 1 to 63 in the 4-based numerical system!
This had better be a solution! Have you any idea, how much time I spent on this?!