0%

Problem 674


Problem 674


Solving I-equations

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

For two I-expressions e1 and e2 such that the equation e1=e2 has a solution in non-negative integers, we define the least simultaneous value of e1 and e2 to be the minimum value taken by e1 and e2 on such a solution. If the equation e1=e2 has no solution in non-negative integers, we define the least simultaneous value of e1 and e2 to be 0. For example, consider the following three I-expressions:
A=I(x,I(z,t)) B=I(I(y,z),y) C=I(I(x,z),y)
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 I-expressions from A,B,C is 26.

Find the sum of least simultaneous values of all I-expressions pairs made of distinct expressions from file I-expressions.txt (pairs (e1,e2) and (e2,e1) are considered to be identical). Give the last nine digits of the result as the answer.


求解I-方程

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

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

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


Gitalking ...