In a certain code language, ‘PACE’ is coded as ‘8471’ and ‘CAMP’ is coded as ‘7412’. What is the code for ‘M’ in the given code language?
2
List the digits used by each code word.
PACE is coded as 8471, so P, A, C, E together use the digits {8, 4, 7, 1}.
CAMP is coded as 7412, so C, A, M, P together use the digits {7, 4, 1, 2}.
Letters P, A and C are common to both words, and the digits {7, 4, 1} appear in both codes.
The digit 2 appears in CAMP's code but not in PACE's, and the only new letter in CAMP is M.
Therefore, the letter M must correspond to the digit 2.
Hence, the code for M is 2.