# Counting problem?

## Homework Statement

A software company uses a 20 character product key that new buyers of their
product must use during installation to successfully install the software in their
computers. The structure of these product keys is as follows. Repetitions are
allowed unless explicitly forbidden. Reading from left to right
(1) The first five characters must be capital letters from the western alphabet;
(2) The second five characters must include at least two of the digits 0, 1, 2, 3,
4, 5, 6, 7, 8, 9, and must include at least one capital letter;
(3) The third five characters are unrestricted - they may be digits or they may
be capital letters;
(4) The final five characters must include an 8.

## The Attempt at a Solution

1) $26^5$
2) On this one I will take the total number of combinations and subtract the combinations that just have letters in them to leave me with the total number of combinations that have numbers in them, then i need to subtract the combinations that just have one number so i can make sure my combinations have at least 2 numbers
$36^5-26^5-26^4*10$
3) $36^5$
4) $36^4$
because I have 1 choice for one slot and then 36 on the rest.

lanedance
Homework Helper
on the right track... but i think you need to be careful with 2) and 4) on:
- a couple of ordering assumptions
- some cases in line with wording
- accounting for counting repeated sequences

1) 5 letters only repetition ok
= = 26^5

2) Letters and numbers with at least 2 digits and one letter
- no restrictions = 36^5
- minus all letters = 26^5
- minus one number only = 5*10*26^4*10 - choose position of number(5), number(10) and then 4 ordered letters(26^4)
- minus all numbers = 10^5

now i think the answer to 4 should be $36^5-35^5$
because I am taking all the possible combos and subtracting the ones that don't have any 8's in them which would give me 35 choices.
and then on 2) like what you are saying .
take all possible combos subtract all letters then all numbers then subtract the ones with letters and one number.
so #2 should be $36^5-26^5-10^5-26^5(10)$

Last edited:
could someone verify my count.

I was just wondering if my count was right

lanedance
Homework Helper
4) looks ok

2) looking at the cases that are not allowed
CASE A - letters only (<2numbers)
- 26^5 choices of ordered letter combinations
CASE B - one number only (<2 numbers):
- 5 choices for the position of the number
- 10 choices for the number
- 26^4 for the ordered letter combination
CASE C - numbers only (<1 letter)
- 10^5 choices of ordered number combinations