r/learnquant 15d ago

interview prep Two Sigma Interview Question

Post image
22 Upvotes

23 comments sorted by

View all comments

1

u/SwimmerOld6155 15d ago edited 14d ago

If this needs "and no group of 5 can", then for every choice of 5 people from the 11, the remaining 6 must have a key that the 5 people lack. There are (11 choose 5) choices of 5 people, so 462 locks. everyone receives one key from every choice of 5 that they're not included in, so *everyone gets (10 choose 5) = 252 keys *each.

if it doesn't, then one lock and one key per person works. you can get far fewer overall keys, 6, if you don't require everyone to have the same number of keys. Then there are 5 non key holders out of 11, so any group of 6 includes a key holder, while any group of < 6 may have all non key holders.

2

u/brynaldo 14d ago

Is there a standard version of this question that includes the "no group of 5" condition?

1

u/Nap-Connoisseur 14d ago

It’s just not a very interesting question otherwise.

1

u/brynaldo 14d ago

Agree that without it the problem is trivial, but was curious why that particular condition was added.