In a certain code language, 'P#ST' is coded as '4025' and 'RS#T' is coded as…
2025
In a certain code language, 'P#ST' is coded as '4025' and 'RS#T' is coded as '0125'. What is the code for 'R' in that language?
- A.
2
- B.
0
- C.
1
- D.
5
Attempted by 19 students.
Show answer & explanation
Correct answer: C
In a letter-to-digit coding puzzle, when a letter common to two given code-words sits at different positions in each word, a plain left-to-right positional decode is unreliable. Instead, match sets: a letter common to both code-words must correspond to a digit common to both codes, while the one letter present in only one word must correspond to the one digit present only in that word's code.
Word | Code |
|---|---|
P # S T | 4 0 2 5 |
R S # T | 0 1 2 5 |
List the letters of both code-words: 'P#ST' contains P, #, S, T; 'RS#T' contains R, S, #, T.
The letters common to both words are #, S and T; the letter present in only one word is P (only in 'P#ST') and R (only in 'RS#T').
List the digits of both codes: '4025' gives 4, 0, 2, 5; '0125' gives 0, 1, 2, 5.
The digits common to both codes are 0, 2 and 5; the digit present in only one code is 4 (only in '4025') and 1 (only in '0125').
Since P is the letter unique to 'P#ST', it takes the digit unique to '4025', so P = 4; since R is the letter unique to 'RS#T', it takes the digit unique to '0125', so R = 1.
As a check, T sits at the same relative (last) position in both words and consistently carries the digit 5 in both codes, confirming the common-letter/common-digit pairing is internally consistent. A raw position-by-position match, by contrast, would wrongly give S two different digits, since S sits third in 'P#ST' but second in 'RS#T' — which is exactly why the unique-letter-to-unique-digit rule, not blind position, is the reliable method here.
So, the code for 'R' is 1.