c++ - Faster evaluation of modular polynomials -


a polynomial defined such of coefficients given less prime number p. wish evaluate polynomial @ point mod p. simple approach be;

 int sum=arr[n],j=n-1;//sum polynomial value mod p @ point , arr[] coefficient array , k point @ polynomial evaluated     while(j>=0)     {        sum = ((sum*k)%p + arr[j])%p;        j--;     } 

but property exist regarding such polynomials such above approach optimized further (lesser time complexity)?


Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -