13 Pirates

6
 wu :: forums « wu :: forums - 13 pirates » Hey, Saddist_riddler, you have 0 messages. Mar 21 st , 2007, 12:50pm RETURN TO RIDDLES Home Help Search Members Profile Notification Logout wu :: forums riddles hard (Moderators: william wu, Icarus, towr) 13 pirates « Previous topic | Next topic » Pages: 1 Reply Notify of replies Send Topic Print Author Topic: 13 pirates (Read 1677 times) klbarrus Newbie Posts: 29 Consider a small er problem, locks for 3 pirates. In this case you have: L1 = 1,2 L2 = 1,3 L3 = 2,3 where the numbers indicate which pirate can open the lock (so pirates 2 and 3 can open lock 3) . In this cas e, any 2 pirates can open all 3 locks. For 5 pirates, we nave L1 = 1,2,3 L2 = 1,2,4 L3 = 1,2,5 L4 = 2,3,4 L5 = 2,3,5 L6 = 3,4,5 L7 = 1,3,4 L8 = 1,3,5 L9 = 1,4,5 L10 = 2,4,5 And any 3 pirates can open all the locks and get the treasure. This boils down to a combination problem: how many ways to combine y items out of x. So the answer is 7 C 13 = 13!/(7!6!) = 1716 locks needed. 13 pirates « on: Jul 25 th , 2002, 9:59pm »  Quote Modify IP Logged Frothingslosh Guest Boy, this is another one that depends on how you understand the wording of the puzzle: The locksmith puts a specific number of locks on the safe such that every lock must be opened to open the safe. Then he distributes Re: 13 pirates « Reply #1 on: Jul 25 th , 2002, 10:31pm »  Quote Modify Page 1 of 5 3/22/2007 file://C:\DOCUME~1\HP_Owner\LOCALS~1\Temp\ONYG12B0.htm

Transcript of 13 Pirates

Page 1: 13 Pirates

7/30/2019 13 Pirates

http://slidepdf.com/reader/full/13-pirates 1/5

 

wu :: forums 

« wu :: forums - 13 pirates » 

Hey, Saddist_riddler, you have 0 messages.

Mar 21st, 2007, 12:50pm

RETURN TO RIDDLES  Home  Help  Search  Members  Profile  Notification 

Logout

wu :: forums

riddles

hard (Moderators: william wu, Icarus, towr) 

13 pirates « Previous topic | Next topic »

Pages: 1  Reply  Notify of replies  Send Topic  Print 

Author Topic: 13 pirates (Read 1677 times)

klbarrus Newbie

Posts: 29

Consider a smaller problem, locks for 3 pirates. In this case youhave:

L1 = 1,2L2 = 1,3

L3 = 2,3

where the numbers indicate which pirate can open the lock (so

pirates 2 and 3 can open lock 3). In this case, any 2 pirates canopen all 3 locks.

For 5 pirates, we nave

L1 = 1,2,3 L2 = 1,2,4 L3 = 1,2,5 L4 = 2,3,4L5 = 2,3,5 L6 = 3,4,5 L7 = 1,3,4 L8 = 1,3,5

L9 = 1,4,5 L10 = 2,4,5

And any 3 pirates can open all the locks and get the treasure.

This boils down to a combination problem: how many ways tocombine y items out of x.

So the answer is 7 C 13 = 13!/(7!6!) = 1716 locks needed.

13 pirates « on: Jul 25th, 2002, 9:59pm »  Quote  Modify 

IP Logged

Frothingslosh 

Guest

Boy, this is another one that depends on how you understand the

wording of the puzzle:

The locksmith puts a specific number of locks on the safe suchthat every lock must be opened to open the safe. Then hedistributes

Re: 13 pirates « Reply #1 on: Jul 25th, 2002, 10:31pm »  Quote  Modify 

Page 1 of 5

3/22/2007file://C:\DOCUME~1\HP_Owner\LOCALS~1\Temp\ONYG12B0.htm

Page 2: 13 Pirates

7/30/2019 13 Pirates

http://slidepdf.com/reader/full/13-pirates 2/5

keys to the pirates such that every pirate has some but not all of thekeys. Any given lock can have multiple keys but any given key can

only open one lock.

If the locks are padlock types that can be removed from the safethen you might be on to the answer, although it seems like thereshould be something simpler. However, I understood the locksmithmount locks onto the safe, like keyholes in the door. I further took

the "any given key can only open one lock" as meaning the key was

captive in the lock when it activated it and could only be removed

whenthat lock was in the locked position (so it couldn't be used to openmultiple locks). With this take on the problem I can solve it withseven locks - and they can all be keyed alike! Each pirate gets one

key, seven are needed to open the safe.

Looks like my locksmith is a more skilled craftsman than yours.

Of course, it doesn't seem to belong in the hard group then, but itis

the last one in the group, and maybe the expectation that it is hard

is what makes it hard.

IP Logged

klbarrus 

Newbie

Posts: 29

Admirable, but I think you are stretching it with your assumption

Any key can open one lock - I took this to mean exactly that, each

key only fits one lock and no other lock. Like the door of myapartment, my key opens it and not the other doors in my building.

Plus, I can't envision a locking mechanism that opens as youdescribe. Imagine a door with 13 key holes, of which opening any

7 will open the door?? What about the other 6 that remainlocked??

I can however imagine 10 locks (take my 5 pirate simplerproblem), each with unique key. The locksmith makes 3 copies of each key and distributes them as described. All 10 locks can beopened by any combination of 3 pirates. I can imagine the chest

and/or door opening when all the locks are opened!

And thus, 1716 locks needed for 7 of 13 to open, etc.

Re: 13 pirates « Reply #2 on: Jul 25th, 2002, 10:55pm »  Quote  Modify 

IP Logged

Frothingslosh 

Guest

Re: 13 pirates 

Page 2 of 5

3/22/2007file://C:\DOCUME~1\HP_Owner\LOCALS~1\Temp\ONYG12B0.htm

Page 3: 13 Pirates

7/30/2019 13 Pirates

http://slidepdf.com/reader/full/13-pirates 3/5

 

Plus, I can't envision a locking mechanism that opens as youdescribe. Imagine

a door with 13 key holes, of which opening any 7 will open thedoor?? What

about the other 6 that remain locked??

You missed my point - there are not 13 locks on the safe, just 7 keyholes, all keyed alike. A total of 7 locks. Each lockhas a dealbold that is withdrawn when the key is used, butthe key can't be taken out of the lock without returning

that deadbolt to the locked poition. All 7 locks are keyed alike(maybe not like the building you live in, but like the front andback door to my house, or like the doors and trunk on my car).Any 7 pirates can open the safe. one, two, or six cannot, even

thought their keys fit all the locks.

« Reply #3 on: Jul 25th, 2002, 11:29pm »  Quote  Modify 

IP Logged

klbarrus 

Newbie

Posts: 29

Ah... I see what you are saying.

I guess more info is needed to disambiguate the problem. I can'tbelieve the intent of the puzzle boils down to a trivial answer.

Heck, in the trivial case, any 1 pirate can just duplicate his key 6

times and make off with the loot!

Re: 13 pirates « Reply #4 on: Jul 26th, 2002, 12:29am »  Quote  Modify 

IP Logged

S. Owen 

Full Member

Gender:

Posts: 221

I think klbarrus's answer is right - maybe I can offer some moredetailed rationale. I'm not 100% sure there isn't an answer withfewer locks, but this sounds good.

Say there are n pirates. klbarrus proposes that the locksmith will

make (n+1)/2 keys for each lock. How do you distribute the keysto each lock? Well there are n C ((n+1)/2) ways to do that (i.e.

1716 = 13 C 7, for 13 pirates), so why not make that many locks(1716), and distribute the keys to each in a different way, that is,covering every possible one of the 1716 ways you can distributethem.

Now, the real questions are:1) Can any (n+1)/2 (7) pirates open all the locks? If so then clearly

any larger majority can also.2) Are all groups of (n-1)/2 (6) pirates unable to open the locks? If so then clearly any smaller minority is also unable to.

1 is easier to see - any given lock has (n+1)/2 (7) keys. By thepigeonhole principle, any group of (n+1)/2 (7) pirates must have

Re: 13 pirates « Reply #5 on: Jul 26th, 2002, 11:43am »  Quote  Modify 

Page 3 of 5

3/22/2007file://C:\DOCUME~1\HP_Owner\LOCALS~1\Temp\ONYG12B0.htm

Page 4: 13 Pirates

7/30/2019 13 Pirates

http://slidepdf.com/reader/full/13-pirates 4/5

one of them (e.g. if there are 7 keys distributed among 13 people,then any 7 must have at least one, since only 6 people don't haveone).

2 is somewhat harder. For any 6 pirates, there must exist somelock (exactly 1, in fact) whose keys were given to the other 7pirates. Remember that each lock's keys are distributed differently,and we have enough that every possible distribution is covered. So,any 6 will always be missing the key to 1 lock.

So 13 C 7 = 1716 definitely works... and elements of the solutionmake me think it is the best possible one, but I don't know how toshow that yet.

IP Logged

Alex Harris 

Guest

To see why this is optimal:

For any given subset of size 6 there must be some lock which

prevents that subset from opening the chest (i.e. no member of this subset has the key for the lock) otherwise that group of 6 couldopen the chest. If any lock prevents 2 different groups of size 6

from opening the chest, then it also prevents the union of these 2groups from opening the lock (none of them have the key). Thisunion must have size at least 7 since the groups are distinct and sothere is some quorum who is prevented by this lock. Contradiction.

So each lock can prevent at most 1 subset of size 6.

Thus you must have 1 lock per subset of size 6. More generally 1

lock per subset of size [number of pirates needed to open chest]-1.

Re: 13 pirates « Reply #6 on: Jul 26th, 2002, 11:37pm »  Quote  Modify 

IP Logged

cnmne 

Guest

Frothingslosh may have a really skilled locksmith, probably so goodthat after twelve pirates leave the 13th can get 6 copies of his key

made. Which is the other reason that klbarrus has the only real

answer.

If you could make keys that could not be duplicated, then theremight be a better answer. Maybe the keys just activate an eye

scanner

Re: 13 pirates « Reply #7 on: Jul 28th, 2002, 5:36pm »  Quote  Modify 

IP Logged

tim 

Junior Member

I thought both solutions were pretty trivial. Is there a way tointerpret the problem that would actually put it in the "hard"category?

Re: 13 pirates « Reply #8 on: Jul 30th, 2002, 7:53pm »  Quote  Modify 

Page 4 of 5

3/22/2007file://C:\DOCUME~1\HP_Owner\LOCALS~1\Temp\ONYG12B0.htm

Page 5: 13 Pirates

7/30/2019 13 Pirates

http://slidepdf.com/reader/full/13-pirates 5/5

 Powered by YaBB 1 Gold - SP 1.4!

Forum software copyright © 2000-2004 Yet another Bulletin Board 

Posts: 81 IP Logged

Pages: 1  Reply  Notify of replies  Send Topic  Print 

=> hard« Previous topic | Next topic »

Page 5 of 5

3/22/2007fil //C \DOCUME 1\HP O \LOCALS 1\T \ONYG12B0 h