GSoC 2018: Numerical Evaluation of Linear Recurrences

239 views
Skip to first unread message

Sidhant Nagpal

unread,
Feb 15, 2018, 8:54:55 AM2/15/18
to sympy
Hi, I am Sidhant Nagpal, a second year undergraduate student pursuing a degree in Computer Engineering at Netaji Subhas Institute of Technology, India. 
I will be a GSoC applicant this year. 
I would like to propose an idea for SymPy - "Numerical Evaluation of Linear Homogeneous Recurrences with constant coefficients" that I wish to work on.
As it is difficult to obtain closed form expressions of these type of recurrences for higher order (k), 
support can be added to evaluate them for arbitrary values of n (possibly in a field).

For example: consider recurrence of order k=1000,
f(n) = f(n-999) + f(n-1000), for large n, with given initial conditions f(i) for i < 999.

I would love some feedback for the same. 
I am relatively new to SymPy, but am familiarising myself with it actively.
I have a strong Mathematics and Competitive Programming Background (in C++ and Python). 
Here is my LinkedIn Profile.
Thanks.

Sidhant Nagpal

unread,
Feb 17, 2018, 12:51:10 AM2/17/18
to sympy
Additional Note:     
Implementing this would require knowledge of Number Theoretic Transform to solve it optimally in O(k*lg(k)*lg(k) + k*lg(k)*lg(n)) for prime fields.     
Although there is a simpler sub-optimal solution which can solve this in O(k*k*lg(n)).     
Generalising for other fields will be more involved though.    
Message has been deleted

Sidhant Nagpal

unread,
Feb 19, 2018, 10:10:14 AM2/19/18
to sympy

Jason Moore

unread,
Feb 19, 2018, 8:19:28 PM2/19/18
to sy...@googlegroups.com
Yes, you can create a wiki page for your proposal and start writing the proposal there.

--
You received this message because you are subscribed to the Google Groups "sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sympy+unsubscribe@googlegroups.com.
To post to this group, send email to sy...@googlegroups.com.
Visit this group at https://groups.google.com/group/sympy.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/ec064e2e-b20f-4e5b-9304-f2c5b9ada771%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Chris Smith

unread,
Feb 20, 2018, 8:57:55 AM2/20/18
to sympy
Interesting that you should mention this. See the recent thread here where I ask if there is a better way to compute such things (at least to a novice it appears that we are talking about the same thing).

Sidhant Nagpal

unread,
Feb 20, 2018, 9:35:14 AM2/20/18
to sympy

Interesting that you should mention this. See the recent thread here where I ask if there is a better way to compute such things (at least to a novice it appears that we are talking about the same thing).

Yes, indeed it is related. 
In fact the thread you mentioned, actually just explicitly defines the recurrence by giving the rational generating function (=Q(x)/P(x)) of the sequence. This can be calculated using the approach, that I have proposed. 
Just expand the denominator to be of the form P(x) = 1 - a1x - a2x^2 - ..., where coefficients of powers of x encode the coefficients of the recurrence and powers define the dependent term of the recurrence, Q(x) obviously encodes the initial values of the recurrence, and hence it converts to this problem.

Sidhant Nagpal

unread,
Mar 13, 2018, 11:36:22 AM3/13/18
to sympy
I have started a [wiki page](https://github.com/sidhantnagpal/gsoc/wiki/GSoC-2018-Application-Sidhant-Nagpal:-Transforms,-Convolution-&-Linear-Recurrence-Evaluation) describing the details of my project. It would be great if I can get feedback for the same.

Thanks.
Reply all
Reply to author
Forward
0 new messages