Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Two-part problem; calculating possibilities of lock

  1. Dec 7, 2012 #1
    I am a woodworker, and am designing a two part magnetic/spring lock for my blanket chest. The first part has 3 master buttons (primary buttons A, B, C), and the second part has 11 secondary buttons (1, 2, 3, ....11). What you do first is choose 1 of the 3 master buttons that opens the first part of the lock. Then out of the secondary buttons, you choose 3 out of the 11 that will open the rest of the lock (and can be pressed in any particular order). So, not only do you have to choose the correct master button, but 3 secondary buttons as well. The master control that you choose stays depressed because of a lever, but each secondary button is spring-loaded so it pushes back out when you release it. The interior of the lock (the guts) is made up of springs, neodymium magnets, steel rods, and blocks of wood (Which really should not matter because it has nothing to do with the math problem). So essentially you are choose 1 out of 3 and 3 out of 11 at the same time. So my question is how do i figure out how many differentpossibilities are there in this lock? for example, A, 1, 2, 3 or C, 4, 9, 11.

    Is there an equation for this problem, or do I have to sit down and figure it out the long way?
  2. jcsd
  3. Dec 7, 2012 #2

    First of all, you choose the master button independently of the choice of the secondary buttons. So if N is the number of ways to choose the secondary buttons, then the total should be 3N.

    Now N is the number of ways to pick out 3 of the 11 buttons (and order doesn't matter). There is a specific formula for that exact thing. It is called a binomial coefficient and also goes by the name "11 choose 3" or under the subject heading of "combinations" in a basic probability book. The formula is
    (11!)/(3!)(8!) = 11*10*9/(3*2*1) = 165

    So the answer to your question is 3*165=495 (unless I multiplied wrong).

    See the wikipedia entry if you are interested in information on that formula.
  4. Dec 7, 2012 #3

    Thank you very much! That is not enough combination possibilities for me, so I need to raise the stakes a little bit.

    What if the user pushing the buttons didn't know they only had to push 1 master 3 secondary. In fact they don't know how many buttons had to be pushed in at all? The only hint would be that only 1 master button could be pushed in at a time.
  5. Dec 10, 2012 #4
    Hello again,

    First of all, I realized I might have misinterpreted your original description. There are two different scenarios.

    (This is the one I answered)
    Step 1. You pick 1 master button.
    Step 2. You pick 3 secondary buttons, but you can't pick the same one twice (i.e. 1,3,2 is allowed and is the same as 1,2,3, but 1,1,1 is not allowed.

    Step 1. You pick 1 master button.
    Step 2. You pick 3 secondary buttons and you can pick the same one repeatedly (1,1,2 is allowed and is the same as 2,1,1 is the same as 1,2,1)

    I can't tell which of the two possibilities is correct from your original description. From the user's perspective (not knowing the inner workings), the springs in the secondary buttons would make it seem plausible that the correct combination could involve hitting the same button twice. In that case, you do get more possibilities. The number of ways to press the secondary buttons would be (11+3-1) choose 3 or 13 choose 3 which is 286. Multiplying by 3 to account for the master button you get 858 total choices.

    Now for your next scenario, maybe you could clarify the question a bit. So, I guess a thief gets ahold of the box. You want to know his chances of opening the lock? Or how long it would take him by brute force? Lets say he can figure out that just one master button can be pressed. As far as the thief would know, there are endless possibilities just from looking at the dials.

    A. Could he figure out how to reset the lock in case he wants to start over?
    B. Presumably, he would figure out that only one master buttons could be pressed. Could he figure out that the master button must be pressed first?
    C. Can you press the same secondary button twice? (I am assuming that you can at least press it twice, but could the thief tell whether repeated presses have any effect?)
    D. The thief would probably assume that the order of the secondary buttons matters.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook