If in an alternate universe CAMBRIDGE
is renamed as AIMRFCJKS
, ISTANBUL
as TVDHHPLR
and TOKYO
as VWCUW
, What would be that of PARIS
?
-
6$\begingroup$ I feel sorry for the citizens of those places in the alternate universe. 'Where do you live again?' $\endgroup$– Beastly GerbilCommented Oct 27, 2017 at 16:40
1 Answer
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$. UsingTOKYO
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, forPARIS
, $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.
-
5$\begingroup$ A well-explained and well-laid-out answer. Kudos! $\endgroup$ Commented Oct 27, 2017 at 17:59
-
3$\begingroup$ An affine alternate universe... +1 :) $\endgroup$ Commented Oct 27, 2017 at 18:07
-
2
-
1$\begingroup$ 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 :) $\endgroup$– srk_cbCommented Oct 28, 2017 at 2:19