You roll a dice with s$s$ sides for n$n$ times. What is the probability that t$t$ sides appeared once?
Example with s=2$s=2$, n=3$n=3$: you roll a dice with 2 sides for 3 times. possible outcomes: '1' and '2'.
- p(t=0)$p(t=0)$ is the probability that '1' appeared 0 times and '2' appeared 3 times + the probability that '2' appeared 0 times and '1' appeared 3 times, that is 1/4.
- p(t=1)$p(t=1)$ is the probability that '1' appeared once and '2' appeared twice + the probability that '2' appeared once and '1' appeared twice, that is 3/4.
- p(t=2)=0$p(t=2)=0$, because it is impossible that both '1' and '2' appear once.
If there is a formula f(s,n,t)for $p(s,n,t)$ it will be awesome, but also an algorithm is welcome.