Y by sixoneeight, qwedsazxc
Let
be the set of all non-empty sub-strings of "Socrates".
Thus, "Soc", "crates"
but "teS", "sorat", "setarcoS"
.
Define the sum of two strings
and
as follows: take the string with the first term that appears first in "Socrates" (if both have the same first term, take the shorter one) and WLOG let it be
. Then the sum of these two strings will be the string formed by all the letters between the first term of
and the last term of
. For instance, "Socr" + "te"
"Socrate" and "cra" + "ates"
"crates".
Find all functions
such that

for all
.
Bonus. What if we change "Socrates" to a string assumed to be of an arbitrary natural number length, with distinct letters (or symbols, if we need more)? The range
is still the same.

Thus, "Soc", "crates"


Define the sum of two strings







Find all functions


for all

Bonus. What if we change "Socrates" to a string assumed to be of an arbitrary natural number length, with distinct letters (or symbols, if we need more)? The range

This post has been edited 1 time. Last edited by Jia_Le_Kong, Jul 29, 2023, 3:40 AM
Reason: typo
Reason: typo