I was trying to develop formulas for different permutation/combination scenarios, but I could not sort out last three cases. Please check these following cases -
Unique items
Repetition: no
- Permutation: $_nP_r$
- Combination: $_nC_r$
Repetition: yes
- Permutation: $n^r$
- Combination: $_{n+r-1}C_r$ or $_{n+r-1}C_{n-1}$
Non-unique items
Repetition: no
- Permutation: $\displaystyle \frac{n!}{k_1!k_2!\cdots k_n!}$, where $k_1,k_2,\dots k_n$ are numbers of non-unique items
- Combination: ??
Repetition: yes
- Permutation: ??
- Combination: ??
Closely related with your question is a somewhat more general consideration of fundamental counting techniques called
Functions: $f$ may be arbitrary, injective or surjective giving three different possibilities.
Sets: Elements of $N,X$ may be either distinguishable or indistinguishable resulting in four different possibilities.
with
$\qquad x^{\underline{n}}=x(x-1)\cdots(x-n+1)$ the falling factorial of $x$,
$\qquad x!=x(x-1)\cdots 3\cdot2\cdot1$ the factorial of $x$,
$\qquad \binom{x}{n}=\frac{x!}{n!(x-n)!}$ the binomial coefficient $x$ choose $n$,
$\qquad \left(\!\!{x\choose n}\!\!\right)=\binom{x+n-1}{n}$ the number of multisets $x$ multichoose $n$.
$\qquad {n\brace x}$ the Stirling numbers of second kind and
$\qquad p_x(n)$ the number of partitions of $n$ into $x$ parts.
A presentation in terms of urns and balls can be found here.
Examples: Let's take a look at some functions with respect to these properties:
Balls and boxes
We think of $N=\{1,2,3\}$ as a set of balls and of $X=\{a,b,c,d\}$ as a set of boxes. A function $f:N\rightarrow X$ is considered as placing each ball into some box.
Four functions with distinguishable balls and boxes:
with balls indistinguishable:
with boxes indistinguishable:
with balls and boxes indistinguishable: