Jump to content
BrainDen.com - Brain Teasers
  • 0

A simple complex problem


Yoruichi-san
 Share

Question

I couldn't resist responding to happy chance...;P Not my own creation, but you don't need to know too about complex numbers to solve it, just the basic definition of i =sqrt(-1) should suffice.

So the straightforward method of computing the product (a+bi)(c+di) = (ac-bd)+i(bc+ad) requires four (real) multiplications and two additions. However, most computers require a significantly more time to compute multiplication than addition. Find an algorithm for computing (a+bi)(c+di) with only three multiplications.

Edited by rookie1ja
Link to comment
Share on other sites

8 answers to this question

Recommended Posts

  • 0

I can't do spoilers on iPad, but this answer is a bit of hoax, I judge.

So showing it doesn't disclose the real (npi) solution.

  Reveal hidden contents

Normalizing the two numbers WRT their real parts reduces the multiplications to two.

Of course, it ALSO requires two divisions, hardly creating a more efficient algorithm.

a+bi x c+di = ac-bd +i (ad+bc) - four multiplications.

Normalize 

a+bi = a(1+Bi). 

c+di = c(1+Di)

Product = ac[1-BD +i(B+D)] - two multiplications.

Link to comment
Share on other sites

  • 0

To stretch the point, if you convert to polar coordinates (a mere 4 squares, 2 additions, 2 square roots and 2 arc tangents, it'll take only 1 multiplication and 1 addition.

Well, to recover a Cartesian result, add on 1 sine, 1 cosines and 2 more multiplications. Still only 3 multiplications instead of 4.

Link to comment
Share on other sites

  • 0
  On 5/13/2012 at 8:44 PM, bonanova said:

OK I think it can be done, but it will cost you

  Reveal hidden contents

Let r1 = ac, r2 = bd. Two multiplications so far.

(a+bi)(c+di) = (r1-r2) + {(a+b)(c+d)-(r1+r2}i Third multiplication.

Yep, I think that is the solution, its the one I got, too. Like I said, I didn't create this problem, and I don't know that much about computers. But I think the point was that additions take, like, nearly an order of magnitude less than multiplication.

As for polar coordinates...this problem was actually suppose to be simple ;P.

Link to comment
Share on other sites

  • 0
  On 5/13/2012 at 9:18 PM, Yoruichi-san said:

As for polar coordinates...this problem was actually suppose to be simple ;P.

Back in the day, swapping x <---> + in computations made a difference.

p.c. Answer was just using time while I worked on the real answer :).

Link to comment
Share on other sites

  • 0
  On 5/13/2012 at 1:58 AM, bonanova said:

I can't do spoilers on iPad, but this answer is a bit of hoax, I judge.

So showing it doesn't disclose the real (npi) solution.

  Reveal hidden contents

Normalizing the two numbers WRT their real parts reduces the multiplications to two.

Of course, it ALSO requires two divisions, hardly creating a more efficient algorithm.

a+bi x c+di = ac-bd +i (ad+bc) - four multiplications.

Normalize

a+bi = a(1+Bi).

c+di = c(1+Di)

Product = ac[1-BD +i(B+D)] - two multiplications.

What does WRT mean?

Also, how does a+bi = a(1+bi)?

Link to comment
Share on other sites

  • 0
  On 6/7/2012 at 1:59 PM, Morningstar said:

What does WRT mean?

Also, how does a+bi = a(1+bi)?

[With Respect To] and it's a+bi=a(1+Bi), where B=b/a. It's common for mathematicians to use capital letter to represent a newly defined coefficient that is related to, but not equal to, the old coefficient.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...