Combinations

This topic has expert replies
Newbie | Next Rank: 10 Posts
Posts: 4
Joined: Mon Sep 12, 2011 6:54 am

Combinations

by paras747 » Mon Sep 12, 2011 9:55 am
a) A door can be opened only with a security code that consists of five buttons: 1, 2, 3, 4, 5. A code consists of pressing any one button, or any two, or any three, or any four, or all five.
How many possible codes are there? (You are to press all the buttons at once, so the order doesn't matter.)??
Source: — Problem Solving |

Legendary Member
Posts: 1084
Joined: Fri Apr 15, 2011 2:33 pm
Thanked: 158 times
Followed by:21 members

by pemdas » Mon Sep 12, 2011 10:06 am
c(5,1)+c(5,2)+c(5,3)+c(5,4)+c(5,5)=5+10+10+5+1=31
paras747 wrote:a) A door can be opened only with a security code that consists of five buttons: 1, 2, 3, 4, 5. A code consists of pressing any one button, or any two, or any three, or any four, or all five.
How many possible codes are there? (You are to press all the buttons at once, so the order doesn't matter.)??
Success doesn't come overnight!

User avatar
Legendary Member
Posts: 504
Joined: Tue Apr 19, 2011 1:40 pm
Thanked: 114 times
Followed by:11 members

by knight247 » Mon Sep 12, 2011 10:25 am
@paras
We'll consider each scenario for this problem

1. Where the code consists of only 1 digit. We could have 5 possible codes
2. Where the code consists of 2 digits. Since all the digits have to be keyed in at once there is no possibility of repetition. Both the digits have to be unique. So for the first digit we have 5 options and for the second we have 4 options. 5*4=20. However, we have considered the different orders as well which we need to convert back into the unordered combinations by dividing by 2!. 20/2=10 possible codes
3. Where the code consists of 3 digits. Using the principles mentioned in statement 2 we have 5*4*3/3!=10 possible codes
4. Where the code consists of 4 digits. We have 5*4*3*2/4!=5possible codes
5. Where the code consists of 5 digits. We have 5*4*3*2*1/5!=1 possible codes

Summing up we have 5+10+10+5+1=[spoiler]31 possible codes[/spoiler]

Newbie | Next Rank: 10 Posts
Posts: 4
Joined: Mon Sep 12, 2011 6:54 am

by paras747 » Mon Sep 12, 2011 10:54 am
Thanks for the explanation. That actually cleared things up.

GMAT/MBA Expert

User avatar
GMAT Instructor
Posts: 2623
Joined: Mon Jun 02, 2008 3:17 am
Location: Montreal
Thanked: 1090 times
Followed by:355 members
GMAT Score:780

by Ian Stewart » Mon Sep 12, 2011 2:07 pm
The above solutions are perfect. You could also look at the problem as follows: when entering a code, for each button we have 2 choices (we push the button or we don't). So we have 2*2*2*2*2 = 2^5 = 32 choices in total. This count is too high by 1, because it includes the possibility of not pressing any buttons at all, so the answer is 32 - 1 = 31.
For online GMAT math tutoring, or to buy my higher-level Quant books and problem sets, contact me at ianstewartgmat at gmail.com

ianstewartgmat.com

User avatar
Legendary Member
Posts: 504
Joined: Tue Apr 19, 2011 1:40 pm
Thanked: 114 times
Followed by:11 members

by knight247 » Mon Sep 12, 2011 2:29 pm
Wow Ian...That was really cool