SOLUTION: Choose 5 different numbers from the set 0 to 9 to create a computer password.
a) Assume that the order does matter. How many passwords contain either a 1 or a 2 or both?
Algebra.Com
Question 847384: Choose 5 different numbers from the set 0 to 9 to create a computer password.
a) Assume that the order does matter. How many passwords contain either a 1 or a 2 or both?
Answer by swincher4391(1107) (Show Source): You can put this solution on YOUR website!
Password templates that contain a 1: 1####, #1###, ##1##, ###1#, ####1 : 5 different templates.
There are 10^4 ways to fill in the ####.
So there are 5 * 10^4 ways to have a password with a 1.
Password templates that contain a 2: 1####, #1###, ##1##, ###1#, ####1 : 5 different templates.
There are 10^4 ways to fill in the ####.
So there are 5 * 10^4 ways to have a password with a 2.
Password templates that contain a 1,2: 12### 21### 1#2## 2#1## 1##2# 2##1# 1###2 2###1 #12## #21## #1#2# #2#1# #1##2 #2##1 ##12# ##21# ##1#2 ##2#1 ###12 ##21 : 20 templates.
There are 10^3 ways to fill in the ###. This is for each template.
So there are 20*10^3 total ways to have a 1 and 2.
You may be wondering why we counted the case for 1 and 2 when we are looking for 1 or 2 or both. However, notice that the case of 1 and 2 is in both case 1 as well as case 2. So, our number of ways to count both is counted twice. Thus to compensate we have to subtract the number of ways we can have both once.
Putting this all together:
number of ways to have 1 + number of ways to have 2 - number of ways to have both
5*10^4 + 5*10^4 - 20 * 10^3 = 80000 total numbers.
Food for thought: in comparison there are 10^5 = 100000 possible 5 digit numbers.
RELATED QUESTIONS
Susan is using a computer program and must change her password. The prompt states that... (answered by ikleyn)
In a lottery daily game, a player picks three numbers from 0 to 9. How many different... (answered by ikleyn)
Laura is training for a week-long mountain cycling tour. She has 12 short hilly routes... (answered by stanbon)
There are 15 entrees available at a restaurant. From these, Archie is to choose 5 for his (answered by stanbon)
There are 14 entrees available at a restaurant. From these, Archie is to choose 5 for... (answered by stanbon)
You need to create a 4-character password for your safe. The first two characters have to (answered by josmiceli)
A pizza parlor has a choice of 9 toppings for its pizzas. From these 9 toppings, how... (answered by stanbon)
How do you set up this question in order to solve it? You are building 16 digit passwords (answered by stanbon)
It is known that the password for an ATM card must be formed by six numbers from 0 to 9,... (answered by ikleyn)