Waldek Hebisch <[EMAIL PROTECTED]> writes: > Today I toyed a bit with guessing package and immediatly I > hit a few quirks: > > 1) I tried to guess polynomial from its values. So I wrote: > this looks like off by one error.
Currently, the definitive reference is my article on http://uk.arxiv.org/abs/math.CO/0702086 or http://axiom-wiki.newsynthesis.org/GuessingFormulasForSequences I guess I should add a link into the documentation. Done. Ideally, it would turn into a HyperDoc examples page... > 2) plain guess gives: > > guess [myPol(i) for i in 1..15] > Compiling function myPol with type PositiveInteger -> Integer > > (33) > [ > n 4 3 2 3 2 > [function= [[x ]f(x): (x - 4x + 6x - 4x + 1)f(x) + x - 3x - 3x - 1= > 0] , > order= 0] > ] > Type: List(Record(function: Expression(Integer),order: NonNegativeInteger)) > Time: 0.004 (IN) + 0.004 (EV) + 0.02 (OT) = 0.02 sec > > Description of guess says that it tries guessRec and guessADE. > Description of guessADE says that that it finds equations satified > by function with given first Taylor coefficients, so technically this > result is probably OK. But our polynomial is determined just by > 4 coefficients, while in the equation we have 9 numbers, so the > reslut is much more complicated than necessary (and it requires > a little effort to realize that it really decribes a polynomial). Yes. The default values for guess are stupid. Changed. > 3) I tried guessExpRat to force the result to be polynomial, but guessExpRat > seems to a lot of time (I was too impatient to actually see any answer). I > wonder what method is used in guessExpRat? Also described in the article. Yes, this method actually doesn't really work for lists longer than about 10 items, unless you have a supercomputer, that is. > guessRec seem to reasonably quickly find difference equation satisfied by a > function. Once we know f(n+1)/f(n) asymptotic at infinity should immediatly > give us exponential factor. The hard part is to get the asymptotic at infinity :-) As far as I know, functions of the form (a+b*n)^n*q(n) (a,b are fractions, q a rational function) does not necessarily satisfy a difference equation. Suggestions *very* welcome. Martin --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/fricas-devel?hl=en -~----------~----~----~----~------~----~------~--~---
