1.) A password consists of seven characters. You may assume numbers refer to dig
ID: 3070867 • Letter: 1
Question
1.) A password consists of seven characters. You may assume numbers refer to digits "0" through "9" and letters refer to "a" through "z" (lower case only); characters other than letters or numbers are not allowed. Count the number of possible passwords that can be created in each of the following scenarios. Consider each part of this questions separately. (a)The password can contain only numbers (b) Repeat Part (a) if at least one number must be repeated more than once (c) Repeat Part (a) if the sum of the digits must be even (d) The first three characters must be letters and the last two characters must be numbers (e) The password contains exactly three letters (in any positions) HINT: In some cases, it may be easier to count the number of passwords that follow a particular structure, then subtract the number of passwords with that structure that do not meet your other requirements.]Explanation / Answer
password has 7 characters
total integers(0 to 9) = 10
total letters=26
..............................................
a)since integers are 10 and repeatition allowed ,any integer can come at any any place.so
number of possible passwords when password contain only integers = 107
=10000000
..........................................
b)
no. of permuataion of passwords of atleast one number must be repeated more than once= total permuations with integers - total permutations with no digit being repeated
= 107 - 10P7
=10000000 - 10! / 3!
=10000000 - 604800
=9395200
-------------------------------------------------------------------------------------
c)
even digits(0,2,4,6,8)=5
odd digits(1,3,5,7,9)=5
sum of digits will be even,-->
case 1) when all digits are even ,so total permutation=57 =78125
case 2) when two digits are odd,other 5 are even ,so total permutation=5^2 * 5^5 =78125
case 3) when 4 digits are odd,other 3 are even,so total permutation = 5^4 * 5^3 = 78125
case 4) when 6 digits are odd,one digits is even = 5^6 * 5^1 = 78125
so, total number of passwords when sum of digits are even = 78125+78125+78125+78125 =312500
________________________________________________________________________
d) first three should be letters , each letter can take any place so,this can be done in 263
last two must be integers,this can be done in 102
the other character can be integer and letters,so this can be done in (26+10)2
hence,number of possible passwords= 263 * 102 * (26+10)2 =17576 * 100 * 1296
=2277849600
............................................................................
e) three letters ,then other 4 will be integer
so, number of possbile passwords(if repetition allowed) =263 * 104 = 175760000
if any query ,let me know in comment section
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.