If i calculate combination of word "ball" using below formula (consider r as 2, I am selecting 2 letters)
C(n,r)=n!/r!(n−r)!
which return me 6 but actual combination is 4{ba,bl,al,ll}
so can anyone tell me! how to find combination of word which contains duplicate letters?
baland then recognize that there is one additional combination we are interested in for a total of $\binom{3}{2}+1=3+1=4$. For the more general problem, it can get quite tedious to write down a generic formula but I recommend stars-and-bars along with inclusion-exclusion – JMoravitz Feb 22 '22 at 14:58