” Four sailors are shipwrecked on a deserted island - deserted, that is, save a
ID: 3732976 • Letter: #
Question
” Four sailors are shipwrecked on a deserted island - deserted, that is, save a single monkey named Heisenberg who hangs about in the trees near the grove. The sailors gather together all of the coconuts on the island into one big pile and leave them in the grove. There are more than 2018 coconuts! The first sailor awakens at midnight. She doesn’t trust the other three and divides the pile of coconuts into quarters and finds that there is one coconut left over. She throws that one to Heisenberg, takes her pile (her fair share) and hides it away, pushes the remaining three piles into one big one and goes back to bed. An hour later, another sailor arises from his slumbers and approaches the pile, divides it into quarters, finds there is one left over which he tosses to the happy monkey, takes his one pile and hides it and pushes the remainder back into one pile. An hour later, the third sailor does the same (Again finding there is one left over which she gives to Heisenberg) and hides away her share... and the last sailor too divides the pile into fourths - with an extra for Heisenberg. What’s the smallest possible total number of initial coconuts on the island (ie, before midnight) if all that is known is that it was larger than 2018? Find, with justification, a formula for all possible initial totals.
Please note that the answer should be over 2018, and should be using back substitution. Please be as specific as possible, thank you!
Explanation / Answer
Answer.)
Using backward substitution method :
Let the sailors be named as A,B,C,D.
Let the final number of coconuts after each sailors removing be N.
So, before D's removal of share, total number of coconuts left were :
N+(N/3)+1 [** N/3 being D's share and 1 for Heisenburg ]
=(4N+3)/3.
Similarly, before C's removal of share, total number of coconuts left were :
(4N-3)/3 + (4N-3)/9 + 1 [** (4N-3)/9 being C's share and 1 for Heisenburg ]
= (16N+21)/9.
Similarly, before B's removal of share, total number of coconuts left were :
(16N+21)/9.+ (16N+21)/27. + 1 [** (16N+21)/27 being B's share and 1 for Heisenburg ]
= (64N+121)/27.
Similarly, before A's removal of share, total number of coconuts left were : [**This is the total coconuts in the island]
(64N+121)/27.+ (64N+121)/81. + 1 [** (64N+121)/81 being A's share and 1 for Heisenburg ]
= (256N+565)/81.
So, we get the total number of Coconuts in the island in terms of N.
Now, this (256N+565)/81 > 2018
So, to come to a solution to find the total number of coconuts in the island, which is also greater that 2018, we can check it manually, but in this case, I have used Java programming using for loops to get the value.
Code :
public class GetValue{
public static void main(String []args){
int i=2021;
int k=-1;
while(k==-1){
if((i-1)%4==0){
if((((i*81)-565)%256)==0){
System.out.println(i);
k=1;
break;
}
}
i++;
}
}
}
Output :
Hence, we get the total number of Cocnuts in the island as 2213.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.