Bill Allombert on Mon, 06 Nov 2023 21:11:34 +0100
|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: Testing numbers to see if they look algebraic
|
- To: pari-users@pari.math.u-bordeaux.fr
- Subject: Re: Testing numbers to see if they look algebraic
- From: Bill Allombert <Bill.Allombert@math.u-bordeaux.fr>
- Date: Mon, 6 Nov 2023 21:11:02 +0100
- Arc-authentication-results: i=1; smail; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; d=math.u-bordeaux.fr; s=openarc; t=1699301463; c=relaxed/relaxed; bh=WUm9bmFRRmPfu6tgnmpP/nm2IavJ5QovygAT1H98K64=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:Mail-Followup-To: References:MIME-Version:Content-Type:Content-Disposition: In-Reply-To; b=H8ORRS1d7U5S/NKrgQb7MHHzBJtG02yYk6RHVu/h72xe8WYfVzAWE0Hm2YjGr4/6ieC218/53leZvVYNctdwvN4p3Bv1pB79+FciEtzx+HgXfx76V4KVUABpmNvyBPNvEjkDTFTWF4SKrGl2MUfsdt/JZMasV/979A5RcvOfijMT8Q9JKF1NkIZT6Olv5U6CmTf5QlbaIIPpXZGH9iBfqkvd4SR9pTFevva5p7GUUdQ2nxDuazrjAUJXDPVy7EkQm70X6WPgLEWFbSg5TNh9OIIzAGwTc8t7gI8gEgYlwULbJcPC8UuZHnBbkqeDLbCBF8Y6SUHkkf9lND6/sE/pYuIcyljtaC3ElMSY+tKmilp/U3cvjtCt9QkKXUO68+v3okl/9ZBiLjDsh66/U8aOp27QKopURSQ8JqkwSNjGMBkCZiZACywx5OracxEmk5eQnMnmYtYSI4uChDBPwJTK2yWFp2dZkvvsBaFhM+vSodcerkowQjsdm0afbmshIoVbrYr9NJLwImNsgSsvplaOGYWm2otfnTIC7UIHBa81lPPCdGMzgBvSyhJ/ZSGsExRbnYFP9JrND+o9rIps2t3uLREaUrIcfhTKpiiPUrFrthzwrmq0/OjRGO/7OJOAOum2s4yrWJ0cRh/RDqLqjMWIRbOacDdhe4jY9S6yEg7PaXY=
- Arc-seal: i=1; a=rsa-sha256; d=math.u-bordeaux.fr; s=openarc; t=1699301463; cv=none; b=PnghslqyxWTEeXbjvQ3AcGiOdOcVEtQDXM41guKeha69mRNqIRjuQNswAIdS+JFuZADxFjTh8Xb4AJTB+5FBF70huMgilwt0YV3BYj6uz5JIN7p3jEqUDVib7mzdkQ4kuKl7/JdQsdJgCbEUDVqUxGwNPwHWxjkuy1UApNSAbr/4DhyIBi0J90JN1zeGWp8n1pv9AiNbbaUWmjSRT3vKjVBhsRTbHCp1bYYAYTrxK+FublUtspC3JUyrSwWmntJxqt97D4Tw2yyu1ICGGpHnGeOgw3niVlAbiZz9Z0Cv6aaHQgzEICHuMVmmYnE9qFhK6t8Kz0dK4RgwBOoouMMoKLBEpsI2nY/26OuP3wtDj/7/R6Q8xZBZTgta9qQestyVAwDyNzx4abPv3cIFLUsFRZxY4O/NFX5bfaDx/a86QYZsGYd7r00DXI5XK+USF+mt9Y5asC9JLwnlrGd7xPk2wyVwiwuZVJl+O/uZ/Pv3u7IAGrKpt6z9/hONOQaSA2V27+N+yLaXOc5tatj6IutjcAj/Wj5329t+5JIOc+bHtizKItD70fr+E/Enlc3E7n8Dsjk5dfFFDZGqYNyCnkhGVnfW+gnqBqeNAMDXoAJiqL84vx5omlTHv1n68kcmcT0Rf+R7wd5e29pEztiMMjta1gfEGRIpsKbowyqgv2eTpFA=
- Authentication-results: smail; arc=none
- Delivery-date: Mon, 06 Nov 2023 21:11:34 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=math.u-bordeaux.fr; s=2022; t=1699301463; bh=WUm9bmFRRmPfu6tgnmpP/nm2IavJ5QovygAT1H98K64=; h=Date:From:To:Subject:References:In-Reply-To:From; b=jsGD70TxWOVMeWZFO3cFmYaEfHKL4hkBppt5PKGU1iL2hUAufkDiYThOOCPqVwjOR n8DiWxI94N4HNJ1TIJs9xVp47XDKLSHE/83ucjh/gOzFabZhuBXSnsn8DO7xCsrDEJ nwFzU81hWH2hiuQmaBVPeYiRPacK69uVNfQHjQJCOsOvfvsksosOhBIXHjrom+VcQR WkRojt+Wc/eiewvFf2GmW7VznziZuuDIlGIK0OVGoq78t5Se20agZHal+8uCfYulUi GNK9kANbjpOJF82eV2ONCFghRrrnlQMVq0bbpsUeklObwApQDsWzcKhWbeoh+5zc0u 7P4WBlO+cjruHgU5WC9TDRP5C5y70FWh30I5IaYg5EfJgRZ45CKfFWMOJe0JzKjp1W g21xZQN9It5My1/vk7pi014acj+6I6CSVoY+xiGBnj+HX9lZnDBAhjVUI9CriFWyjt siSzK/x9HpwCZOvzF5sco3oQJXXewJkZ0qVD2MXB2sz8dfP+wy3We92wVaS61/yH3V WVXMEP3CZheZeFm8ysdH1bCJ8f4L6x+k1Z0DQliY5SqskUeazJIgZ/8yCIgKDL7iOC SCitHPd8MeQheumxyVlC+Nhv3fSPgm/1WcknyxkdN8j3V/36dJVC67slGIaBpxDaT9 9TB8NH21oJCuE0lBLCuiW1Rc=
- In-reply-to: <CANXmBjxo9TWd1cB_Q1PAN0hg5N-pDxxqwNnZQ1q+uxMLCFaOwQ@mail.gmail.com>
- Mail-followup-to: pari-users@pari.math.u-bordeaux.fr
- References: <CANXmBjxo9TWd1cB_Q1PAN0hg5N-pDxxqwNnZQ1q+uxMLCFaOwQ@mail.gmail.com>
On Mon, Nov 06, 2023 at 02:13:23PM -0500, Charles Greathouse wrote:
> It often happens that I'm looking to see if a number is algebraic, but I'm
> not sure what degree it might be or how complex the polynomial might be. I
> tend to run a loop like
>
> \p1000
> for(n=2,100, if(#Str(algdep(x, n)) < 750, print("Possibly algebraic of
> degree ", n)))
>
> adjusting the degrees, precision, and character tolerance
> (generrally 75-80% of the precision) as needed. If it finds something, I
> can eyeball the polynomial and replicate with higher precision (and
> possibly, depending on the definition of x, prove the relation).
>
> Is there a better way to do this sort of exploratory analysis? (Of course a
> more complicated version with lindep can search for versions with known
> transcendental constants as well.)
To improve it, one first need to understand why your method works.
Obviously if x is the root of a polynomial of degree n with small coefficients,
it is also the root of a polynomial of degree m with small coefficients for
all m>n. So why trying small n ?
>From a simple information-theoretic point of view, algdep can only guess
as much information as you give it, so if x is given with N bits, and you
set the degree to n, you can expect to find polynomials with coefficients
with around N/(n+1) bits. So by decreasing n, you increase the size of the potential
coefficients. However N/(n+1) decreases slowly, so you do not need to test each
possible value of n, but only a geometric sequence (with a small ratio like 1.1).
You can do
my(n=2);for(i=1,37,n+=max(1,n\10);algdep(x, n))
Instead of algdep, I often use lindep(concat(powers(x,n),exp(1)))
and check wether the coefficient of exp(1) is indeed 0!
? \p38
realprecision = 38 significant digits
? a=ellj((1+sqrt(-23))/2);
? lindep(concat(powers(a,3),exp(1)))
%2 = [-8358020684,858961064,-688165217,-197,-67040526]~ //obviously wrong
? \p100
realprecision = 115 significant digits (100 digits displayed)
? a=ellj((1+sqrt(-23))/2);
? lindep(concat(powers(a,3),exp(1)))
%4 = [12771880859375,-5151296875,3491750,1,0]~ // very likely to be correct
? polclass(-23)
%1 = x^3+3491750*x^2-5151296875*x+12771880859375
Cheers,
Bill.