Question
Consider passwords which are are strings over alphabet LUD as in Problem and compute the nuber of passwords that satisly the following constraints: Password length is 9 and has nlO repealed characters.Password length is 9, iL hasrepealed characters; and it has al least one letter:Password length is 9, it has no repeated characters, and it has at least one letter and at least one digit_
Consider passwords which are are strings over alphabet LUD as in Problem and compute the nuber of passwords that satisly the following constraints: Password length is 9 and has nlO repealed characters. Password length is 9, iL has repealed characters; and it has al least one letter: Password length is 9, it has no repeated characters, and it has at least one letter and at least one digit_


Answers
Passwords Suppose a password must have at least 8 characters, but no more than 12 characters, made up of letters (without distinction for case) and digits. If the password must contain at least one letter and at least one digit, how many passwords are possible?
Okay, This question asks us about the number of distinct passwords using different criteria. So Part A says that our passwords are going to be six letters followed by one digit, and we're assuming it's not case sensitive. So with six letters and one digit, well, we have seven spaces for a password. And in each of the 1st 6 we have 26 letters that could go in each spot. And then in our last space, we have to pick a digit so 10 than multiplying all of these. Together we get the total number of passwords at approximately 3.89 times 10 to the ninth. Different passwords and then part be slightly modifies this where now the letters can't repeat, so I'll do the same thing. But now we have 26 traces for the first. But each letter we uses bars it from being used elsewhere in the password. So each space has one last letter choice, and then we still have our 10 digits so we can pick from. So now our total number of passwords is down to approximately 1.66 times 10 to the night
So if we're looking at all the possible combinations in a seven character password we got 26 letters to choose from and 10 numbers to choose from and seven places to put them. So we've got 36 different characters um place in seven different positions. 2036 times 36 6 times over. Or a 36 to the power of seven. So that's gonna be all our total hub combinations Now for if we have one number and six letters that means this x right here can be the number that we have and they can go in any one of these over here. So there's seven places for it to be. There's 10 numbers to choose from and then the remainder are gonna be filled with letters. So it's gonna be 26 letters to choose from To the power of the seven minus the one which was the number that we chose to go somewhere here. So that's gonna get us 70 times 26 to the power of seven number of possible combinations. And then for a seed we are going to be looking at. And so we have 26 letters to choose from. five of them are gonna be letters And then we have 10 numbers to choose from. For the other two positions. Just going to be 100 Times 26. The power of five and the one word that makes be different from C. Is that we were looking for exactly one and this one is just the first five or letters and then the next to our numbers. And it doesn't matter which way they are since we got only two spots to put them.
Okay. So is the password where we have all letters and B. Is the password where we have all lower case letters. Um Were asked what is the probability that all lower case letters Given that it contains only letters? So of only letters is A. And that's lower case is simply going to be the intersection of the two And the intersection is going to be they share 26 the power of eight. it's gonna be eight characters are There's 26 characters that they share the lower case ones and eight slots to fill Divided by the 50 to the 8th Letters Open. So that's 26 times two. And that is gonna get us approximately 0.0039.39%. And the next thing we're going to look at is actually how these these events intersect. And part B. Asks what is the probability password contains at least one uppercase letter given that it only contains the letters. So I suppose that we have like those AIDS 12345678. And we know that it contains only letters So that's going to be 50 to the power of eight possibilities. Um And since the upper case letters and the lower case letters they don't actually intersect all we have is going to be Um for the at least one letter simply going to be 1 -26 to the 8th. Over 50 to the 8th. Which is going to turn out to be 255 Over 256. Yeah and then for part C what is the password that contains only even numbers given that it contains all numbers? So what we're gonna be looking at here the probability of even given numbers. So real simply this is going to be we're only looking at the numbers and there are 10 of them to choose from and eight slots to put him in. And we only have five even numbers to choose from. So it's gonna be five of the five hour, 85 the eighth over 10 to the eighth, which is also going to be 0.39 Or .39%.
Okay. So we got all caps. Yeah Just 26 and then all not caps. Which is another 26 And then we got 10 to just zero through nine to choose from which is 10. Um And now we are asked for omega the set of all possible passwords. Um And we're looking for exactly eight characters. So we're just going to hand those puppies up. We have 26 plus 26 plus 10 options. And by my count that's going to be 52 plus 10. So 62. And if we're choosing eight places That means that we have 62 to the power of eight combinations of passwords. Okay. And the number of passwords in A. Where A. Is using only letters and then B. Is just numbers. So that is going to be 26 groups want to do that 26 plus 26 to the power of eight. And then for be it would be 10 to the power of eight but they're not asking a spell b. Um Part C is asking about the compliment the intersection of a complements A and B. So we have a compliments and be complement intersect. This is going to be um the same as the compliments of the union. So if we thought about this in terms of A. And B. And then we have a universe, This would be eight and this would be be and then what isn't in this intersection is going to be everything but this part right here. So it's going to be the opposite of that and then A. Or B. A. Or B is going to be this but then complemented that is going to be everything on the outside. So what we're looking at is everything that's not in these circles and this is going to be what is A. Or B. Well we're looking at what a. Is that's 50 through the power of eight and B is 10 to the power of eight. Some we'll just add these two together. Right, okay. Yeah. And then we'll just subtract that from the universe. So what we'll have is lambda. Sorry, omega. Well we're just right 60 to the power of eight. And then we're gonna subtract 50 to the power of eight plus 10 of the power of eight. And this is going to be approximately 1.65 times 10 to the power of 14, 14. No. And then for the next part we are asked what is passwords that are That have at least one integer. So if we're looking for yeah, so this is gonna be the same as finding out how many have no integers and then subtracting that from the universe. So omega is all the possible options we have and then we have the other one which is none of them. So that's going to be just a actually we're gonna take the magnitudes um technically we're supposed to be driving those So that's gonna be 60 to the power of AIDS -52 to the power of eight. And that is going to be yeah. also 1.65 times 7 to 14 approximately Now for ones that is exactly one. This is simply going to be number of passwords of seven letters. Well um we have 52 letters to choose from and then seven of them were like this And then we got 10 numbers to choose from. So yeah, don't And moreover, There's eight different places we can put that 10. So this is gonna be surprisingly not 1.65 times 7 to 14 but 8.22 times 10 to 14. So we got about four times as many options here.