Re: How to solve (2x + 3y)^3?



dwwdkddb wrote:
I think you're neglecting the number of operations
involved in computing the binomial coefficients
to make this argument. You have 3C0, 3C1, 3C2 and 3C3
to compute,(quite a few multiplications and divisions
there) as well as the various powers of 2 and 3
to multiply together.
Like I said, the binomial coefficients
can be most easily had from Pascal's triangle
(just involves a few additions). You're probably
right about the powers of 2 and 3, but I guess
anyone reasonably well-versed in arithmetic
knows the first few by heart. (I for one know
them up until 2^10 and 3^5.)

Sure: knowing the answer in advance always
makes it easier :-)

But now you're asking somebody to learn the
binomial theorem, and know a relationship
between the biniomial coefficients and
Pascal's triangle, all of which saves maybe
a couple of multiplications at the expense
of obfuscating what they're actually doing.
And even with all that, I doubt whether I'd
be significantly faster to work out (2x+3y)^3
with the binomial theorem than by just
multiplying out.

For a cubic, it's a sledge-hammer to crack a
nut. That's not to say that the sledge-hammer
doesn't have its uses, and once you have
the sledge-hammer and have practised a lot
with it you can use it for a nut-cracker.

But I'm willing to concede that just which
tool is the best for the job depends on the
person using it as well as how much they
practise with it, so I'll stop niggling away
at this now.
.



Relevant Pages

  • shifting bits
    ... result I chose to shift the variables' bits using multiplications and ... divisions by powers of two. ...
    (comp.lang.ada)
  • Re: converting float to ascii w/o printf
    ... this without this error induced by my multiplications by 10 (and still ... or divide by a power of 10, so you only get one roundoff error. ... What I mean is that if you do the normalization multiply/divide using ... This gives you larger powers of 10 that can be ...
    (comp.arch.embedded)
  • Re: Geometric average: how to compute it: best approach ?
    ... sum with the logarithm? ... The first 2 are quite slow, but, on the other hand, the logarithm has ... Perhaps combining multiplications (without powers!) and taking the logarithm after a fixed number of multiplications that doing something like: ...
    (sci.math)
  • Re: BigNum -- BigFrac
    ... "Arthur J. O'Dwyer" wrote: ... Not totally stupid, ... > for doing multiplications." ... And powers. ...
    (comp.programming)