Hacker News new | ask | show | jobs
by hnkain 2309 days ago
In particular, E is . and T is -, so you can trivially decode any sequence of dots and dashes to strings containing only E and T.
1 comments

Surely "decoding" means returning the text that was encoded. You can't trivially decode it, you can provide a candidate solution, that's entirely different; the point of sharing this was it's not possible to decode because there's no unique solution.

    ...---...
you can guess it's EEETTTEEE, but the decoding is SOS, that was the plaintext I started with.
SOS is an interesting case, because it is a Morse "prosign", which means it is sent as one continuous stream of dits and dahs without any pauses between the letters we use to represent it.

In other words, SOS is sent exactly the way you wrote it, as if it were one long character:

  ...---...
It is not sent as three separate letters like this:

  ...  ---  ...
To indicate this special treatment, prosigns are normally typeset with a bar over the connected letters, something like this:

  ___
  SOS
(I used underscores above the letters here; if they render as separate underscores, imagine that they all run together.)
Yes, and even a simple string like "...---..." has 200 possible solutions, including "VTTIE", "3NI", and "SMB". Especially for longer inputs, there's no way to guess which one is right.