The time required to add the most direct method to the two n-th polynomial is O (n), while the direct method for multiplying the two n-th polynomial requires O (n^2), and the Fast Fourier transform (FFT) discussed in this chapter will reduce the time complexity of the process to O (NLOGN). This chapter will also give some FFT practical applications.
Two representations of the polynomial:
Through the above deduction, we briefly summarize the conclusions obtained.
And then the core of the problem is, if the optimization evaluation and interpolation process of time complexity, the evaluation process is intuitive, the time complexity is O (n^2), and the interpolation process needs to solve the linear equations, the need for more time complexity.
In order to optimize the algorithm, we need to introduce some knowledge of the function of complex variable.
The following is an example of a sketch made with n=8.
It is easy to see that for a period, k=0,1,2,..., 7 have 8 different complex solutions.
In this paper, we give some knowledge of the function of complex variable, especially pay attention to the binary lemma, which is the core of the optimization algorithm and the core of design recursive algorithm.
The 4,5 row defines the primary n unit root and the first root, which is to get n n units of complex root at the back.
The 8,9 line is a recursive process based on the binary lemma.
10,11,12,13 is based on the recursive "regression" part, that is, according to the results of the division of the solution of the mother problem. 13 rows of settings, combined with loops, complete the task of updating the value of W.
A simple study of the time complexity of the FFT has the following equation:
T (n) =2t (N/2) +o (n) =o (NLGN)
An introduction to algorithms--chaper30-polynomial and fast Fourier transform