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

In our median-finding algorithm (Section 2.4), a basic primitive is the split operation, which takes as input an array S and a value V and then divides S into three sets: the elements less than V , the elements equal to V , and the elements greater than V . Show how to implement this split operation in place, that is, without allocating new memory.

How many lines, as a function of n (in (.)form), does the following program print? Write a recurrence and solve it. You may assume is a power of . function f (n) if n > 1:

print_line (‘‘still going’’)

f (n/2)

f (n/2)

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)?

Suppose you are choosing between the following three algorithms: • Algorithm A solves problems by dividing them into five sub-problems of half the size, recursively solving each sub-problem, and then combining the solutions in linear time. •

Algorithm B solves problems of size n by recursively solving two sub-problems of size n-1and then combining the solutions in constant time. • Algorithm C solves problems of size n by dividing them into nine sub-problems of size n/3, recursively solving each sub-problem, and then combining the solutions in O(n2)time.

What are the running times of each of these algorithms (in big- O notation), and which would you choose?

In Section 2.1 we described an algorithm that multiplies two n-bit binary integers x and y in time na, where a=log23. Call this procedure fast multiply (x,y).

(a) We want to convert the decimal integer 10n(a 1 followed by n zeros) into binary. Here is the algorithm (assume n is a power of 2):

function pwr2bin(n)

if n = 1: return10102

else:

z= ???

return fastmultiply(z,z)

Fill in the missing details. Then give a recurrence relation for the running time of the algorithm, and solve the recurrence.

(b) Next, we want to convert any decimal integer x with n digits (where n is a power of 2) into binary. The algorithm is the following:

function dec2bin(x)

if n=1: return binary [ x ]

else:

split x into two decimal numbers xt,xRwith n/2 digits each

return ???

Here binary [.] is a vector that contains the binary representation of all one-digit integers. That is, binary role="math" localid="1659333641173" [0]=02, binary [1]=12, up to binary [9]=10012. Assume that a lookup in binary takes 0(1) time. Fill in the missing details. Once again, give a recurrence for the running time of the algorithm, and solve it.

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