Somewhat technical answer:
Here is solution that works for any number of pirates and any number of pirates needed to open to chest.
Let T be the total number of pirates. Let N be the number of pirates required to open the chest.
The number of locks needed would be L = (T,N-1) = (T!)/[(N-1)! * (T-N-1)!]. The number of keys each pirate would have be K = (T-1,N-1) = (T-1)!/[(N-1)! * (T-N)!].
For this specific problem, the number of locks would be 1716 and the number of keys per pirate would be 924.
I know I haven't provided an explanation of why and how this system works. We'll leave that lengthy, involved explanation to the author.
Note: the notation (x,y) is the combination notation; I can't use the conventional combination notation in plain text. (x,y) basically asks the question "how many ways can you pick y objects from a group of x objects?" (x,y) = (x!)/[y! * (x-y)!]
Another easy way:
Here's a less elegant solution. How many different combinations of 6 pirates are there? 13 choose 6 is: 13!/6!7! That's a hell of a lot of locks. But you could say, put that many locks on the chest. And for each lock, you distribute keys to all the pirates EXCEPT the selection of 6 corresponding to that lock. Then any selection of 7 pirates is guaranteed to be open all the locks. For consider the first 6 of them. There will be exactly ONE lock that those six are unable, between the 6 of them, to open. But the seventh pirate will be able to open that lock. Because keys to that lock went out to everybody except those 6.
Also, any selection of 6 pirates is guaranteed to encounter exactly one lock that they are unable to open. (So any selection of fewer than 6 is guaranteed to encounter 1 or more locks they are unable to open...)
So that will do the trick, and the explanation of why it would do the trick is elegant. But I don't feel that it's an elegant solution, because of there being so many locks... Anyone have something better?
1 comment:
You can email me if you need help in getting pirate proxy to work.
Post a Comment