I have a grid of $9$ squares $\left(3 \times 3\right)$ and bags of coloured counters of $9$ different colours. I can lay one counter per square and I can lay down three counters. Of the three, more than one can be of the same colour. What is the formula I would need to calculate the number of possible permutations?
I can calculate that without colours, there would be 84 outcomes. The next step, involving the colors, is where I am now stuck.
$$\textbf{:: OLD ANSWER ::}$$
You have $9$ bags with $9$ different coloured balls. In total, you have $9 \times 9 = 81$ balls. From this $81$ balls, you will choose $3$ balls. So, that gives you $\binom{81}{3} = 85320$ possibilities of choice.
Look at the grid and choose $3$ squares. Note that you have $\binom{9}{3} = 84$ distinct ways to choose the squares from your $3 \times 3$ grid. Together, this two events can occur in $85320 \cdot 84 = 7166880$ different ways.
Now, you just have to place the balls. You have to place $3$ balls in $3$ squares, and the order you placed them is relevant. So you have $3! = 6$ different possibilites of placing the balls.
That gives you a total of $7166880 \cdot 6 = 43001280$ possible and distinct outcomes.