Register to reply

Pirates Dividing Loot Question- NEW

by BR24
Tags: dividing, loot, pirates
Share this thread:
BR24
#1
Oct17-08, 10:48 PM
P: 23
This is a long question so bear with me.

Four pirates find a treasure consisting of gold coins on a tiny island. They gather all the coins in a pile under a palm tree. Exhausted, they agree to wait until morning to split the coins.

At 1 in the morning, the 1st pirate wakes. He realizes the others cant be trusted, and decides to take his share now. He divides the coins into four equal piles, but there is one left over. He throws the extra one in the ocean, hides his coins, and put the rest back undr the palm tree.

At 2, Pirate 2 wakes up. Not realizing pirate 1 has already taken his share, he also divides up the remaining coins into 4 piles, with 1 left over. He throws the extra one in the ocean, hides his share and pus the rest of the coins back under the tree.

At 3 and 4 in the morning, the third and fourth pirates each wake up and carrry out the same actions.

In the morning, the pirates wake up, trying to look innocent. Noone says anything about the diminished coin pile. They divide the remaining pile into four piles for the fifth time, but this time there is no coin left over to throw in the ocean.

Find the smallest number of coins in the original pile.

I cant get this, my math teacher gave it to us. If you find the answer let me know, but if you have a method to this besides guess and check i'd like to know how.
Phys.Org News Partner Science news on Phys.org
Scientists develop 'electronic nose' for rapid detection of C. diff infection
Why plants in the office make us more productive
Tesla Motors dealing as states play factory poker
Phrak
#2
Oct18-08, 12:59 AM
P: 4,512
This was more tedious than it sounded.

I get an equation that says

[tex] T = \frac{4}{3} \left( \frac{4}{3} \left[ \frac{4}{3} \left( 16P+1 \right) +1 \right] +1 \right) +1 [/tex]

T = total coins. P = how much each pirate gets at the division in the morning.

Expanding, and barring errors.

[tex]27T = 1024P + 148 +27[/tex]

At a guess, the answer might be the smallest positive P such that T is an integer.

Edit: This seems to work, oddly enough.
BR24
#3
Oct18-08, 09:13 AM
P: 23
Thanks alot man, just to make sure i worked it out right, did you get 765

Phrak
#4
Oct18-08, 12:11 PM
P: 4,512
Pirates Dividing Loot Question- NEW

Quote Quote by BR24 View Post
Thanks alot man, just to make sure i worked it out right, did you get 765
yes. In the last step I needed to find integer solutions for 27A = 1024B - 14. Is there an easier way to do this than making 27(?) tests?
BR24
#5
Oct18-08, 12:54 PM
P: 23
i dont know if there is an easier way, i'd like to know too. i used the equation you gave me
27t=1024p+175, started from zero and increased p which finally gave me a whole number when i got to 20.
CEL
#6
Oct22-08, 12:06 PM
P: 639
Quote Quote by Phrak View Post
yes. In the last step I needed to find integer solutions for 27A = 1024B - 14. Is there an easier way to do this than making 27(?) tests?
Yes, this is a Diophantine equation. See http://en.wikipedia.org/wiki/Diophantine_equation for an explanation.
You have
A = 1024B/27 - 14/27 = 37B + (25B - 14)/27
Since A and B are integers, (25B - 14)/27 must be an integer too.
(25B - 14)/27 = C
25B - 14 = 27C
25B = 27C + 14
B = 27C/25 - 14/25 = C + (2C + 14)/25
Now, you make
2C + 14 = 25D
2C = 25D - 14
C = 12D + D/2 - 7
D/2 must be an integer
D/2 = 1 is the minimum integer
Now you have D = 2
Working backwards I got A = 758 and not 765. This is not the right answer, because 758/4 gives a remainder of 2, not 1.

Working with the equation
27T = 1024P + 175
I got the good answer: T = 765.
Phrak
#7
Oct25-08, 02:29 AM
P: 4,512
Quote Quote by CEL View Post
Yes, this is a Diophantine equation. See http://en.wikipedia.org/wiki/Diophantine_equation for an explanation.
You have...
Thanks much, CEL. I'll have to look it over when I don't have toothpicks holding up my eyelids.
Phrak
#8
Oct25-08, 04:21 PM
P: 4,512
Quote Quote by CEL View Post
Working backwards I got A = 758 and not 765. This is not the right answer, because 758/4 gives a remainder of 2, not 1.
No, that wasn't it. I defined A = t - (175 mod 27) + 1 to simplify calculator punching, or so I'd thought, thus the difference of 7.

Cool algorithm, by the way;

For

[tex] \Phi_1 A = \Phi_2 B + \Gamma [/tex]

each step in the algorithm takes

[tex] \Phi_{large}, \Phi_{small} [/tex]

to

[tex] Rem(\Phi_{large} / \Phi_{small} ), \Phi_{small} [/tex]

in alternating fashion.


Register to reply

Related Discussions
Dividing by 0 General Math 23
Dividing by 1 is impossible General Discussion 21
Dividing Functions General Math 3
Dividing by zero General Math 6
Dividing 0 by 0 General Discussion 6