Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download

All published worksheets from http://sagenb.org

Views: 168755
Image: ubuntu2004

Algebraic Number Theory

MAA PREP Workshop, Summer 2010


Extending Problem 3 of the Computational Excercises: Possible Explorations


Introduction to Sage, Pari, Class Numbers, Discriminants, and Continued Fractions

 


Problem 3: Examining the relationship between the class number, discriminant, and regulator.

The following code uses pari commands to generate a vectors of discriminant, class number, and regulator values for Q(sqrt{d}) for various values of d. 

  • LN is the list of class numbers for the first 100 negative values of d congruent to 2 or 3 mod 4
  • LN1 is the list of class numbers for the first 100 negative values of d congruent to 1 mod 4
  • LP is the list of class numbers for the first MP positive, square-free values of d congruent to 2 or 3 mod 4
  • LP1 is the list of class numbers for the first MP1 negative values of d congruent to 1 mod 4
  • RN is the list of regulators for the first 100 negative values of d congruent to 2 or 3 mod 4
  • RN1 is the list of regulators for the first 100 negative values of d congruent to 1 mod 4
  • RP is the list of regulators for the first MP positive, square-free values of d congruent to 2 or 3 mod 4
  • RP1 is the list of regulators for the first MP1 negative values of d congruent to 1 mod 4
  • XN is the list of discriminants for the first 100 negative values of d congruent to 2 or 3 mod
  • XN1 is the list of discriminants for the first 100 negative values of d congruent to 1 mod 4
  • XP is the list of discriminants for the first MP positive, square-free values of d congruent to 2 or 3 mod 4
  • XP1 is the list of discriminants for the first MP1 negative values of d congruent to 1 mod 4
pari("c=0"); pari("l=[]"); pari("x=[]"); pari("m=0"); pari("r=[]"); for i in range(0,50): pari("d=4*c+2"); pari("D=4*d"); pari("if(issquarefree(d),l=concat(l,quadclassunit(D)[1]);x=concat(x,D);r=concat(r,quadclassunit(D)[4]);m=m++))"); pari("d=4*c+3"); pari("D=4*d"); pari("if(issquarefree(d),l=concat(l,quadclassunit(D)[1]);x=concat(x,D);r=concat(r,quadclassunit(D)[4]);m=m++))"); pari("c=c++"); LP=pari("l"); XP=pari("x"); MP=pari("m"); RP=pari("r"); pari("d=1"); #don't want to start at 0, calls 1 squarefree, but not viable D. pari("l=[]"); pari("x=[]"); pari("m=0"); pari("r=[]"); for i in range(1,100): pari("D=4*d+1"); pari("if(issquarefree(D),l=concat(l,quadclassunit(D)[1]);x=concat(x,D);r=concat(r,quadclassunit(D)[4]);m=m++)"); pari("d=d++"); LP1=pari("l"); XP1=pari("x"); MP1=pari("m"); RP1=pari("r"); pari("d=0"); pari("l=[]"); pari("x=[]"); pari("r=[]"); for i in range(0,50): pari("l=concat(l,quadclassunit(-16*d-4)[1])") pari("r=concat(r,quadclassunit(-16*d-4)[4])") pari("x=concat(x,-16*d-4)") pari("l=concat(l,quadclassunit(-16*d-8)[1])") pari("r=concat(r,quadclassunit(-16*d-8)[4])") pari("x=concat(x,-16*d-8)") pari("d=d++") LN=pari("l"); XN=pari("x"); RN=pari("r"); pari("d=1"); pari("l=[]"); pari("x=[]"); pari("r=[]"); for i in range(1,100): pari("l=concat(l,quadclassunit(-4*d+1)[1])") pari("r=concat(r,quadclassunit(-4*d+1)[4])") pari("x=concat(x,-4*d+1)") pari("d=d++") LN1=pari("l"); XN1=pari("x"); RN1=pari("r");

Class Number vs. Discriminant

d = 1 mod 4 (plotted in red); d = 2,3 mod 4 (plotted in blue)

point([(XP1[i],LP1[i]) for i in range(0,(MP1))],color='red')+point([(XP[i],LP[i]) for i in range(0,(MP))])+point([(XN1[i],LN1[i]) for i in range(0,99)],color='red')+point([(XN[i],LN[i]) for i in range(0,99)])

Regulator vs. Discriminant

d = 1 mod 4 (plotted in red); d = 2,3 mod 4 (plotted in blue)

point([(XP1[i],RP1[i]) for i in range(0,(MP1))],color='red')+point([(XP[i],RP[i]) for i in range(0,(MP))])+point([(XN1[i],RN1[i]) for i in range(0,99)],color='red')+point([(XN[i],RN[i]) for i in range(0,99)])

Observations:

Appears to be an interesting logarithmic(?) bound to the minimum possible regulator value as a function of d for d>0.  Examined further below.

Using Continued Fractions to Determine a Lower Bound on the Regulator R for Real Quadratic Fields

pari("d=[]"); pari("a=[]"); pari("m=2"); pari("cnt=0"); for i in range(0,800): pari("if(!issquare(m),L=contfrac(sqrt(m));d=concat(d,m);cnt=cnt++;a=concat(a,(L[1]*L[2]+1+L[2]*sqrt(m))))"); pari("m=m++"); ab=pari("a"); dp=pari("d"); CNT=pari("cnt"); pari("cnt")
773
  • ab is the value a+b(sqrt(d)) where a/b is the approximation of sqrt(d) from the first two terms of the continued fraction representation of sqrt(d)
point([(dp[i],ab[i]) for i in range(0,(CNT-1))])

a+bsqrt(d) vs. d

pari("d=[]"); pari("a=[]"); pari("m=2"); pari("cnt=0"); for i in range(0,800): pari("if(issquarefree(m),L=contfrac(sqrt(m));d=concat(d,m);cnt=cnt++;a=concat(a,(L[1]*L[2]+1+L[2]*sqrt(m))))"); pari("m=m++"); lb=pari("a"); D=pari("d"); CNT=pari("cnt"); for i in range(0,(CNT-1)): if D[i]%4==1: lb[i]=(1/2)*lb[i]; else: D[i]=4*D[i];
  • lb is the possible lower bound for the fundamental unit in the ring of integers of Q(sqrt(d))
    • a/b is the approximation of sqrt(d) from the first two terms of the continued fraction representation
    • lb=(a+b(sqrt(d)))/2 if d=1 mod 4
    • lb=a+b(sqrt(d)) if d=2 or 3 mod 4
point([(D[i],lb[i]) for i in range(0,(CNT-1))])

lower boud for the fundamental unit of the ring of integers for Q(sqrt(d)) vs. the discriminant D

Possible Resource: An Investigation of Bounds for the Regulator of Quadratic Fields (Jacobson, Lukes, Williams, Exp. Mathematics, Vol 4 (1995) No 3)

 

 

Examining the relationship between the number of prime factors of the discriminant and the power of 2 dividing the class number.

  • FDN = list of # of prime factors of the discriminant for various negative values of d
  • FDP = list of # of prime factors of the discriminant for various positive values of d
  • P2hN = highest power of 2 dividing the class number for various negative values of d
  • P2hP = highest power of 2 dividing the class number for various positive values of d
n=MP1+MP; point([(FDP[i],P2hP[i]) for i in range(0,n)])

d > 0:  Highest power of 2 dividing the class number (y-axis) vs. Number of prime factors of the determinant (x-axis)

point([(FDN[i],P2hN[i]) for i in range(0,197)])

d < 0:  Highest power of 2 dividing the class number (y-axis) vs. Number of prime factors of the determinant (x-axis)