0%

Problem 674


Problem 674


Solving $\mathcal{I}$-equations

We define the $\mathcal{I}$ operator as the function
$$\mathcal{I}(x,y) = (1+x+y)^2+y-x$$
and $\mathcal{I}$-expressions as arithmetic expressions built only from variables names and applications of $\mathcal{I}$. A variable name may consist of one or more letters. For example, the three expressions $x$, $\mathcal{I}(x,y)$, and $\mathcal{I}(\mathcal{I}(x,ab),x)$ are all $\mathcal{I}$-expressions.

For two $\mathcal{I}$-expressions $e_1$ and $e_2$ such that the equation $e_1=e_2$ has a solution in non-negative integers, we define the least simultaneous value of $e_1$ and $e_2$ to be the minimum value taken by $e_1$ and $e_2$ on such a solution. If the equation $e_1=e_2$ has no solution in non-negative integers, we define the least simultaneous value of $e_1$ and $e_2$ to be $0$. For example, consider the following three $\mathcal{I}$-expressions:
$$\begin{array}{l}A = \mathcal{I}(x,\mathcal{I}(z,t))\
B = \mathcal{I}(\mathcal{I}(y,z),y)\
C = \mathcal{I}(\mathcal{I}(x,z),y)\end{array}$$
The least simultaneous value of $A$ and $B$ is $23$, attained for $x=3, y=1, z=t=0$. On the other hand, $A=C$ has no solutions in non-negative integers, so the least simultaneous value of $A$ and $C$ is $0$. The total sum of least simultaneous pairs made of $\mathcal{I}$-expressions from ${A,B,C}$ is $26$.

Find the sum of least simultaneous values of all $\mathcal{I}$-expressions pairs made of distinct expressions from file I-expressions.txt (pairs $(e_1,e_2)$ and $(e_2,e_1)$ are considered to be identical). Give the last nine digits of the result as the answer.


求解$\mathcal{I}$-方程

定义算子$\mathcal{I}$为函数
$$\mathcal{I}(x,y) = (1+x+y)^2+y-x$$
而$\mathcal{I}$-表达式为仅由变量和应用$\mathcal{I}$算子于变量所构成的算术表达式。变量名可以包含一个或多个字母。例如,如下三个表达式$x$、$\mathcal{I}(x,y)$和$\mathcal{I}(\mathcal{I}(x,ab),x)$都是$\mathcal{I}$-表达式。

若对于两个$\mathcal{I}$-表达式$e_1$和$e_2$,方程$e_1=e_2$有非负整数解,则记$e_1$和$e_2$的最小共值为所有上述方程的非负整数解下$e_1$和$e_2$所能取得的最小值。如果该方程没有非负整数解,则记$e_1$和$e_2$的最小共值为$0$。例如,考虑下面这三个$\mathcal{I}$-表达式:
$$\begin{array}{l}A = \mathcal{I}(x,\mathcal{I}(z,t))\
B = \mathcal{I}(\mathcal{I}(y,z),y)\
C = \mathcal{I}(\mathcal{I}(x,z),y)\end{array}$$
$A$和$B$的最小共值为$23$,在$x=3, y=1, z=t=0$时取得;而$A=C$没有非负整数解,因此$A$和$C$的最小共值为$0$。${A,B,C}$中任意两对表达式的最小共值之和为$26$。

在文本文件I-expressions.txt所包含的所有$\mathcal{I}$-表达式中,求任意两对表达式的最小共值之和(注意$(e_1,e_2)$和$(e_2,e_1)$是相同的一对表达式),并给出其最后九位数字作为你的答案。