STAT 120A
Homework 2 Solution
Show all work. All parts worth 5 points unless noted.
1. A computer password 8 characters long is to be created with 6 lower case letters (26 letters for
each spot) followed by 2 digits
...
STAT 120A
Homework 2 Solution
Show all work. All parts worth 5 points unless noted.
1. A computer password 8 characters long is to be created with 6 lower case letters (26 letters for
each spot) followed by 2 digits (10 digits for each spot).
a. How many different passwords are possible if each letter may be any lower case letter (26
letters) and each digit may be any of the 10 digits?
Solution: Can think of it as n1 = n2 = ::: = n6 = 26 and n7 = n8 = 10 and so the number of ways
is 266102 (using multiplication rule).
b. You have forgotten your password. You will try and randomly guess a password and see if it
is correct. What is the probability that you correctly guess the password?
Solution: You are essentially guessing a password with 6 letters and 2 numbers ending it. This has
266102 ways of occurring, of which 1 is correct. The number of ways you can get it correct is 1,
thus the probability of getting correct is 2661102 .
c. How many different passwords are possible if each letter may be any lower case letter, each
digit may be any one of the 10 digits, but any digit is not allowed to appear twice (cant use same
number for both number spots)?
Solution: This is 26610 ∗ 9. The first digit spot has 10 possible choices, but the 2nd digit spot has
only 9 possible choices, since we cant use the number we used in the first spot.
d. How many different passwords are possible if each letter may be any lower case letter, each
digit may be any one of the 10 digits, but the digit 9 is not allowed to appear twice? (hint: think
of the total number ways a password can be created, and then subtract of the number of ways you
are not allowed to create the password.)
Solution: Cannot end a password with 99. 266102 total ways, of which 266 end with a 99 (think of
1 choice for the first digit spot and 1 choice for the second spot, both of which are number 9). Thus
the number of ways is 266102-266.
e. In the setting of (a), how many passwords can you create if you cannot reuse a letter?
Solution: This is a permutation. Still can end with any numbers, but we now have 26*25*24*23*22*21
iways to create the part of the password with letters, and 102 ways to create the numeric part. In
total, have 26*25*24*23*22*21*102 ways.
2. 10 points. What is the coefficient of x3y4 in the expansion of (x + y)7.
Solution: Use the binomial theorem. n=7 and k=3, thus the coefficient on x3y4 is 7 3 = 3!4! 7! .
3. 10 points. A child has seven blocks, three of which are red and four of which are green. How
many patterns can she make by placing them all in a line?
Solution: This is asking that there are 7 spots, and pick which are red (or green). This is 7 3 or
7 4. Both will result in 3!4! 7! .
4. Five cards are randomly chosen from a deck of 52.
a. How many ways are there to receive 5 cards from a deck of 52?
Solution: 52 5 . We have 52 cards, and we choose 5 of them.
b. How many ways are there to receive a hand that contains exactly 2 aces? (there are 4 possible
aces in the deck)
Solution: There are 4 aces, of which we choose 2 of them. Then, we have 48 possible cards to make
up the other 3 cards of the 5 card hand. Thus, we have 4 2 48 3
[Show More]