Realization: Polynomials and indexed arrays of integers are, if not isomorphic, then *very* useful for understanding each other.
I'm kind of embarrassed that it took my brain this long to explicitly put that one together. Which is to say, I always knew it, but I didn't previously realize the cool stuff that falls out of it, like taking the derivative to move the index into the coefficient, etc.
This is (apparently) what I do on vacation. Happy New Year!
I'm kind of embarrassed that it took my brain this long to explicitly put that one together. Which is to say, I always knew it, but I didn't previously realize the cool stuff that falls out of it, like taking the derivative to move the index into the coefficient, etc.
This is (apparently) what I do on vacation. Happy New Year!
no subject
Date: 2011-12-30 07:12 pm (UTC)Happy New Year!
no subject
Date: 2011-12-30 07:26 pm (UTC)f(x)=sum(i=0->inf) a{sub i}x^i
ie
a0 + a1x + a2x^2 + a3x^3 + ...
which leads to a natural a[] as the representation
For full representation you need an infinitely sized array, or a lazy evaluation language :-)
no subject
Date: 2011-12-30 07:54 pm (UTC)To wit:
lambda(x, polynom): reduce lambda(sum, new-poly-factor): x*sum+new-poly-factor over polynom
no subject
Date: 2011-12-30 08:01 pm (UTC)The "a:as" expression means "single element a followed by a (potentially empty) list of more a's"
no subject
Date: 2011-12-30 09:00 pm (UTC)then consider polynomials and bases and the fun you can do there.
and gah. i can reference a book if you want. i'll have to find it later.
one can write a lot of neat perl/python for such things.
#
no subject
Date: 2011-12-31 03:28 pm (UTC)If you start from the roots, you can simply construct the polynomial and can skip the root-finding. It's also possible to do the root-finding mixed in with the point-colouring (find what root a given point tends to, see if that is a root previously found, if not add the root to the set of roots).
no subject
Date: 2011-12-31 04:31 pm (UTC)