In a certain code language, ‘PRIME’ is coded as ‘37862’ and ‘REMAP’ is coded as ‘87423’. What is the code for ‘A’ in the given code language?
4
Treat each code as the set of digits used for the set of letters in that word.
PRIME uses the letters {P, R, I, M, E} with the digit set {3, 7, 8, 6, 2}.
REMAP uses the letters {R, E, M, A, P} with the digit set {8, 7, 4, 2, 3}.
The letters shared by both words are P, R, M and E, so the only new letter appearing in REMAP is A.
Correspondingly, the digit that appears in REMAP’s set but not in PRIME’s set is 4 (since {8,7,4,2,3} minus {3,7,8,6,2} leaves 4).
That new digit must belong to the new letter, so A is coded as 4.
Hence, the code for ‘A’ is 4.