Solve the PigeonHole Password Problem

  • Thread starter Thread starter snaidu228
  • Start date Start date
AI Thread Summary
The discussion focuses on calculating the total number of valid passwords formed from 4, 5, or 6 characters, using specific vowels and digits, with the requirement that each password must contain at least one digit. Initial attempts at solving the problem incorrectly combine possibilities without fully accounting for the cases of digit distribution. A more systematic approach is suggested, where passwords are counted separately based on character length and the number of digits included. The recommended method involves calculating all possible combinations first, then excluding those without digits to find the valid total. This structured approach ensures accurate results for the password count.
snaidu228
Messages
9
Reaction score
0
PigeonHole Help!

Homework Statement



A computer password is formed from 4, 5 or 6 characters. A character is either a lowercase or uppercase vowel: (a, e, i, o, u, y) or (A, E, I, O, U, Y) (passwords are case sensitive) or else it is a digit from the set {0, 3, 4, 7, 9}. Each password must contain at least one digit. How many passwords are possible?

Homework Equations



Product or sum rules

The Attempt at a Solution



12 letters, 5 digits

if 4: 3 letters and 1 digit.
So 3*12= 36 letters possibilities
1*5= 5 digit possibilities

36+5= 41 passwords




I'm not sure if this is how?
 
Physics news on Phys.org


snaidu228 said:

Homework Statement



A computer password is formed from 4, 5 or 6 characters. A character is either a lowercase or uppercase vowel: (a, e, i, o, u, y) or (A, E, I, O, U, Y) (passwords are case sensitive) or else it is a digit from the set {0, 3, 4, 7, 9}. Each password must contain at least one digit. How many passwords are possible?

Homework Equations



Product or sum rules

The Attempt at a Solution



12 letters, 5 digits

if 4: 3 letters and 1 digit.
So 3*12= 36 letters possibilities
1*5= 5 digit possibilities

36+5= 41 passwords




I'm not sure if this is how?
This is definitely not how.

Count the numbers of 4-character, 5-character, and 6-character passwords separately. For 4-char passwords, look at separate cases for 1 digit, 2 digits, 3 digits, and 4 digits.
4-character pwds
1 digit + 3 characters: 5 * 12 * 12 * 12 = 8640 possible choices.
2 digits + 2 chars ...
3 digits + 1 char...
4 digits + 0 chars ...

5-character pwds
1 digit + 4 characters:
2 digits + 3 chars ...
3 digits + 2 chars ...
4 digits + 1 char ...
5 digits + 0 char ...

Do the same for 6-character passwords. Add up all the possibilities.
 


Suggestion:
(1) Count all the passwords, ignoring the constraint that they must contain at least one digit.
(2) Then count all the passwords that do not contain any digits.
(3) Subtract (2) from (1) to find the number of passwords that contain at least one digit.
 
Back
Top