MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Re: Recursion question


Brilliant!

This makes it easier, though, to experiment with different depths of recursion (until you find one that works):

dec = # /. n -> n - 1 &;
cpoly = NestList[dec, c[n] - (a[n] + b[n])/2, 2];
apoly = NestList[dec, a[n] - 4*a[n - 1]*(1 - a[n - 1]), 1];
allpolys = Join[apoly, apoly /. a -> b, cpoly];
cvars = Cases[Variables[allpolys], c[_]];
elims = Complement[Variables[allpolys], cvars];
gb = GroebnerBasis[allpolys, cvars, elims]

{-64*c[-2 + n] +
    320*c[-2 + n]^2 -
    512*c[-2 + n]^3 +
    256*c[-2 + n]^4 +
    20*c[-1 + n] - 64*c[-2 + n]*
     c[-1 + n] + 64*c[-2 + n]^2*
     c[-1 + n] - 4*c[-1 + n]^2 -
    c[n]}

Bobby

On Sun, 27 Mar 2005 02:42:53 -0500 (EST), Daniel Lichtblau <danl at wolfram.com> wrote:

> rbedient at hamilton.edu wrote:
>> I have a set of single step recursion equations that I want to simplify
>> into a single multi-step equation.  Here's what it looks like:
>>
>> a[n]=4*a[n-1]*(1-a[n-1])
>> b[n]=4*b[n-1]*(1-b[n-1])
>> c[n]=(a[n]+b[n])/2
>> a[1]=.1  <-arbitrary starting value
>> b[1]=.8  <-arbitrary starting value
>>
>> What I'm hoping for is something like:
>>
>> c[n]=some function of c[n-1], c[n-2]...
>>
>> I've tried various combinations of Solve, RSolve, Simplify etc. to no
>> avail.  Any help would be appreciated.
>>
>> Fairly Newbie
>>
>> Dick
>
>
> You need to acquire sufficiently many polynomials to eliminate all
> a[...] and b[...] variables. One can observe that this is accomplished
> if we go to {a,b,c}[n-2].
>
> polys = {a[n]-4*a[n-1]*(1-a[n-1]), b[n]-4*b[n-1]*(1-b[n-1]),
>    c[n]-(a[n]+b[n])/2, c[n-1]-(a[n-1]+b[n-1])/2};
> polysm1 = polys /. n->n-1;
> allpolys = Union[polys,polysm1]
> cvars = Cases[Variables[allpolys],c[_]];
> elims = Complement[Variables[allpolys], cvars];
>
> Here is the desired relation.
>
> In[24]:= InputForm[gb = GroebnerBasis[allpolys, cvars, elims]]
>
> Out[24]//InputForm=
> {-64*c[-2 + n] + 320*c[-2 + n]^2 - 512*c[-2 + n]^3 + 256*c[-2 + n]^4 +
>    20*c[-1 + n] - 64*c[-2 + n]*c[-1 + n] + 64*c[-2 + n]^2*c[-1 + n] -
>    4*c[-1 + n]^2 - c[n]}
>
>
> Daniel Lichtblau
> Wolfram Research
>
>
>
>
>



-- 
DrBob at bigfoot.com


  • Prev by Date: Re: Questions about Abs[_]
  • Next by Date: Re: Re: point in convex hull
  • Previous by thread: Re: Recursion question
  • Next by thread: Re: Recursion question