simple math problem (urgent)

If I have 3 columns A, B & C and 3 digits (1, 2, 3) to fill the table, how many combination are there. Example A----B----C 1----1----1 1----1----2 1----1----3 1----2----1 1----3----1 . . . . . how many possibilities can I form? Say now I have A, B, C & D and 1, 2,3 --> now how many combinations? AND A, B, C, D, E, F with 1,2,3,4 --> now how many? is there a GENERIC formula to derive the solution?

3P1 x 3P1 = 9 4 x 3 = 12 6 x 4 = 24

Yes, if you have N columns and M numbers, and numbers can repeat then you have *gasp* M^N possibilities. C’mon it’s 5th grade question.

ignore my answer. I was not thinking straight…

good one - correct ans is M^N.