I'm given $n$ distinct objects. In how many ways can we select and permute $m$ objects out of those $n$ objects. $n$ may be less than $m$ and any object can appear any number of times. For example:
$n=2$ (Objects are say $1$ and $2$)
$m=3$
Then required number of permutations are: $8 [ (1,1,1) (2,2,2) (1,2,2) (2,1,2) (2,2,1) (1,1,2) (1,2,1) (2,1,1) ]$
How can I approach this problem.
It is indeed $n^m$. A simple example would be a binary sequence: if we have an alphabet $\{0,1 \}$, how many unique ways of writing a string length $n$? It's $2^n$ of course, because you have an 'infinite' supply of 0- and 1-bits.