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

testing - Detect whether test has failed within fixture -

AbotX : How do you create a parallel crawler that stays on and can be added to at run time from new requests -

android - Create single AAR file from multiple modules using Gradle -