Answer:
5 Letters
Explanation:
So we need 12 distinct codes made of a single letter or a pair of letters.
What would be the least number of letters?
Lets try with 3 letters A, B and C
The possible combinations are: A, B, C, AB, AC, BC
These are 6 codes and we need 12 so lets try more A, B, C and D
The possible combinations are: A, B, C, D, AB, AC, AD, BC, BD, CD
These are 10 codes and we need 12 so lets try more A, B, C, D and E
The possible combinations are:
A, B, C, D, E, AB, AC, AD, AE, BC, BD, BE, CD, CE, DE
Finally we got 15 distinct codes which are more than 12 so the least number of letters needed are 5.
Using formula:
Four letters = 4C1 + 4C2 = 4 + 6 = 10
Five letters = 5C1 + 5C2 = 5 + 10 = 15