1

A door lock has 5 buttons labelled with the letters A, B, C, D, E. To open the lock we must enter a code by performing a sequence of 3 operations. Each operation involves either pressing a single letter key or a pair of letter keys simultaneously. How many codes are there in which the second operation can be any of the allowed operations but the first and third operations must both involve pressing a single letter key and these two keys must be distinct?

Bernard
  • 175,478
  • 1
    Tried anything yet? – AgentS Nov 14 '19 at 12:03
  • 2
    I think the easiest approach would be to split this into two cases: $$ \left{\text{ single, pair, single }\right} $$ and $$ \left{\text{ single, single, single }\right} $$ – Matti P. Nov 14 '19 at 12:04
  • There are 5 choices for the first press and then 4 choices (anything but the first choice) for the third press. If, second, you must press any two buttons simultaneously there are 5(4)/2= 10 pairs of buttons. – user247327 Nov 14 '19 at 12:54

1 Answers1

0

A code can be formed as: {single, single or pair, single}

There are 5 choices for a single button from A,B,C,D,E. The first button can be any of the 5 choices, but once the first button is chosen, the third button can be the remaining 4 choices since it is distinct from the first button. The middle button can be any of the 5 choices if it is a single element, or it can also be any of the 5*4/2=10 ways to form a pair (5 choices for the first element in the pair, 4 choices for the second element in the pair, and half of those are double-counted since the order of the pair is irrelevant). This gives a total of 5+10=15 ways to pick the middle button.

The total number of codes is the product of the number of choices for each of the three buttons: 5*4*15 = 300.