Thursday, February 8, 2018

computer puzzle - Self-Description


Part of the Fortnightly Topic Challenge #35: Restricted Title 1




This text has ? l's and ? n's, but its ?th most frequent letter is f. This text also has ? letters that are used ? times or less. Its got thirty? uses of the letter it uses ?th most and equal amount of a's n's and i's. Now see each twelfth of the letters for your cluephrase.




? ----> {zero, one, two, three, ...}


?th ----> { , second, third, fourth, ...}


thirty? ----> {thirty, thirtyone, thirtytwo, ...}


?th most used ----> not tied



Answer




The corrected text is:



This text has twelve l's and thirteen n's, but its twelfth most frequent letter is f. This text also has sixteen letters that are used nine times or less. Its got thirtysix uses of the letter it uses second most and equal amount of a's n's and i's. Now see each twelfth of the letters for your cluephrase.



Which when taking the "twelfth of the letters", gives the clue phrase:



thistextistheanswer



So, I guess the final solution is:




the text itself, which of course is very fitting, given the title.





How I got there:



Since this puzzle was tagged , I wrote a simple script to count the number of each character in the text and make assertions about the expected count of each.

I was too lazy to write a fully automated solver, so instead I initially narrowed things down as follows:
+ There's 13 a's, and unlikely to be any more (you'd have to get to one thousand of something)
+ It's already stated that a == i == n, so they're all 13 too
+ Therefore the first line is thirteen n's
+ e and t were the only letters likely to finish as thirty-something, so the ?th most used was almost certainly going to be most used or second most used

From there I mostly worked using trial and error, but constrained further with a few more educated guesses:

+ given that we needed more ns than is (but more of both), I took a punt and guessed we needed the word nine somewhere, and got even luckier using it in the correct spot
+ the frequency of f was bound to around 11-13, so I was mostly trying with twelve (especially given that eleven/thirteen messed more with the n/i counts)
+ some of my trials pushed t up to 40, so I mostly assumed the thirty? referred to e and therefore the second most
+ ...I'm sure there were more minor logical adjustments, but I wasn't keeping note as I went...



No comments:

Post a Comment

classical mechanics - Moment of a force about a given axis (Torque) - Scalar or vectorial?

I am studying Statics and saw that: The moment of a force about a given axis (or Torque) is defined by the equation: $M_X = (\vec r \times \...