2

You are provided with an example:

fair game = FOSPSTFS

Another example:

want more = FKUAIETO

Figure out the word:

CFKQYUQ


I understand how this looks. However, there are some points one needs to consider.

The coding rule is very simple. It's not something out of the left field. After carefully looking at the example, I believe it's possible to figure it out fairly quickly.

The coding itself for a single word is done by hand in two minutes or less.

Decoding might be harder, but once you figure out the rule, it is possible, as I checked myself. Computer is not necessary, but would make the process faster.

And the most important thing - this 'cipher' has no key. (It's probably not a cipher then, if so, I apologise).

Yuriy S
  • 997
  • 5
  • 17
  • 1
    See http://meta.puzzling.stackexchange.com/questions/1717/code-puzzles-what-not-to-do and consider whether this falls into the "what not to do" category. – Gareth McCaughan Sep 22 '16 at 12:02
  • (And if you're confident it doesn't, perhaps post something that indicates why -- or if you can't do that without spoiling the puzzle, at least say that you have understood what's bad and why and that you're confident that despite appearances this is OK.) – Gareth McCaughan Sep 22 '16 at 12:04
  • @GarethMcCaughan, I wouldn't think so, but if the question is considered bad by many users (as I suspect) I will work on it some more. – Yuriy S Sep 22 '16 at 12:04
  • It looks like a question that obviously doesn't have enough information to answer it -- where the only chance is to happen to think of the same thing that was in your brain when you wrote the question. Maybe it isn't, but if not then it's probably impossible to tell without solving the puzzle. – Gareth McCaughan Sep 22 '16 at 12:06
  • @GarethMcCaughan, I believe the example gives enough clues to figure out the code. If the question gets further downvotes, I'll take it down and figure out what to do. – Yuriy S Sep 22 '16 at 12:11
  • Well, @Yuriy, you are right, but that's besides the point. The point is that on this site people want to read a "story" -- however irrelevant is -- surrounding your puzzle. You might wish to say that an alien whispered these words to you while you were dreaming in your cabin in a moonbase. Or whatever. – Matsmath Sep 22 '16 at 12:24
  • @Matsmath, I don't have any experience on this site yet, so I wasn't sure what is acceptable (I've read the help section). – Yuriy S Sep 22 '16 at 12:27
  • 6
    @Matsmath, you have said this sort of thing before and it just isn't true. Here are some of the most-upvoted recent puzzles. http://puzzling.stackexchange.com/questions/36651/loopy-c-loop http://puzzling.stackexchange.com/questions/42824/puzzling-about-a-cube http://puzzling.stackexchange.com/questions/42142/what-is-an-odious-word http://puzzling.stackexchange.com/questions/42891/the-answer-to-this-riddle-is-a-number ... and none of them has an irrelevant framing story. – Gareth McCaughan Sep 22 '16 at 12:28
  • 1
    @Matsmath and Yuriy: Story or not, think about whether the puzzle is likely to be fun for a user. Having this puzzle be about rescuing a cat from aliens wouldn't really change whether the puzzle part is fun. But a story can be used to hide clues so that solvers don't just feel like they're randomly trying things. For example, if this puzzle was involved in a story about "neighbors" and "cycles" somehow, that would've provided some clues as to how to attack it and would likely have received fewer downvotes. – Dan Russell Sep 22 '16 at 15:55
  • OP, consider adding more examples. – Buffer Over Read Sep 22 '16 at 16:43

2 Answers2

11

The encoded text is

example

And the method of encoding is

Strip spaces, then treat the full string as a cycle of text, each position in the encoded string is the sum of the two positions next to it in the unencoded string.

Example using "fair game"

e+a = f; f+i = o; a+r=s; i+g=p; r+a=s;g+m=t;a+e=f;m+f=s FOSPSTFS

Edited in, because what Matsmath is doing seems way more complicated than what I did. Below is the incredibly inelegant code I used to find the solution, and a single alternate candidate:

    for(var a=1;a<=26;a++)
     for(var b=1;b<=26;b++)
      for(var c=1;c<=26;c++)
       for(var d=1;d<=26;d++)
        for(var e=1;e<=26;e++)
         for(var f=1;f<=26;f++)
          for(var g=1;g<=26;g++)
           if((g+b)%26==3&&(e+g)%26==21&&(f+a)%26==17&&(f+d)%26==25&&(e+c)%26==17&&(d+b)%26==11&&(c+a)%26==6)
            console.log(a+','+b+','+c+','+d+','+e+','+f+','+g);
Sconibulus
  • 19,731
  • 1
  • 45
  • 114
  • Thank you. Would the first example be enough? I still don't understand the amount of downvotes – Yuriy S Sep 22 '16 at 13:56
  • @YuriyS The first example alone doesn't seem like enough. Figuring out what was happening with the edge pieces was pretty tough with the four instances I had. The downvotes may be because of how few examples there are, or possibly because the problem didn't seem interesting to some. – Sconibulus Sep 22 '16 at 14:04
  • Additionally, downvotes after this point may be because, even knowing the encoding, the answer isn't necessarily distinct; I also could have gotten 'rknzcyr' which I believe is the sound of a pokemon sneezing :) – Sconibulus Sep 22 '16 at 14:05
  • I have used Wolfram Alpha to check few instances, there are 128 possible answers, but most of them could be eliminated early on. Or all 128 could be checked quickly with a simple program – Yuriy S Sep 22 '16 at 14:07
  • Also, I literally used the word in the text of the question. – Yuriy S Sep 22 '16 at 14:09
  • @Sconibulus kudos to your answer. I only understood what is going on right now (as I kind of overlooked that there are a series of candidate solutions). – Matsmath Sep 22 '16 at 14:26
  • Observe that with your method (see code) you quickly run out of firing power once the raw text is a few 10 of letters (say 30). This issue does not arise if you directly solve the arising linear system of equations. Essentially, what you present here is a brute-force approach towards the problem, compared to mine where I exploit structural properties of the encoding algorithm. Complication means efficiency in this case, compared to simplicity which is quite inefficient for large inputs. – Matsmath Sep 22 '16 at 15:01
  • @Matsmath I know it won't work well for large texts, but I did something very differently in the encoding which brought me from the 26 possible solutions you found down to 2, which are essentially identical ROT13. – Sconibulus Sep 22 '16 at 15:06
1

@Sconibulus was (the first) who actually cracked the code, but I have had very hard time figuring out his reasoning.

So what you do is, you strip spaces, and then the i-th character in the raw text, x[i] will be replaced by the letter whose ASCII code is A(x[i-1])+A(x[i+1])-128, where A(.) denotes the ASCII code of a character.

Example:

f goes to the letter whose ASCII code is A("a")+A("e")-128=70, and capital F is the letter whose ASCII code A("F")=70.

So your task is now to decode CFKQYUQ. Let us denote the letters of the raw text by x[0]x[1]x[2]x[3]x[4]x[5]x[6]. You should solve the following set of equations, aiming for some sensible word:

A(x[6])+A(x[1])=128+A("C")=195 A(x[0])+A(x[2])=128+A("F")=198 A(x[1])+A(x[3])=128+A("K")=203 A(x[2])+A(x[4])=128+A("Q")=209 A(x[3])+A(x[5])=128+A("Y")=217 A(x[4])+A(x[6])=128+A("U")=213 A(x[5])+A(x[0])=128+A("Q")=209

It turns out, that this system of equations has a 1-dimensional solution (so you have one letter which can be any of the 26 small latin letters, and all other letters depend on its choice). This leads you to a set of 26 candidate words, of which the sole sensible answer is:

example.

Matsmath
  • 1,929
  • 2
  • 12
  • 30