We define the operator as the function
and -expressions as arithmetic expressions built only from variable names and applications of . A variable name may consist of one or more letters. For example, the three expressions , , and are all -expressions.
For two -expressions and such that the equation has a solution in non-negative integers, we define the least simultaneous value of and to be the minimum value taken by and on such a solution. If the equation has no solution in non-negative integers, we define the least simultaneous value of and to be . For example, consider the following three -expressions:
The least simultaneous value of and is , attained for . On the other hand, has no solutions in non-negative integers, so the least simultaneous value of and is . The total sum of least simultaneous pairs made of -expressions from is .
Find the sum of least simultaneous values of all -expressions pairs made of distinct expressions from file I-expressions.txt (pairs and are considered to be identical). Give the last nine digits of the result as the answer.
Write-up coming later
The complete problem is available here. An approach, code, and answer will be added later.