4 ms·
I used polynomials and specifically special symmetric polynomials extensively during my Phd research (mathematical physics). For instance symmetric polynomials
by lav42 2y ago
I used polynomials and specifically special symmetric polynomials extensively during my Phd research (mathematical physics).
For instance symmetric polynomials (x_1^2 + x_2^2 + ...) can describe the state of a system of particles where exchanging any 2 particles does not change the system at all (exchange x_1 and x_2 in the previous expression, same polynomial = same system & state).
If you have a system of equation that you can solve exactly with special polynomials, you can approximate real world system governed by similar equations by using your special polynomials as a starting point and adding a correction to your solution.
There's so much to say about polynomials, but I'll leave you with a basic example that shows how multiplying infinite polynomials allow you to count the number of ways there are to hand you back your change at the till:
The basic units of change are 0.01$, 0.05$, 0.10$, 0.25$, 1$, 5$, 10$, ...
For example, you can always give exact change back with only 0.01$.
So the set of all the different amount of change you can produce with 0.01$ is given by the exponents in the following
sum_n>=0 (q^(0.01))^n = q^0 + q^0.01 + q^0.02 + ... q^348.47 + ...
Now we can get all the amounts you can generate with 5 cents:
sum_k>=0 (q^(0.05))^k = q^0 + q^0.05 + q^0.10 + ....
and so on for 25cents, 1$, ...
Notice now that given the multiplication properties of polynomials, that multiplying:
(sum_n (q^0.01)^n) * (sum_k (q^0.05)^k) * (sum_l (q^0.10)^l)
Will give you all the different amounts you can generate with 0.01, 0.05 and 0.10.
For instance with n=5, k=1, l=0 you get 0.10$
q^(0.01 ^ 5) * q^(0.05 * 1)
You can get 0.10$ with n=10
q^(0.01 * 10)
You can get 0.10$ with l=1
q^(0.10 * 1)
Finally you can get 0.10$ with k=2
q^(0.05 * 2)
So when you multiply
(sum_n (q^0.01)^n) * (sum_k (q^0.05)^k) * (sum_l (q^0.10)^l)
altogether, you get
1 + ... + q^(0.01 * 5) * q^(0.05 * 1) + q^(0.01 * 10) + q^(0.10 * 1) + q^(0.05 * 2) + ...
= ... + 4 q ^ (0.10)
There are thus 4 ways of handing back exactly 10 cents.
So for any amount, you take the following:
product(c in (0.01, 0.05, 0.10, 0.25,...) (sum_n (q^c)^n)
= sum_(a >= 0.01) [Number Of Way To Give Back Change for amount `a`] * q^(a)
So that would be the "generating series" of the number of ways to hand back change.
In this context, polynomials bridge the gaps between combinatorics and analytical computation.
- deleted 2y ago[deleted]
- anthk 2y agoThat an exercise on SICP, a Scheme learning book. And there are similar ones for Common Lisp.
- lav42 2y agoSay what? I'm always astounded that people think everyone knows all the acronyms for whatever field they're working in.
- masfuerte 2y agohttps://en.wikipedia.org/wiki/Structure_and_Interpretation_of_Computer_Programs https://en.wikipedia.org/wiki/Structure_and_Interpretation_o...
- temporarara 2y agoWhile I agree with this attitude towards obscure acronyms, SICP is widely known among those who voluntary enter a site called Hacker News, and it's easily searchable too.
- anthk 2y agoBy just googling 'SICP Scheme' the hints are pretty clear...
- lav42 2y agoThe book looks awesome, thanks for pointing out, I'll give it a read.
- rurban 2y agoIt will change your life. Did for all of us
- anthk 2y agoI forgot. You can do SICP over the web without installing an Scheme interpreter. The web has a complete enough Scheme interpreter to do and eval the whole book exercises. http://xuanji.appspot.com/isicp/ http://xuanji.appspot.com/isicp/ Enjoy. If you want something offline, I can help you to set Chicken (the interpreter), the depending libraries for SICP and Emacs in no time.