44.857916979223228313and tell you that it is a linear combination (with small integer coefficients) of pi, e, sqrt(2), and 1/3. How can you figure out which combination it is? You can try all combinations (brute force), or you can use the LLL algorithm. In Maple, I ran the LLL algorithm on the vectors
(1, 0, 0, 0, 0, 44857916979223228313) (0, 1, 0, 0, 0, 3141592653589793238) (0, 0, 1, 0, 0, 2718281828459045235) (0, 0, 0, 1, 0, 1414213562373095048) (0, 0, 0, 0, 1, 333333333333333333)so see if there is a small vector that is a linear combination of these. The last column is our unknown number, followed by pi, e, sqrt(2), and 1/3, all multiplied by 10^18. If there is a combination such that our unknown number is a* pi + b*e + c*sqrt(2) +d/3, then the vector
(-1, a, b, c, d, r), where -(a+b+c+d) < r < a+b+c+d, will be a linear combination of the above. The number r comes from the fact that all of our numbers are rounded to the nearest integer - if our numbers were exact, the remainder r would come out to 0.
When I run the command
LLL( [[1, 0, 0, 0, 0, 44857916979223228313],
[0, 1, 0, 0, 0, 3141592653589793238],
[0, 0, 1, 0, 0, 2718281828459045235],
[0, 0, 0, 1, 0, 1414213562373095048],
[0, 0, 0, 0, 1, 333333333333333333]], integer );
in maple, I get the result
[[-1, 13, 17, -23, -29, 15], [-498, -5998, 14687, -2253, 13336, 10791], [-1664, 22849, 6691, -16428, 23718, -6835], [2435, -8982, -17821, -23307, 1177, -5291], [-1344, -5957, 29683, -1528, 1433, -28088]]This indicates that the linear combination we seek is
13 pi + 17 e - 23 sqrt(2) - 29/3since all the other linear combinations have much greater coefficients (the first 5 numbers in the vector), a much greater error (the last number), and don't add up to the unknown, they add up to (for example) 498 times the unknown.
We can apply this same technique to the root of a polynomial, to reconstruct the polynomial it is a root of. If we take the root
1.00668604051535783840of the polynomial
248 x^9 + 321 x^4 - 593we can reconstruct the polynomial by finding a small linear combination of the powers 1,r,r^2, r^3, ... , r^9 of this root that is close to 0.
When we use the LLL algorithm to do this, using the first 20 digits of this root, we get polynomials like:
-4 x^9 + 93 x^8 + 77 x^7 - 6 x^6 + 22 x^5 - 94 x^4 - 20 x^3 - 46 x^2 - 17 x = 0This is because this polynomial, with smaller coefficients than the one we started with, is as good an approximation to the root given with 20 digits of accuracy as our original polynomial. Since the LLL algorithm finds the smallest linear combination that adds to near 0, it finds this smaller polynomial rather than the one we are looking for.
To find our original polynomial, we have to give the root with enough accurracy so that no smaller polynomial is a better approximation to it than the true polynomial. The way to find out how many digits are needed is to consider the amount of information (amount of entropy) contained in this root. To find a polynomial with 10 coefficients, each with 3 digits (even though most of them are 0, we have to assume they all could be as big as the biggest coefficient), we need to specify at least 30 digits worth of information. Any less, and there will be plenty of polynomials with 10 3-digit coefficients that agree on those first 20 or 25 digits, and some with smaller coefficients. So let's try again with the 40-digit root:
1.006686040515357838400125905955761614834In this case, we get the polynomial
248 x^9 + 321 x^4 - 593back, and the next smallest polynomial that is as close to the root is
-1016 x^9 - 4096 x^8 + 7145 x^7 - 3627 x^6 + 955 x^5 - 1800 x^4 + 6152 x^3 + 5528 x^2 - 9425 x + 212 = 0Notice that this polynomial has about 40 digits worth of coefficients, about the same amount as number of digits we gave of the root.