Re: Multivariate Polynomial Factoring Algorithm
- Posted by Al Getz <Xaxo at aol?co?> Jan 10, 2008
- 721 views
Hi again, None? I was going to update my Scientific calculator again and i wanted to include multivariate polynomial factoring, thus i need to convert any algorithm found into Euphoria code. Here's an example from real life where the equation came about from a real physical system... H(s)= (A*B*b^2*c*d*s^2*v+A*b^2*c*s*v+A*b^2*d*s*v+B*b*c*d*s*v+b*c*v+b*d*v) /(A^2*B*a*b^2*c*d*s^3+A^2*a*b^2*c*s^2+2*A*B*a*b*c*d*s^2+A*B*b^2*c*d*s^2 +2*A*a*b*c*s+A*b^2*c*s+B*a*c*d*s+B*b*c*d*s+a*c+b*c) A close look shows a few vars easily factored out, but knowing where the equation came from says that there are only two poles, so that means the highest power of s in the denominator is going to be s^2, not s^3 as in the above. This means there is definitely at least one smaller polynomial that divides perfectly into both the top and bottom of this equation. I have other heuristics available too because i know the physical system where the equation came from, and this will be true for many other equations too, but i want to eliminate that prerequisite and have an algorithm that can handle any poly, regardless of where it came from. It has to either factor it or else declare that it can not be reduced at all. Thanks in advance. Al Getz wrote: > > Hello, > > > Has anyone seen something like this around? > I would prefer something in English, worded as > a pseudo language rather than an actual piece of > code in some language. > I have one in Lisp, but i dont know that language. > > Extra credit: one that is deterministic in nature (circa 2004) > but i'll settle for almost anything for now. > > Quick simple example: > factor: a^2+2*a*b+b^2 > however there will be many more variables than just 'a' and 'b' > and many more terms also. > > > Thanks for any ideas or leads. > > > Al > > E boa sorte com sua programacao Euphoria! > > > My bumper sticker: "I brake for LED's" > Take care, Al E boa sorte com sua programacao Euphoria! My bumper sticker: "I brake for LED's" From "Black Knight": "I can live with losing the good fight, but i can not live without fighting it". "Well on second thought, maybe not."