SEARCH HOME
 Math Central Quandaries & Queries
 Question from Jeffrey: Hi, I was having a disagreement with a friend as to the answer to this question.  We have a 5 button push lock and we were wondering how many different codes were possible in this situation.  In this lock each button can only be pressed once (ie it's not a numbered key pad) and order matters.  How would we find out the # of possible codes?

Hi Jeffrey.

I infer from your description that you have 5 buttons and all of them must be pushed once each, but that the order matters. If I'm wrong, let me know in what way.

• There are five choices for the first button you push.
• There are four choices left for the second button.
• There are three choices left for the third.
• Two choices are left for the second.
• And the last button is the only one remaining.

We call this a "permutation" question. The way to solve it is to multiply the number of choices together:
5×4×3×2×1 = 120.

There are 120 possible codes.

Stephen.

Math Central is supported by the University of Regina and The Pacific Institute for the Mathematical Sciences.