//------------------------------// // Puzzle 17: QuibbleFic Part II (The Cursèd Code) // Story: School of Logic: a Collection of Puzzles involving the Student Six // by Coyotek4 //------------------------------// Having mastered the puzzles of the bears and wolves, Daring Do found herself in the final chamber before escape and total freedom. However, it was the most heinous of traps, which nopony before her had ever solved: the Chamber of the Cursèd Code. Sandbar looks up from the hoofwritten outline and turns to Rainbow Dash. “Quibble Pants wrote all this?” “All sixty-four pages,” Rainbow laments. “I can appreciate the effort, but there’s a lot better work out there?” “Like yours?” Gallus asks “Exactly … I mean, yeah, there’re so many others that … you know … are better handled to …” Not wanting to continue watching her professor writhe in mental agony, Ocellus refocuses back to the story, reading aloud for those unable to crowd around the desk: Daring observes the room, her body shivering at the shattered bones of so many previous adventurers strewn about the room. Shaking off the macabre images of those unfortunate souls, she catches sight of a large bin containing … children’s blocks? ‘A strange medium’, she thinks to herself when musing about the inner-workings of the mind of the logitaur. ‘What to do with these’ … but the notes she had acquired had already prepared her for this final challenge. In a recess of the far wall, she makes out some sort of contraption, with a shelf capable of holding a number of the small blocks, but an ominous nozzle from some sort of weapon pointing directly at where one would have to stand to place said blocks. ‘Looks like the others also had only one attempt at this’, she ponders as she pulls the notes from her bag. “If X represents any sequence of blocks, then LXR will lead to X. Further, if X leads to Y, then note the following: KX leads to YL, QX leads to YR, DX leads to Y ‘doubled’, and CX leads to Y ‘curtailed’ … find the sequence that leads to itself.” ‘Find the sequence that leads to itself’ … she repeats the phrase over and over, pondering how to crack this infernal code … Ocellus looks up. “That’s it? Where’s the rest of it?” “Quibble didn’t send me the rest … all he cares about right now is that this final puzzle he created has a unique solution.” The students turn to each other quizzically. “What would he care about that for?” Smolder asks. “Probably still bitter about the last time he came across a puzzle like this.” “You mean, like in another book or something?” “Uh, yeeeah, something like that,” Rainbow replies to Sandbar, careful not to mention the true ‘something’. “He’s something of a picky perfectionist. So anyway, can you guys help?” The students take another look at the page containing the puzzle’s description. “Yona confused.” “I have some experience with this, so I can demonstrate.” “Really?” Gallus asks. “You read the same puzzle books as this friend of yours?” “Uh, again, something like that,” Rainbow carefully replies before going to the board and fitting a hoof-glove with a piece of chalk cradled within, allowing her to speak as she writes. “So ‘X’ and ‘Y’ each mean any sequence of letters. If we take the word PONY, for example, the first line means that LPONYR would return PONY. It’s like a machine, where LPONYR is the thing you put in and PONY is the thing you get out.” “So it’s basically a function, where LPONYR is the input and PONY is the output,” Ocellus states. “Yeah, sure, if that helps. So like, that works for anything that starts with ‘L’ and ends with ‘R’. So LYAKR would return YAK, LDRAGONR would return DRAGON, and so on.” “OK, Yona less confused.” “What about the other lines,” Silverstream asks. “The other lines all begin with knowing some in-and-out pair, like LPONYR and PONY. Putting a ‘K’ before the former returns the latter with an ‘L’ at the end, so KLPONYR would return PONYL. Also, KLYAKR would return YAKL, and … you get the idea.” “And the same for ‘Q’, right?” Ocellus asks. “So, QLPONYR would return PONYR?” “Hey, you catch on quick … guess I shouldn’t be surprised about that by now, should I?” “What about the other lines?” Gallus asks. “ ‘Doubled’ means repeated, so DLPONYR would return PONYPONY. And ‘curtailed’ means cutting off the end, so CLPONYR would return PON.” “And you can combine those later lines, right?” Ocellus continues. “So, QKLPONYR would return PONYLR, and DQKLPONYR would return PONYLRPONYLR, and CDQKLPONYR would return PONYLRPONYL, and …” She catches herself before going any further. “So what’s the point of all this?” Smolder asks. “ ‘Find the sequence that leads to itself’ … Daring Do has to find a sequence that returns the same sequence you put in.” “So, the output matches the input: it’s a ‘fixed point’, right?” Ocellus asks. “Exactly!” Rainbow exclaims, hiding her own confusion regarding those terms. “Professor?” Gallus asks, “Who would want to pick up an adventure novel just to solve puzzles?” Rainbow shrugs. “It takes all kinds, I guess. So can you guys help?” The group ponder the puzzle for some time …