Practice with the fast Fourier transform.

(a) What is the FFT of (1,0,0,0)? What is the appropriate value of ωin this case? And of which sequence is (1,0,0,0)the FFT?

(b)Repeat for (1,0,1,-1).

Short Answer

Expert verified

Part (a)

FTT of (1,0,0,0) is: (1,1,1,1)

Approximate value of ωis: i

Sequence is:14,14,14,14

Part (b)

FTT of (1,0,1,-1) is:(1,i,3,-i)

Step by step solution

01

Solution of part (a)

Fast Fourier Transform (FFT) of 1,0,0,0& the numbers of ω':

The 4×4matrix of FFT is,

M4ω'=11111ωω2ω31ω2ω4ω61ω3ω6ω9 …… (1)

The nth root of unity's complicated value ωis,

localid="1658922894437" ω'=e2πin …… (2)

Extra information base calculation value “4” for “n” in the Equation (2). Thus, the value of ωis,

ω'=e2πin

=eπi2

Note: eix=cosx+isinx

Thus, eπi2has been written as given details:

localid="1658923197401" ω=cosπ2+isinπ2=cos90+isin90(3)

=0+i1ω=i

Alternative calculation of Equation (3) in Equation (1),

M4ω'=11111ii2i31i2i4i61i3i6i9......4Ingeneral,thevalueofi,i2i3i4are,i=ii2=-1i3=-ii4=1......5Thecalculationvalueofi6,i9is,i6=i4×i2=-1i9=i6×i3=i......6Alternativecalculationvaluesarei,i2,i3,i4,i6,i9inEquation(4).TheFFTmatrixis,

M4ω'=11111i-1-i1-11-11-i-1i......7LetthegivenmatrixbeA=1000......8

The FFT of A is,

The FFT of 1,0,0,0=M4ω'×A......9 …… (9)

Alternative of calculation related value of “A” matrix and M4ωin Equation (9),

=11111i-1-i1-11-11-i-1i×1000=1111

As a result of Calculation (3), the correct value ofω=iand the FFT of (1,0,0,0) is (1,1,1,1).

Progression of FFT it is priceless1,0,0,0:

Apply the inverted FFT, which equals to determine the FFT sequence,

Inverse FFT=1nMnω-1…… (10)

Here, from Equation (3), the value of . Thus, the value of is:

role="math" localid="1658981947890" =cosπ2+isinπ2-1=cos-π2+isinπ2=cosπ2-isinπ2ω-1=-i(11)

Accepting the value of role="math" localid="1658982023034" M4ω-2substitute i=-i in Equation (4)

M4ω-2=11111-i-1i1-11-11i-1-i......12

Now let us say the matrix is

B=1000(13) …… (13)

So, there is inverse FFT (B) is,

The inverse FFT (B)=14BMnω-1 …… (14)

Substitute the value of “B” matrix and Mnω-1in Equation (14),

=1411111-i-1i1-11-11i-1-i×1000=141111

Therefore, the sequence of FFT that has the1,0,0,0is14,14,14,14

02

Solution of part (b)

Fast Fourier Transform (FFT) of ( 1,0,1,-1 ) :

Let the given matrix be,

C=101-1......15

The FFT of ( 1,0,10-1 ) is,

The FFT of 1,0,1,-1=CMnω-1 …… (16)

Substitute the value of “C” matrix and Mnω-1in Equation (16),

=11111i-1-i1-11-11-i-1i×101-1=1+0+1-11+0-1+i1+0+1+11+0-1-i=1i3-1

Therefore, the FFT of 1,0,1,-1is1,i,3,-iis .

Unlock Step-by-Step Solutions & Ace Your Exams!

  • Full Textbook Solutions

    Get detailed explanations and key concepts

  • Unlimited Al creation

    Al flashcards, explanations, exams and more...

  • Ads-free access

    To over 500 millions flashcards

  • Money-back guarantee

    We refund you if you fail your exam.

Over 30 million students worldwide already upgrade their learning with Vaia!

One App. One Place for Learning.

All the tools & learning materials you need for study success - in one app.

Get started for free

Most popular questions from this chapter

This problem illustrates how to do the Fourier Transform (FT) in modular arithmetic, for example, modulo .(a) There is a number such that all the powers ω,ω2,...,ω6 are distinct (modulo ). Find this role="math" localid="1659339882657" ω, and show that ω+ω2+...+ω6=0. (Interestingly, for any prime modulus there is such a number.)

(b) Using the matrix form of the FT, produce the transform of the sequence (0,1,1,1,5,2) modulo 7; that is, multiply this vector by the matrix M6(ω), for the value of ωyou found earlier. In the matrix multiplication, all calculations should be performed modulo 7.

(c) Write down the matrix necessary to perform the inverse FT. Show that multiplying by this matrix returns the original sequence. (Again all arithmetic should be performed modulo 7.)

(d) Now show how to multiply the polynomials and using the FT modulo 7.

In this problem we will develop a divide-and-conquer algorithm for the following geometric task.

CLOSEST PAIRInput: A set of points in the plane, {p1=(x1;y1),p2=(x2,y2),...,pn=(xn,yn)}

Output: The closest pair of points: that is, the pair PiPjfor which the distance between piand pj, that is,

(xi-xi)2+z(yi-yi)2,

is minimized.

For simplicity, assume that n is a power of two, and that all the x-coordinates role="math" localid="1659237354869" xi are distinct, as are the y-coordinates.

Here’s a high-level overview of the algorithm:

.Find a value for which exactly half the points have xi<x, and half have xi>x. On this basis, split the points into two groups, L and R.

• Recursively find the closest pair in L and in R. Say these pairs are pL·qLLand pR·qRRwith distances dLand dR respectively. Let d be the smaller of these two distances.

• It remains to be seen whether there is a point in Land a point in R that are less than distance dapart from each other. To this end, discard all points with xi<x-dor xi>x+d and sort the remaining points by y-coordinate.

• Now, go through this sorted list, and for each point, compute its distance to the seven subsequent points in the list. Let pM·qMbe the closest pair found in this way.

• The answer is one of the three pairs role="math" localid="1659237951608" {pL,qL},{pR,qR}{pM,qM}, whichever is closest.

(a) In order to prove the correctness of this algorithm, start by showing the following property: any square of size d×d in the plane contains at most four points of L.

(b) Now show that the algorithm is correct. The only case which needs careful consideration is when the closest pair is split between L and R.

(c) Write down the pseudocode for the algorithm, and show that its running time is given by the recurrence:

T(n)=2T(nl2)+0(nlogn)

Show that the solution to this recurrence is o(nlogzn).

(d) Can you bring the running time down to O(nlogn)?

What is the sum of the nth roots of unity? What is their product if n is odd? If n is even?

In Section 1.2.3, we studied Euclid’s algorithm for computing the greatest common divisor (gcd) of two positive integers: the largest integer which divides them both. Here we will look at an alternative algorithm based on divide-and-conquer.

(a) Show that the following rule is true.

gcd(a,b)={2gcd(a2,b2)ifa,bareevengcd(ab2)ifaisodd,bisevengcd(a-b2,b)ifa,bareodd

(b) Give an efficient divide-and-conquer algorithm for greatest common divisor.

(c) How does the efficiency of your algorithm compare to Euclid’s algorithm if a and b are n-bit -bit integers? (In particular, since n might be large you cannot assume that basic arithmetic operations like addition take constant time.)

Section 2.2 describes a method for solving recurrence relations which is based on analyzing the recursion tree and deriving a formula for the work done at each level. Another (closely related) method is to expand out the recurrence a few times, until a pattern emerges. For instance, let’s start with the familiar T(n)=2T(n/2)+o(n). Think of o(n) as being role="math" localid="1658920245976" <cnfor some constant , so: T(n)<2T(n/2)+cn. By repeatedly applying this rule, we can bound T(n) in terms of T(n/2), then T(n/4), then T(n/8), and so on, at each step getting closer to the value of T(.) we do know, namely .

T(1)=0(1).

T(n)2T(n/2)+cn2[2Tn/4+cn/2]+cn=4T(n/4)+2cn4[2Tn/8+cn/4]+2cn=8T(n/8)+3cn8[2Tn/16+cn/8]+3cn=16T(n/16)+4cn

.

.

.

A pattern is emerging... the general term is

T(n)2kT(n/2k)+kcn

Plugging in k=log2n, we get T(n)nT(1)+cnlog2n=0(nlogn).

(a)Do the same thing for the recurrence T(n)=3T(n/2)+0(n). What is the general kth term in this case? And what value of should be plugged in to get the answer?(b) Now try the recurrence T(n)=T(n-1)+0(1), a case which is not covered by the master theorem. Can you solve this too?

See all solutions

Recommended explanations on Computer Science Textbooks

View all explanations

What do you think about this solution?

We value your feedback to improve our textbook solutions.

Study anywhere. Anytime. Across all devices.

Sign-up for free