黑箱多项式
find the values of all the coefficients
题目详情
有一个黑箱多项式 ,其系数都满足 (非负整数)。你可以在任意给定点查询 的值。
最少需要查询多少个点,才能确定全部系数?
英文原题
We consider a polynomial which all coefficients are positive . The polynomial is in a black box and we can only retrieve its value in given points. In how many points do we need to value the polynomial in order to find the values of all the coefficients?
解析
最少需要 个点。
构造方法:
- 查询 ,得到
于是每个系数都满足 。
- 再查询 。因为基数 严格大于每个“数字” ,所以
就是该整数在 进制下的唯一展开,其各位数字恰好是 。
因此两次查询即可恢复所有系数。
英文解析
The minimum number of points required is .
Construction method:
-
Query to obtain
Thus, each coefficient satisfies . -
Query . Since the base is strictly greater than each "digit",
represents the unique expansion of this integer in base , where the digits are exactly .
Therefore, all coefficients can be recovered with just two queries.