I have written down a polynomial function . The only thing you know about is that it is of finite degree and has non-negative integer coefficients.
If you give me an integer , I will tell you . What is the fewest number of integers you must give me in order to guarantee that you can determine exactly?
This problem was more or less taken exactly from the facebook group "actually good math problems". The solution I'll post was first given by Malwande Nkonyane.
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Write f ( x ) in the form
f ( x ) = i = 0 ∑ n a i x i
First, ask for f ( 1 ) . Say that f ( 1 ) = k . It follows that the sum of these coefficients a i must be equal to k , and since they are all non-negative, no one of these coefficients will exceed k . Hence, a i ≤ k for all i = 0 , 1 , … , n
Now, let z be the smallest positive integer such that 1 0 z > k , and ask for f ( 1 0 z ) Then the coefficients of f ( x ) are exactly what you get by dividing f ( 1 0 z ) up into strings of length z starting from the right. This is enough then to determine f ( x ) exactly.
As an explicit example, consider f ( x ) = 1 7 x 6 + 3 x 4 + 4 7 x 3 + 1 1 x 2 + x + 9 . We have that f ( 1 ) = 8 8 . We then know that none of the coefficients exceed 1 0 0 , and so each coefficient contains at most two digits. Then, we ask for f ( 1 0 0 ) = 1 7 0 0 0 3 4 7 1 1 0 1 0 9 . Splitting this up into blocks of two from the right gets us the following:
0 9 , 0 1 , 1 1 , 4 7 , 0 3 , 0 0 , 1 7
And so the coefficients of f ( x ) are then
a 0 = 9 , a 1 = 1 , a 2 = 1 1 , a 3 = 4 7 , a 4 = 3 , a 5 = 0 , a 6 = 1 7
And we then reconstruct f ( x ) = 1 7 x 6 + 3 x 4 + 4 7 x 3 + 1 1 x 2 + x + 9
For a more in-depth explanation as to why this works, it comes down to when we said that f ( x ) contained non-negative integer coefficients. This is what allowed us to say that if f ( 1 ) = k , then a i ≤ k for each a i .
Going through the rest of the process a bit more carefully, note that if z is the least positive integer such that 1 0 z > k , then k contains z digits in its decimal representation. Since a i < k , it follows that each a i has at most z digits in their respective decimal representations.
The other important thing is that when we asked for f ( 1 0 z ) , we got that
f ( 1 0 z ) = i = 0 ∑ n a i 1 0 z i = a 0 + i = 1 ∑ n a i 1 0 z i = a 0 + 1 0 z [ i = 1 ∑ n a i 1 0 z ( i − 1 ) ]
Now, the sum in the rightmost equality will evaluate to an integer, and so after multiplying by 1 0 z , we get that there are at least z trailing zeroes at the end of the sum. Now, a 0 ≤ 1 0 z , and thus the last z digits of f ( 1 0 z ) must be exactly a 0 . We then continue this process to get the remaining coefficients.