Post Reply 
Small challenge
04-23-2023, 01:56 PM
Post: #18
RE: Small challenge
(04-23-2023 01:01 PM)robve Wrote:  We can use the Chains of Recurrences algebra to optimize sequence evaluations such as x^10. We only need 10 additions to produce the next value in the sequence.

To expand \( x^{10} \) to CR form, let \( x \) be the integer sequence CR \( x =\{1,+,1\} \) expand to the CR \( \{1,+,1\}\times\{1,+,1\}\times\{1,+,1\}\times\{1,+,1\}\times\{1,+,1\}\times\{1,+​,1\}\times\{1,+,1\}\times\{1,+,1\}\times\{1,+,1\}\times\{1,+,1\} \). Simplify using the CR rule \( \{\phi_0,+,f_1\} \times \{\psi_0,+,g_1\} \Rightarrow
\{\phi_0\times\psi_0,+,\{\phi_0,+,f_1\}\times g_1+\{\psi_0,+,g_1\}\times f_1+f_1\times g_1\} \) giving the polynomial CR \( \{1,+,1023,+, 57002,+, 874500,+, 5921520,+, 21538440,+, 46070640,+, 59875200,+, 46569600,+, 19958400,+, 3628800 \} \). Note that each value is produced with just 10 additions.

Now you may ask, what's the difference here with difference tables? These CR coefficients look familiar. And you are correct! Polynomial CR forms are identical to difference table upper diagonals of polynomials evaluated over equidistant grids. CRs are not restricted to polynomials, it's just that CRs of polynomials are easy to construct with difference tables or with the CR algebra.

A difference table for the sequence shown in the picture reveals that the sequence is an x^10 polynomial since the 11th difference column is zero:
   

Not surprising, starting from x=1 you get the diagonal that matches the CR coefficients:
   

- Rob

"I count on old friends to remain rational"
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Small challenge - J-F Garnier - 04-22-2023, 02:33 PM
RE: Small challenge - Valentin Albillo - 04-22-2023, 03:29 PM
RE: Small challenge - John Keith - 04-22-2023, 04:38 PM
RE: Small challenge - Massimo Gnerucci - 04-22-2023, 03:33 PM
RE: Small challenge - Valentin Albillo - 04-22-2023, 03:41 PM
RE: Small challenge - J-F Garnier - 04-22-2023, 03:41 PM
RE: Small challenge - Gerson W. Barbosa - 04-22-2023, 05:15 PM
RE: Small challenge - BruceH - 04-22-2023, 04:30 PM
RE: Small challenge - Gerson W. Barbosa - 04-22-2023, 05:29 PM
RE: Small challenge - Gerson W. Barbosa - 04-28-2023, 12:52 AM
RE: Small challenge - J-F Garnier - 04-28-2023, 07:13 AM
RE: Small challenge - J-F Garnier - 05-16-2023, 06:57 PM
RE: Small challenge - robve - 05-18-2023, 03:16 AM
RE: Small challenge - C.Ret - 04-22-2023, 06:30 PM
RE: Small challenge - Thomas Klemm - 04-22-2023, 07:24 PM
RE: Small challenge - J-F Garnier - 04-22-2023, 09:42 PM
RE: Small challenge - Guenter Schink - 04-25-2023, 09:56 PM
RE: Small challenge - John Keith - 04-25-2023, 11:46 PM
RE: Small challenge - Dave Britten - 04-27-2023, 02:30 PM
RE: Small challenge - Valentin Albillo - 04-23-2023, 12:58 AM
RE: Small challenge - C.Ret - 04-23-2023, 06:24 AM
RE: Small challenge - EdS2 - 04-23-2023, 08:00 AM
RE: Small challenge - robve - 04-23-2023, 11:10 AM
RE: Small challenge - robve - 04-23-2023, 01:01 PM
RE: Small challenge - robve - 04-23-2023 01:56 PM
RE: Small challenge - EdS2 - 04-23-2023, 02:08 PM
RE: Small challenge - J-F Garnier - 04-23-2023, 02:13 PM
RE: Small challenge - John Keith - 04-23-2023, 06:41 PM
RE: Small challenge - J-F Garnier - 04-24-2023, 10:11 AM
RE: Small challenge - Albert Chan - 04-24-2023, 12:58 PM
RE: Small challenge - brouhaha - 04-24-2023, 05:32 PM
RE: Small challenge - Albert Chan - 04-24-2023, 01:07 PM
RE: Small challenge - robve - 04-28-2023, 08:37 PM
RE: Small challenge - J-F Garnier - 04-24-2023, 01:35 PM
RE: Small challenge - John Keith - 04-24-2023, 06:54 PM
RE: Small challenge - Christoph Giesselink - 04-25-2023, 07:13 PM
RE: Small challenge - J-F Garnier - 04-25-2023, 08:49 PM
RE: Small challenge - J-F Garnier - 04-26-2023, 07:51 AM
RE: Small challenge - J-F Garnier - 04-27-2023, 07:31 PM
RE: Small challenge - EdS2 - 04-28-2023, 08:53 AM



User(s) browsing this thread: 3 Guest(s)