How many 4 digit numbers divisible by 5 can be formed with the digits 0,1,2,3,4,5,6,6 ?
[Is there any general formula for nPr for the case where some of the objects are not distinct?]
@Zaph, wouldn't that be too easy? The question is lot more complicated. The question says using digits "0,1,2,3,4,5,6,6". So, 6 is repeated. What after fixing 5 and 0 at the extreme right positions? Consider 0 on extreme right, you still have a 6 thats repeats twice. So you have to choose and arrange four digits out of seven (1,2,3,5,6,6). I am stuck here since, 6 is repeated. The situation becomes more complicated when you have 5 at the extreme right, leaving 0 as one of options for choosing and arranging rest of the digits, since zero can't appear on the extreme left.
btw, does the question belong in this section or advanced probability section. I am confused.
Break the problem into cases depending on whether (1) the last digit is 0 or 5, and (2) the number includes 0, 1, or 2 6's.
The problem statement is ambiguous, at least to me. It is not clear whether or not a number like 0125 is considered a 4-digit number.
The general approach to counting permutations with repeated objects is via Exponential Generating Functions.
Generating function - Wikipedia, the free encyclopedia
In this problem, assuming the number can start with 0 and considering just the case where it ends in 5 (half of the total cases), the EGF is
You want the coefficient ofwhen f is expanded.
Herbert Wilf has made his excellent book on generating functions available for download! See
Download generatingfunctionology
This is not really advanced. It is just very tedious.
Basically there are four cases to consider.
First with a 5 or 0 at the extreme right, the units dight.
If we 5 in that position, remember you cannot use 0 in the left most position.
Then we break those two into sub cases: with two 6’s and with at most one 6.
We can arrange “2665” inways with 5 at the right,