How many different four-digit numbers can be formed by arranging the four digits in 2004?
I want to count how many ways I can arrange the digits 2, 0, 0, and 4 to form a four-digit number. The order of the digits matters, so I will use the permutation formula. The permutation formula says that the number of ways to arrange n objects, of which r are identical, is n!/(r!s!...), where r, s, ... are the numbers of identical objects of each type. In this case, n is 4, since I have four digits to arrange. I have two identical digits of type 0, so r is 2. I have no other identical digits, so s, ... are all zero. Therefore, the permutation formula gives me 4!/(2!0!...) = 4!/(2!) = 24/2 = 12. This means that there are 12 ways to arrange the digits 2, 0, 0, and 4 in any order. However, some of these arrangements will not be valid four-digit numbers, because they will start with a zero. I want to avoid those cases, so I will subtract them from the total. How many arrangements start with a zero? Well, if I fix the first digit as zero, then I have three remaining digits to arrange: 2, 0, and 4. This is similar to the original problem, but with one less digit. I can use the same permutation formula, but with n = 3 and r = 1, since I only have one identical digit of type 0. This gives me 3!/(1!0!...) = 3!/(1!) = 6/1 = 6. So there are 6 arrangements that start with a zero, and I want to exclude them. Therefore, the final answer is 12 - 6 = 6. There are 6 different four-digit numbers that can be formed by arranging the four digits in 2004. 