Re: Re: Recursion question
- To: mathgroup at smc.vnet.net
- Subject: [mg55529] Re: [mg55516] Re: [mg55498] Recursion question
- From: DrBob <drbob at bigfoot.com>
- Date: Mon, 28 Mar 2005 02:42:06 -0500 (EST)
- References: <200503260739.CAA21875@smc.vnet.net> <200503270742.CAA06239@smc.vnet.net>
- Reply-to: drbob at bigfoot.com
- Sender: owner-wri-mathgroup at wolfram.com
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
- References:
- Recursion question
- From: rbedient@hamilton.edu
- Re: Recursion question
- From: Daniel Lichtblau <danl@wolfram.com>
- Recursion question