I encountered the following problem:
Given a string which was produced by mixing up a string of digits (0-9), for example: "otetwonhree" was produced by "onetwothree"~123, find the original digits (without importance of order). in our example we would return "123". Another example: "oneoneeon", we return "111".
My question is, is there necessarily a unique way to interpret such a string? meaning, could there be a string with 2 different correct interpretations? I feel like it is complicated to show that (if we know that there isn't such a string, then the solution is easy, otherwise the problem doesn't really have a solution).
More generally, given some codes $\sigma_1, ..., \sigma_n$ instead of digits, each has a unique fitting string of letters, could we decide if any string which was created similarly as in the original problem, has a unique interpretation? It's easy to find some codes for which the answer would be no, which is why I find this problem also difficult.
I'll mention I haven't studied any computability courses yet so I am mainly looking for an answer rather than a full solution (but feel free to post such if it is of any interest to anyone else), this problem just made me curious. If there is a solution which could be somewhat understood with only basic algorithms background I wouldn't mind that.