# In a certain language if the word STABILIZE is coded as JHXDJQSYA, then how is the word RESPONSES coded in that language?

In a certain language if the word STABILIZE is coded as JHXDJQSYA, then how is the word RESPONSES coded in that language?

1. LRCRPOQDP
2. PDQOPLRCR
3. LRCRPPDQO
4. LQCRPPDQO
5. LRCRPPDOQ

I tried it

STABILIZE - 19|20| 1| 2| 9|12| 9|26| 5|

JHXDJQSYA - 10| 8|24| 4|10|17|19|25| 1| But i didn't find any clue.

• 3, of course. You don't even need the question to know that! But I'll explain in an actual answer. Mar 11, 2015 at 9:46
• Is this actually solvable? I mean, let's look at the set of such functions where the input and the output both are the set of 9 character words and also they map STABILIZE to JHXDJQSYA. Then f1 maps RESPONSES to LRCRPOQDP, f2 to PDQOPLRCR etc. You can have a function for every combination.
– chx
Mar 12, 2015 at 7:40
• @chx - it is, indeed, unsolvable. In order to come up with a "solution" you have to make assumptions about the details of how words are "coded", and any purported solution should describe those assumptions. Most people assume, without saying so, that the "solution" should be in the form of a simple algorithm. That's why the next number in the sequence 1, 2, 3 is usually given as 4, when in fact any number is possible. Mar 12, 2015 at 15:21

Generally, these kind of problems have odd number of characters.

Now always try to focus on middle character(n/2 + 1) in whole word(say 'n' characters)

Step 1:
STAB   I   LIZE
( +1 )
J

Step 2:(Take 4 characters to the middle on right)
L    I      Z    E
(-2)  (-1)  (-2) (-1)
J    H      X    D

Step 3:(Take 4 characters to the middle on left)
S     T     A     B
(-2)  (-1)  (-2)  (-1)
Q     S     Y     A

Step 4:(Merge 2,1 and 3)
JHXDJQSYA

Now, coming back to word "**RESPONSES**"

Step 1:
RESP   0   NSES
( +1 )
P

Step 2:
N     S     E    S
(-2)  (-1)  (-2) (-1)
L     R     C    R

Step 3:
R     E     S     P
(-2)  (-1)  (-2)  (-1)
P     D     Q     O

Step 4:
LRCRPPDQO

• Nicely explains the actual algorithm used (alternating -2 -1 around symmetry.) +1 for this. Mar 11, 2015 at 16:41
• @Ajay - This looks like the most elegant solution for the given problem - use transposition and no salt required ;-)
– Len
Mar 11, 2015 at 23:33

With problems like this, I normally try to figure it out based on the set of possible answers. Multiple-choice answers very often contain the correct answer and various permutations of it, so the "consensus" answer is probably the correct one. Looking down the columns, we find the most common letter at each position is: LRCRPPDQO, which happens to be answer 3. So it's probably 3, but it would be nice to find at least part of an encoding algorithm.

Note that STABILIZE and JHXDJQSYA have the same number of letters. So we presumably need only look for algorithms that compute a slot as a function of letters in the other slots, not fancy deletion/expansion stuff.

Next, let's look for repeated letters: I occurs at positions 4 and 6 (counting from 0) in STABILIZE but the repeats in JHXDJQSYA occur at positions 0 and 4. Thus it's not merely a letter-by-letter translation. Furthermore it's not just translation and shuffling, since there are three Ss in RESPONSES but no trio of identical letters in any of the possible answers. Thus, there is presumably an impact of either position or previous letter(s).

For our next hint, let's look at the answers. (2) is just RESPONSES minus one at each location, and that's clearly not what is happening with STABILIZE, so we can throw 2 out. Thus, RESPONSES translates to something that looks like this: L_CRP____.

Now we just brute force various operations on the letters and look for something to jump out. The first interesting pattern I found was if you sum the letters (A == 0):

 STABILIZE
JHXDJQSYA
+--------- (mod 26)
BAXERBAXE


This suggests that whatever factors influence the first four characters, it's the same on the last four (in the same order). So we have a pattern: if you go forward by 5, as many letters as you go up (down) in the original, you go the opposite in the encoded version. For example, 'J' + 'S' - 'L' == 'Q' to get answer character 5 given 0 and the original 0 and 5. We take what we know, and get:

RESPONSES
L_CRPP_QO


And that leaves only two possible answers: (3) and (4). Do either obey the rule? We have R and D or Q and D; 'R' + 'E' - 'S' is 'D', so

it's #3:

LRCRPPDQO


just like we predicted from examining the structure of the answers. Why, exactly? I'm not sure. But we don't really need to know.

Just to check that we really are on the right track, let's sum our proposed answer:

 RESPONSES
+LRCRPPDQO
---------  (mod 26)
CVUGDCVUG


And then if we look at the difference between these two answers:

 C  V  U  G
-B  A  X  E
== == == ==
1 -5 -3  2


And if we look at the relevant pair of letters and sum them, then take the difference between the two words, we get:

'R' + 'N' - 'S' - 'L' = 1
'E' + 'S' - 'T' - 'I' = -5
'S' + 'E' - 'A' - 'Z' = -3
'P' + 'S' - 'B' - 'E' = 28 = 2 (mod 26)


So these values clearly arise from some predictable operations on the letters; the BAXERBAXE values are not merely random as we can predict the CVUG pattern from them.

We could guess that there is salt with values (6, 6, -2, -1, 1) and then the encoding formula is:

1. First 4 letters: letter at index + letter at (index+5) + salt at index
2. Central letter: letter + final salt value (i.e. 1)
3. Last 4 letters: coded letter at (index - 5) + letter at (index - 5) + letter at index

This matches everything that is specified, though it's possible that the salt is intended to be the result of some other operation.

• Very nice, but you've somewhat lost me with salt. (?) I like how you explain your deduction route. Mar 11, 2015 at 16:38
• @BmyGuest - "Salt" is used in encryption where it is a pattern (often fixed) that is mixed into what you are encrypting. Mar 11, 2015 at 18:19

My answer is quite similar to that of Rex Kerr's just the method is different .I found out that encryption is symmetric about middle point that is B in STABILIZE.

S  T  A  B  I  L  I  Z  E
19 20 1  2  9  12 9  26 5


and

J  H  X  D  J  Q  S  Y  A
10 8  24 4  10 17 19 25 1


when they are summed (mod 26) they produce 3 2 25 6 19 3 2 25 6

So the work was now to just sum up the word RESPONSES with given answers and find it's symmetricity.

R  E  S  P  O  N  S  E  S
18 5  19 16 15 14 19 5  19


The only solution which shows the symmetric property is LRCRPPDQO.

L  R  C  R  P  P  D  Q  O
12 18 3  18 16 16 4  17 15


which when summed(mod 26) with RESPONSES gives 4 23 22 8 5 4 23 22 8

Edit : By 'symmetric' I mean the repeating nature of the result around the middle point which is I in STABILIZE and O in RESPONSES.

• That is not "symmetric", nor is B the middle (but otherwise you've got it right). Mar 11, 2015 at 13:31
• By symmetric I meant repetition about the middle point which is I in STABILIZE and O in RESPONSES. @RexKerr Thanks for pointing it out ;updating it in the answer. Mar 11, 2015 at 13:37