# Maths probability

[Question PS-Prep]

A certain stock exchange designates each stock with a one-, two-, or three-letter code,where each letter is selected from the 26 letters of the alphabet. If the letters may be repeated and if the same letters used in a different order constitute a different code, how many different stocks is it possible to uniquely designate with these codes?

A2,951
B8,125
C15,600
D16,302
E18,278

[My question]

I got answer correct but took 3min30s to solve this question.

My approach was as following:

1 letter codes: 26 ways
2 letter codes: (2P26) + 26 = 676 ways
3 letter codes: (3P26) + 3*(1P26)*(1P25)+(1P26) = 17576 ways
Sum = 26+676+17576 = 18278

Please find my manuscript in the attached.

I found my way is too time consuming since we have to solve a single problem within a two-minite timeframe. There should be a better/simpler way to think, right?

Your detailed instruction will be highly appreciated!！

Best regards,
Fuhe(Helia) Jin

Dear Zeyu 老师，

When I review this question again I found that I was think way too complecated!!

Since the numbers can be repeated, I can simply approach in this way:

1 letter codes = 26
2 letter codes = 26^2
3 letter codes = 26^3

Total=26+26^2+26^3

Am I correct??

Yes. Your second approach is mine as well.

To count is to classify, you did it correctly. Then, you can directly use multiplication principle - as the letters can be repeated it is NOT a permutation and therefore thinking about permutation takes much more time.