1. ## finite set

If $A$ is a finite set, let $o(A)$ be its cardinality. Let $A$ be the set consisting of all $5$-digit integers, each digit of which is $1,2$ or $3$. Compute $o(A)$. Let $B = \{x \in A: \ \text{each of} \ 1,2, \ \text{and} \ 3 \ \text{is among the digits of} \ x \}$. Compute $o(B)$.

So $o(A) = 3^5$? And $o(B) = 6 \times 10^2 = 600$?

B is a subset of A, so 600 does not make sense. How are you interpreting the question?

3. Originally Posted by amitface

B is a subset of A, so 600 does not make sense. How are you interpreting the question?
So it would be $3^{3} \times 2 \times 1$. Because this will guarantee that all numbers $1,2$ and $3$ are contained.

4. Originally Posted by Sampras
So it would be $3^{3} \times 2 \times 1$. Because this will guarantee that all numbers $1,2$ and $3$ are contained.
Because say you choose $1$ for the first position. Then the next two positions can be $1$ also. But the last two positions must be $2$ or $3$ (not both the same).

5. That does not count all such arrangements though. That counts all 5 digit numbers of the form:

AAABC, where A,B,C are distinct and either 1,2, or 3.

You could also have something of the form ABBCA, which is not counted by your method.

You want to find those 5 digit numbers that have at least one 1, one 2, and one 3.
It is easier to find those that don't have at least one of each, and then subtracting it from $3^5$

So try to count the following:

# of 5 digit numbers with only 1's.
# of 5 digit numbers with only 2's.
# of 5 digit number with only 3's.

# of 5 digit numbers with only 1's and 2's.
# of 5 digit numbers with only 2's and 3's.
# of 5 digit numbers with only 1's and 3's.

6. # of 5 digit numbers with only 1's: $1$
# of 5 digit numbers with only 2's: $1$
# of 5 digit number with only 3's: $1$

# of 5 digit numbers with only 1's and 2's:
# of 5 digit numbers with only 2's and 3's:
# of 5 digit numbers with only 1's and 3's:

For the above...would counting the number of those numbers that do not have those numbers and then subtract it be the best way? Because you could have $11112, 11221, \dots$

7. Suppose we want to count the # of 5 digit numbers with only 1's and 2's:

Such a number can have one 1, two 1's, three 1's, or four 1's. (All others being 2)

How many ways can it have one 1? You have to choose 1 position out of 5 possible positions, so $\binom{5}{1}=5$.

How many ways can it have two 1's? You have to choose 2 positions out of 5 possible positions, so $\binom{5}{2}=10$.

Similarly for the others, we have 10 and 5. So there are 30.

Do the same for all others, subtract, and you have your result. (150)

If you don't like this approach, you can try counting them directly by splitting them into different cases.
two 1's, two 2's, one 3
two 1's, two 3's, one 2
two 2's, two 3's, one 1
one 1, one 2's, three 3's
one 2, one 3, three 1's
one 1, one 3, three 2's.

Of course, the first three are equal, and the last three are equal.

I'm pretty sure the first way is the simplest way to do it though. I could be wrong.