Say there are $n$ elements where some of the $n$ elements are repeated elements. For example, there are $10$ dogs and there are $2$ dogs of species $A$, $3$ of species $B$ and $5$ of species $C$.
Now how many ways are there to permute $k$ elements from the $n$ elements?
For example, how many ways are there to select $4$ dogs from the $10$ dogs (order matters).
I know that for $k = 10$, the answer is
$$\frac{10!}{2!\cdot3!\cdot5!}$$
But what about general $k \neq n$?
I thought maybe answer would be
$$\frac{nP_k}{n_1!n_2!n_3!...}$$
but it doesn’t seem right?
What is answer with full explanation please, thank you. Actually even hints are fine. I am trying to make my concepts more clear basically.
Note: I am looking for a general formula, not a strategy to solve. I can solve these kind of questions by considering cases but I want a general formula