Using the digits 2, 3, 4, 7 and 8, Carlos will form five-digit positive integers. Only the digit 2 can be used more than once in any of Carlos’ five-digit integers. How many distinct fivedigit positive integers are possible?
Cases:
No repetition of 2:
cases=5!
2 is present two times:
cases=5!2!
2 is present three time:
cases=5!3!
2 is present four time:
cases=5!4!
2 is present five time:
cases=5!5!
all cases:
total=5!+5!2!+5!3!+5!4!+5!5!
total=206
A computer code calculates a total of 501 distinct permutations and begins with:
{{2, 2, 2, 2, 2}, {2, 2, 2, 2, 3}, {2, 2, 2, 2, 4}, {2, 2, 2, 2, 7}, {2, 2, 2, 2, 8}, {2, 2, 2, 3, 2}, {2, 2, 2, 3, 4}, {2, 2, 2, 3, 7}, {2, 2, 2, 3, 8}, {2, 2, 2, 4, 2}, {2, 2, 2, 4, 3}, {2, 2, 2, 4, 7}, {2, 2, 2, 4, 8}, {2, 2, 2, 7, 2}, ...........and ends with:
{8, 4, 7, 3, 2}, {8, 7, 2, 2, 2}, {8, 7, 2, 2, 3}, {8, 7, 2, 2, 4}, {8, 7, 2, 3, 2}, {8, 7, 2, 3, 4}, {8, 7, 2, 4, 2}, {8, 7, 2, 4, 3}, {8, 7, 3, 2, 2}, {8, 7, 3, 2, 4}, {8, 7, 3, 4, 2}, {8, 7, 4, 2, 2}, {8, 7, 4, 2, 3}, {8, 7, 4, 3, 2} = 501 permutations.
OK, young person! If you don't believe it, here are the 16 distinct COMBINATIONS, which you must permute as follows:
[(2, 2, 2, 2, 2), (2, 2, 2, 2, 3), (2, 2, 2, 2, 4), (2, 2, 2, 2, 7), (2, 2, 2, 2, 8), (2, 2, 2, 3, 4), (2, 2, 2, 3, 7), (2, 2, 2, 3, 8), (2, 2, 2, 4, 7), (2, 2, 2, 4, 8), (2, 2, 2, 7, 8), (2, 2, 3, 4, 7), (2, 2, 3, 4, 8), (2, 2, 3, 7, 8), (2, 2, 4, 7, 8), (2, 3, 4, 7, 8)] >>Total = 16 distinct combinations.
[1 + 5*4 + 6*20 + 4*60 + 1*120] =501 distinct permutations.