Prime Numbers

Prime Numbers Prime Numbers

thales.doa.fmph.uniba.sk
from thales.doa.fmph.uniba.sk More from this publisher
10.12.2012 Views

9.7 Exercises 529 9.49. In the FFT literature there exists an especially efficient real-signal transform called the Sorenson FFT. This is a split-radix transform that uses √ 2 and a special decimation scheme to achieve essentially the lowestcomplexity FFT known for real signals; although in modern times the issues of memory, machine cache, and processor features are so overwhelming that sheer complexity counts have fallen to a lesser status. Now, for the ring Zn with n =2 m + 1 and m a multiple of 4, show that a square root of 2 is given by √ 2=2 3m/4 − 2 m/4 . Then, determine whether a Sorenson transform modulo n canbedonesimply by using what is now the standard Sorenson routine but with √ 2 interpreted as above. (Detailed coding for a Sorenson real-signal FFT is found in [Crandall 1994b].) 9.50. Study the transform that has the usual DFT form Xk = N−1 j=0 xjh −jk , except that the signal elements xj and the root h of order N exist in the field Q √ 5 . This has been called a number-theoretical transform (NTT) over the “golden section quadratic field,” because the golden mean φ = √ 5 − 1 /2 is in the field. Assume that we restrict further to the ring Z[φ] so that the signal elements and the root are of the form a + bφ with a, b integers. Argue first that a multiplication √ in the domain takes three integer multiplies. Then consider the field Fp 5 and work out a theory for the possible length of such transforms over that field, when the root is taken to be a power of the golden mean φ. Then, consider the transform (N is even) Xk = N/2−1 j=0 H −jk xj where the new signal vector is xj =(aj,bj) and where the original signal component was xj = aj + bjφ in the field. Here, the matrix H is 1 H = 1 1 . 0 Describe in what sense this matrix transform is equivalent to the DFT definition preceding, that the powers of H are given conveniently in terms of Fibonacci numbers H n Fn+1 Fn = , Fn Fn−1 and that this n-th power can be computed in divide-and-conquer fashion in O(ln n) matrix multiplications. In conclusion, derive the complexity of this matrix-based number-theoretical transform.

530 Chapter 9 FAST ALGORITHMS FOR LARGE-INTEGER ARITHMETIC This example of exotic transforms, being reminiscent of the discrete Galois transform (DGT) of the text, appears in [Dimitrov et al. 1995], [Dimitrov et al. 1998], and has actually been proposed as an idea for obtaining meaningful spectra—in a discrete field, no less—of real-valued, real-world data. 9.51. Pursuant to Algorithm 9.5.22 for cyclic convolution, work out a similar algorithm for negacyclic integer convolution via a combined DGT/DWT method, with halved run length, meaning you want to convolve two real integer sequences each of length D, via a complex DGT of length D/2. You would need to establish, for a relevant weighted convolution of length D/2, a (D/2)-th root of i in a field F p 2 with p a Mersenne prime. Details that may help in such an implementation can be found in [Crandall 1997b]. 9.52. Study the so-called Fermat number transform (FNT) defined by Xk = D−1 j=0 xjg −jk (mod fn), where fn =2 n + 1 and g has multiplicative order D in Zn. A useful choice is g a power of two, in which case, what are the allowed signal lengths D? The FNT has the advantage that the internal butterflies of a fast implementation involve multiply-free arithmetic, but the distinct disadvantage of restricted signal lengths. A particular question is: Are there useful applications of the FNT in computational number theory, other than the appearance in the Schönhage Algorithm 9.5.23? 9.53. In such as Algorithm 9.5.7 one may wish to invoke an efficient transpose. This is not hard to do if the matrix is square, but otherwise, the problem is nontrivial. Note that the problem is again trivial, for any matrix, if one is allowed to copy the original matrix, then write it back in transpose order. However this can involve long memory jumps, which are not necessary, as well as all the memory for the copy. So, work out an algorithm for a general in-place transpose, that is, no matrix copy allowed, trying to keep everything as “local” as possible, meaning you want in some sense minimal memory jumps. Some references are [Van Loan 1992], [Bailey 1990]. 9.54. By analyzing the respective complexities of the steps of Algorithm 9.5.8, (1) show that the complexity claim of the text holds for calculating X ′ k ; (2) give more precise information about the implied big-O constant in the bound 9.24; and (3) prove the inequality (9.25); and 4) explain how the inequality leads to the claimed complexity estimate for the algorithm. The interested reader might investigate/improve on the clever aspect of the original Dutt–Rokhlin method, which was to expand an oscillation eicz in a Gaussian series [Dutt and Rokhlin 1993]. There have 9.55. Rewrite Algorithm 9.5.12 to employ balanced-digit representation (Definition 9.1.2). Note that the important changes center on the carry

9.7 Exercises 529<br />

9.49. In the FFT literature there exists an especially efficient real-signal<br />

transform called the Sorenson FFT. This is a split-radix transform that<br />

uses √ 2 and a special decimation scheme to achieve essentially the lowestcomplexity<br />

FFT known for real signals; although in modern times the issues<br />

of memory, machine cache, and processor features are so overwhelming that<br />

sheer complexity counts have fallen to a lesser status. Now, for the ring Zn<br />

with n =2 m + 1 and m a multiple of 4, show that a square root of 2 is given<br />

by √ 2=2 3m/4 − 2 m/4 .<br />

Then, determine whether a Sorenson transform modulo n canbedonesimply<br />

by using what is now the standard Sorenson routine but with √ 2 interpreted<br />

as above. (Detailed coding for a Sorenson real-signal FFT is found in [Crandall<br />

1994b].)<br />

9.50. Study the transform that has the usual DFT form<br />

Xk =<br />

N−1 <br />

j=0<br />

xjh −jk ,<br />

except that the signal elements xj and the root h of order N exist in the field<br />

Q √ 5 . This has been called a number-theoretical transform (NTT) over the<br />

“golden section quadratic field,” because the golden mean φ = √ 5 − 1 /2<br />

is in the field. Assume that we restrict further to the ring Z[φ] so that the<br />

signal elements and the root are of the form a + bφ with a, b integers. Argue<br />

first that a multiplication √ in the domain takes three integer multiplies. Then<br />

consider the field Fp 5 and work out a theory for the possible length of<br />

such transforms over that field, when the root is taken to be a power of the<br />

golden mean φ. Then, consider the transform (N is even)<br />

Xk =<br />

N/2−1 <br />

j=0<br />

H −jk xj<br />

where the new signal vector is xj =(aj,bj) and where the original signal<br />

component was xj = aj + bjφ in the field. Here, the matrix H is<br />

<br />

1<br />

H =<br />

1<br />

<br />

1<br />

.<br />

0<br />

Describe in what sense this matrix transform is equivalent to the DFT<br />

definition preceding, that the powers of H are given conveniently in terms<br />

of Fibonacci numbers<br />

H n <br />

Fn+1 Fn<br />

=<br />

,<br />

Fn<br />

Fn−1<br />

and that this n-th power can be computed in divide-and-conquer fashion in<br />

O(ln n) matrix multiplications. In conclusion, derive the complexity of this<br />

matrix-based number-theoretical transform.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!