Functional Analysis - Solution

Written by Justin Yokota

Answer: LISP MACHINE

The puzzle is presented as an interactive submission box, where nonnegative inputs are accepted. After this is a "final exam" box.

Experimenting with the main puzzle shows that when submitting a number, the submission box responds with an equation, and a result. The equation is directly related to the number provided, and uses 10 different black box functions; for example, the number 904 yields the equation (round(f9 (f0 (f4 (904))))), and the result of evaluating that equation. Leading zeros are stripped from numbers provided, though 0 is a valid input. Furthermore, if at any point after the first function the number in consideration exceeds 100 digits or becomes negative, the input is rejected with an appropriate error message. Some other functions reject certain values, and provide a generic "The input was rejected" result.

Using this, the goal is to determine what the functions are. Several strategies can be used to solve this; each ends up going through a slightly different solve path:

Strategy 1: Try repdigits (111, 222222, etc.) to see how single functions work. This tends to be an easy start point, and gives f8, f7, and f4 easily.

Strategy 2: Try to check big results through Wolfram|Alpha or some similar software. This ends up finding f1 and f0 first.

Strategy 3: Use f9 as if the function is the identity (since it acts as an identity for 4-digit numbers or less). This tends to be an accidental strategy used (since f9 looks very much like an identity), but ends up finding f9 early, since it is possible to realize that f9 isn't an identity early.

The functions are as follows:

f0: Append "19" to the beginning of the function.

f1: Take the 9th power.

f2: Take 3 to the nth power, where n is the input.

f3: Divide by 14.

f4: Multiply by 13.

f5: Take the 5th root.

f6: Take log with base 8. This rejects input 0.

f7: Add 16.

f8: Subtract 1.

f9: Rotate the digits by 12. This rejects inputs with fractional components.

At this point, it is possible to work on the final. The final asks for the smallest number that yields 100329695502969311279468679588205363492144732138. The following is a strategy on how to solve the final part.

The number output isn't very nice, but if you undo a rotation, you get the number 1991239; this implies that the number starts with 91. Since there is a "19", it's reasonable to try a 0 next, so we get fx(910x) = 9123 (Noting that the first digits of this number already match with our first functions). Checking the functions that don't change the number much gives 9107.

Upon solving this question, we receive a second question; find seven functions such that 563949338624 is converted into 6908720, with integer results in between each function.

Note that the input is 2245. This implies that the innermost function is f5.

Since 224 is divisible by 14, we can see that f3 is a reasonable next step.

On the other side, the output is divisible by 13. Since it's divisible by 13, we can guess that the outermost function is f4. This gives 531440, which is 312 - 1; this implies that the next two functions are f8 and f2. This leaves a gap of two functions which take a number from 16 to 12. Trial and error (or noticing that log8 would work nicely with the powers of 2 we have there) shows that we can do log8(169) = 12.

Thus, the answer here is 4826135.

Note that each function has an associated number between 1 and 26 (f0, for instance, has "19"). If we convert those numbers to letters, and order by the two answers of the final, we get the answer LISP MACHINE.

Question 19107
Number1291916
LetterLISP
Question 24826135
Number131389145
LetterMACHINE

Note: The statement of the question suggests trying 904, since that's one of the first numbers that yields a 5-digit result before using 9. This is in order to show that 9 is not the identity.