If in an alternate universe CAMBRIDGE is renamed as AIMRFCJKS, ISTANBUL as TVDHHPLR and TOKYO as VWCUW, What would be that of PARIS?

• I feel sorry for the citizens of those places in the alternate universe. 'Where do you live again?' – Beastly Gerbil Oct 27 '17 at 16:40

To decrypt these, we can use

the Affine cipher. (To encrypt a message using this cipher, start by transforming each of the letters into numbers, with A=0, B=1, etc., then use the function $$E(x)=(ax+b) \text{ mod }26$$ to encrypt it into a new letter, where $x$ is the number corresponding to the letter you want to encrypt and $a$ and $b$ are keys of the cipher.)

In this case, we have $a$ equal to the number of letters in the city name, and $b=a-1$. Using TOKYO as an example, we have $a=5$ and $b=4$, so:

Message: T O K Y O
x: 19 14 10 24 14
E(x): 21 22 02 20 22
New message: V W C U W

Therefore, for PARIS, $a=5$ and $b=4$, so we have:
Message: P A R I S
x: 15 00 17 08 18
E(x): 01 04 11 18 16
New message: B E L S Q

So PARIS becomes BELSQ.

• A well-explained and well-laid-out answer. Kudos! – GentlePurpleRain Oct 27 '17 at 17:59
• An affine alternate universe... +1 :) – Beastly Gerbil Oct 27 '17 at 18:07
• HIVPIUJ FFJHDD :) Good job. – ABcDexter Oct 27 '17 at 19:14
• Didnt knew about affine cipher... my algorithm was, code = num2alphabet(alphabet2num(word*length(word))mod 26). Where A is 1 and B is 2 and so on. Good one DooplissForce. Thank you for your interest and time :) – srk_cb Oct 28 '17 at 2:19