CS 6104 : Solutions to Homework Assignment 4

July 9, 1998

Problem 1. [Solution Courtesy of Wen Wang]

Chapter 6, problem 9.


Suppose

eqnarray54

tex2html_wrap_inline524 if and only if:

  1. s=2t; and
  2. tex2html_wrap_inline528
That is,
1)
s=2t; and
2)
tex2html_wrap_inline532 .

If k is of characteristic 2, then the conditions are:

  1. s=2t
  2. For the coefficients:

    eqnarray70

If k is not of characteristic 2, then the conditions are:

1)
s=2t; and
2)
For the coefficients:

eqnarray88

That is,

eqnarray99

This requires that tex2html_wrap_inline542 be a square.

Hence, if k is of characteristic 2, f is a square in k((1/x)) if and only if deg(f) is even, and tex2html_wrap_inline552 . If k is not of characteristic 2, f is a square in k((1/x)) if and only if deg(f) is even, and the first coefficient is a square in k.


Problem 2. [Solution Courtesy of Craig Struble]

This problem is inspired by problem 13 in Chapter 6. For tex2html_wrap_inline564 , define

eqnarray112

where tex2html_wrap_inline566 is the Euler phi function.

  1. For what value of m, where tex2html_wrap_inline570 , is tex2html_wrap_inline572 maximized?
  2. More generally, for what values of m (as m goes from 1 to tex2html_wrap_inline578 ), does tex2html_wrap_inline572 reach new maxima? (A new maximum is an m such that tex2html_wrap_inline584 , whenever m';SPMlt;m.)
  3. Use methods from Chapter 2 to show Landau's result that tex2html_wrap_inline588 .
  4. Fix a prime p. Give an asymptotic lower bound on the probability that a randomly selected polynomial in tex2html_wrap_inline592 of degree n is primitive.


  1. The value at which tex2html_wrap_inline572 is maximized where tex2html_wrap_inline570 is

    eqnarray119

    Part B explains why this is the maximum value.

  2. Suppose tex2html_wrap_inline600 is the unique prime factorization of m. Equation (2.2) on page 23 of the text states

    eqnarray125

    Simplifying tex2html_wrap_inline572 ,

    eqnarray129

    The value of tex2html_wrap_inline572 depends only on the prime factors of m, regardless of their exponents. So, consider only values of m that are the product of unique primes. Each prime p contributes a factor of

    eqnarray141

    to tex2html_wrap_inline572 . Clearly, if x ;SPMlt; y, then tex2html_wrap_inline618 . So tex2html_wrap_inline572 is maximized by multiplying primes that are as small as possible; that is, tex2html_wrap_inline572 is maximized when m is the product of the first k primes, and the maximum changes when m is multiplied by the next prime. So, to find the value m that maximizes tex2html_wrap_inline572 when tex2html_wrap_inline634 , multiply consecutive primes tex2html_wrap_inline636 together until tex2html_wrap_inline638 .

  3. For this part, assume that tex2html_wrap_inline640 is the product of the first k primes. We see from Part B that

    eqnarray156

    To use the techniques in Chapter 2, we need to manipulate the product and find a sum that can be bounded. Consider writing

    eqnarray162

    where e is the exponential and tex2html_wrap_inline646 is a polynomial such that

    eqnarray166

    Hence,

    eqnarray172

    Using the laws of logarithms and Maclaurin expansion,

    eqnarray177

    So, tex2html_wrap_inline648 . Now tex2html_wrap_inline572 can be written as

    eqnarray198

    where N is a constant as defined for the O notation. Exponents add when multiplying powers together, so now we can apply techniques from Chapter 2. Begin by bounding the sum of the tex2html_wrap_inline656 terms.

    eqnarray214

    To bound the sum tex2html_wrap_inline658 , note that tex2html_wrap_inline660 converges. Thus the sum tex2html_wrap_inline658 also converges to a constant, call it D. Now, ignoring constant factors, we get

    eqnarray239

    One final step is necessary to reach our goal. How is tex2html_wrap_inline666 related to m? Consider tex2html_wrap_inline670 ,

    eqnarray248

    Hence, tex2html_wrap_inline588 .

  4. The number of monic primitive polynomials of degree n in tex2html_wrap_inline592 is

    displaymath257

    The total number of monic polynomials of degree n in tex2html_wrap_inline592 is tex2html_wrap_inline682 . So the probability of selecting a primitive polynomial of degree n in tex2html_wrap_inline592 is

    displaymath261

    In Part C, we gave an upper bound for tex2html_wrap_inline572 . Use this to obtain a lower bound for tex2html_wrap_inline690 .

    eqnarray266

    The probability is then bounded by

    eqnarray278


Problem 3. [Solution Courtesy of Degong Song]

Chapter 7, problem 4. Flesh out the solution in the back of the book.


From tex2html_wrap_inline692 (mod) 4 we get tex2html_wrap_inline696 . This means that the equation tex2html_wrap_inline698 does not have solution in tex2html_wrap_inline700 , so tex2html_wrap_inline702 .

From tex2html_wrap_inline704 and definition of tex2html_wrap_inline706 , we know

eqnarray297

where c and d can not be 0 simultaneously.

First we show that tex2html_wrap_inline714 if and only if c=d=0. Otherwise, assume tex2html_wrap_inline718 , then tex2html_wrap_inline720 and hence from tex2html_wrap_inline722 we see that tex2html_wrap_inline724 while tex2html_wrap_inline726 . This is in contradiction with tex2html_wrap_inline696 .

Thus, from

eqnarray311

and tex2html_wrap_inline730 , it is not difficult to verify that

eqnarray323

tex2html_wrap_inline706 (or tex2html_wrap_inline734 ) has tex2html_wrap_inline736 elements and it is an extension field of tex2html_wrap_inline700 with operation compatible to that of tex2html_wrap_inline700 . From book, any two finite fields with tex2html_wrap_inline736 elements are isomorphic, and from above discussion, one Model of tex2html_wrap_inline744 can be given as tex2html_wrap_inline706 .

Since tex2html_wrap_inline748 and tex2html_wrap_inline750 , we can use binary search to find a x such that tex2html_wrap_inline754 , tex2html_wrap_inline756 and tex2html_wrap_inline758 . The algorithm for doing this is given bellow (in the algorithm, legendre[x,p] means tex2html_wrap_inline760 ):

          procedure FindX(left,right)
          { 
                if(right-left=1)
                       return left;
                mid=Floor[(left+right)/2];
                if(legendre[mid,p]=1)
                       return FindX(mid,right);
                else
                       return FindX(left,mid);
          }

We use FindX(1,p-1) to call the program and get x.

Use power algorithm and tex2html_wrap_inline766 (mod p), the time complexity to get tex2html_wrap_inline760 is tex2html_wrap_inline772 bit operation. Due to binary search, there will be tex2html_wrap_inline774 such operations. After considering all the other operations, the complexity to find this x using above algorithm is tex2html_wrap_inline778 .

Using the above x, we can construct a non-square element in tex2html_wrap_inline744 . The fact that tex2html_wrap_inline756 and

eqnarray356

tell us that both x and -(x+1) have root in tex2html_wrap_inline700 . Noting that p=3 mod 4, from Corollary 7.1.2, we have

eqnarray365

and

eqnarray368

and these u and v can be computed using tex2html_wrap_inline772 bit operation.

Now, the element u+vi must be a non-square element in tex2html_wrap_inline744 . Otherwise, there exists a+bi with tex2html_wrap_inline808 such that

eqnarray375

which implies tex2html_wrap_inline810 , v=2ab, and hence

eqnarray377

On the other hand, from tex2html_wrap_inline814 , tex2html_wrap_inline816 we see that tex2html_wrap_inline818 . This together with above equation implies tex2html_wrap_inline820 . Since tex2html_wrap_inline822 , we get tex2html_wrap_inline824 . This is in contradiction with tex2html_wrap_inline696 .

Any square roots in tex2html_wrap_inline744 can be computed using Tonelli's algorithm. Tonelli's algorithm is nondeterministic only because it randomly chooses an element tex2html_wrap_inline830 and hope it is not a square (and thus it will be a generator). Now that we have found a non-square element u+vi in tex2html_wrap_inline744 using above procedure, we can use this u+vi as g in Tonelli's algorithm. In this situation, Tonelli's algorithm would become deterministic.

The time complexity for computing u+vi is tex2html_wrap_inline842 bit operation. The running time for the modified Tonelli's algorithm is also tex2html_wrap_inline842 bit operation (cf. Theorem 7.1.3). So, the total running time for computing square roots in tex2html_wrap_inline744 using this method is tex2html_wrap_inline842 bit operation. So, it is deterministic polynomial time.




cs6104 class account
Thu Jul 9 13:54:33 EDT 1998