§ FFT



§ Worked out example of FFT of 8 elements


p(x)a0x0+a1x1+a2x2+a3x3+a4x4+a5x5+a6x6+a7x7pe(x)a0x0+a2x+a4x2+a6x3po(x)a1+a3x+a5x2+a7x3P(x)=pe(x)=xpo(x) p(x) \equiv a_0 x^0 + a_1 x^1 + a_2 x^2 + a_3 x^3 + a_4 x^4 + a_5 x^5 + a_6 x^6 + a_7 x^7 p_e(x) \equiv a_0 x^0 + a_2 x + a_4 x^2 + a_6 x^3 \\ p_o(x) \equiv a_1 + a_3 x + a_5 x^2 + a_7 x^3 \\ P(x) = p_e(x) = x p_o(x)

Now suppose we know how to evaluate pe(x)p_e(x) and po(x)p_o(x) at [w40,w41,w42,w43][w_4^0, w_4^1, w_4^2, w_4^3]. where w4w_4 is the 4th root of unity. We wish to evaluate p(x)p(x) at [w80,w81,w82,,w87][w_8^0, w_8^1, w_8^2, \dots, w_8^7], where w8w_8 is the 8th root of unity. The only two properties of the roots of unity we will need are:

Using the value of w8w_8, the above two relations, the values po(w4k)=[po(1),po(w4,po(w42),po(w43)]p_o(w_4^k) = [p_o(1), p_o(w_4, p_o(w_4^2), p_o(w_4^3)] and pe(w4k)=[pe(1),pe(w4),pe(w42),pe(w43)]p_e(w_4^k) = [p_e(1), p_e(w_4), p_e(w_4^2), p_e(w_4^3)], we evaluate pp at powers of w8w_8 ( [p(w8k)][p(w_8^k)] ) as:

§ Solving the Recurrence: T(n) = n + T(n/2), with T(1) = 1


§ Proof 1:


Expand the recurrence:
= T(n)
= n + 2T(n/2)
= n + 2[n/2 + T(n/4)]
= n + n + 4T(n/4)
= n + n + 4[n/4 + 2T(n/8)]
= n + n + n + 8T(n/8)
= ...
= kn + ... 2^k T(n/2^k)
= (log n)n + 2^(log n) T(n/2^(log n))
= (log n)n + n T(n/n)
= (log n)n + n* 1
= (log n)n + n

§ Proof 2:


Consider the tree:
           8
          mrg:8
   4                 4
   mrg:4           mrg:4
  2     2          2       2
 mrg:2  mrg:2     mrg:2   mrg:2
 1 1    1  1      1   1    1  1