12 Aug 2000 mettw   » (Journeyer)

The coconut problem

Yep, you all got it - it's too easy for people who know mathematics. bwtaylor's solution skipped a few dozen steps, so here's a more complete solution:

Each sailor gets n coconuts,

So before they split up the pile there were 5n+1 coconuts
Before the 5th sailor split up the pile there were (5/4)(5n+1)+1
Before 4Th sailor (5/4)((5/4)(5n+1)+1)+1
Before 3 (5/4)((5/4)((5/4)(5n+1)+1)+1)+1
Before 2 (5/4)((5/4)((5/4)((5/4)(5n+1)+1)+1)+1)+1
Before 1 (5/4)((5/4)((5/4)((5/4)((5/4)(5n+1)+1)+1)+1)+1)+1
which is the original number of coconuts, N.

N = (5n+1)(5/4)^5 + (5/4)^4 + (5/4)^3 + (5/4)^2 + (5/4) + 1
= 15n + 11 + (n+1)/4 + (n+1)/128 + (n+1)/1024

Since 4 and 128 are both multiples of 1024 we can simply say

n = 1024c-1, c = 1,2,...

N = 15625c - 4, c = 1,2,...

The seven bridges of Koenigsberg

This one is a classic from topology. In the Prussian city of Koenigsberg (Modern ???) there are two islands in the river with seven bridges thus:

        
     ---v--v-------v----
    /   |  |       |    \
   /  --^--^---  --^--   \
---   |       |  |   |    -------
      |       >--<   |
---   |       |  |   |    -------
   \  --v--v---  --v--   /
    \   |  |       |    /
     ---^--^-------^----

A popular passtime of the inhabitants was to try to cross every bridge only once. Prove that it can not be done.

Ha! The thirteen coin problem!

bwtaylor:
It's possible to do this with thirteen coins. Work that one out! 8)

Hmm... Well you'll be having trouble - It can't be done. I didn't count up how many coins were being measured in each go, obviously the scales are supposed to balance with each measure, but mine weren't. 12 is the maximum.

At most you can search for (((3^n)-1)/2)-((((3^n)-1)/2)%2) coins so that the scales will balance. Searching for ((3^n)-1)/2 coins will require an extra measuring to callibrate the scales if it is not divisible by two. The -1 is required to eliminate the zero permutation (where one coin is not measured) since it does not tell us whether the forgery is heavier or lighter

For those who are having trouble with 12 coins, the trick is to stop thinking like a programmer and start thinking like a mathematician. Trying to walk a tree in your head is going to lead you no-where.

rillian's frog

It would have to be induction with the frog being perpendicular to the field and, my intuition says, there should be some resitance to rotation. But don't flame me if I'm wrong - It's been five years since I did any physics.

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!