English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

A security lock has 5 push buttons. The correct code requires that all 5 buttons be pushed. You may push them one at a time or in pairs. No button can be pushed more than once.
Suppose you have developed a systematic way to check every combination and you have developed enough skill to test any given combination in 5 seconds. How many minutes will it take you on average to defeat a lock?
Hint: On average you must test half the combinations for success. This will require more than one term.

2007-07-03 02:40:39 · 1 answers · asked by Anonymous in Science & Mathematics Mathematics

1 answers

The answer is simply 5 seconds times half the number of combinations. The problem is to figure out the number of combinations pressing exactly five buttons, each once, individually or in pairs. Let's consider the cases:

(a) No pairs
If you press all five buttons singly, then there are 5! (5*4*3*2*1 = 120) combinations. You press any of the five buttons first, then any of the four remaining ones, then any of the three remaining ones after that, and so on.

(b) One pair
If you press one pair of buttons together, there are still 5! orderings of the buttons, but four ways to press one pair (before any single buttons, and after 1, 2, or 3 single buttons): [12]345, 1[23]45, 12[34]5, 123[45]. That gives us 5!*4. However, the buttons in a pair do not matter for ordering, so 1[23]45 is the same as 1[32]45, meaning we've counted every combination twice. As a result, there are 5!*4/2 = 240 unique combinations with one pair of buttons pressed at once.

(c) Two pair
If you press two pair of buttons, there are still 5! orderings of the buttons, but three ways to press two pair (the fifth single button before both pairs, in between both pairs, or after both pairs): 1[23][45], [12]3[45], and [12][34]5. That takes us to 5!*3. However, the buttons in a pair do not matter for ordering, so 1[23][45] is the same as 1[32][45] and 1[23][54] and 1[32][54] -- four different combinations among those 5!*3 are the same. So there are 5!*3/4 = 90 unique combinations with two different pairs pressed together.

Since there are only five buttons, it's not possible to press three or more pairs, so we've covered all the cases. Adding them up:

120 + 240 + 90 = 450.

There are 450 combinations pressing exactly five buttons once each individually or in pairs. If you have to try half the combinations, and they take 5 seconds each, then it takes:

450 * 5 / 2 = 1,125 seconds

That's 18 3/4 minutes.

2007-07-03 03:04:27 · answer #1 · answered by McFate 7 · 0 0

fedest.com, questions and answers