View Full Version : Recurent Sets Quiz


Xgen
02-03-05, 09:50 AM
I have the row:

1 , 4x, 14x^2, 48x^3 ............

where coefficients are produced by the recurent dependency:
a(n) = 4a(n-1) -2a(n-2)
and x had values between 0 and 0.25,
the row is finite

How I can found the sum of the row:

S(x) = Sum(a(n)x^n) ? n = 0,1,2..........

Sarkus
02-03-05, 12:25 PM
Okay - bit fiddly to do without being arsed to do proper powers (i.e. superscript)


a(n) = 4a(n-1) - 2a(n-2)

and you want to sum a(n)x^n....


Let S = a(0)x^0 + a(1)x^1 + a(2)x^2 + a(3)x^3 etc.

Expanding a(1), a(2), a(3) and so forth into their 4a(z)-2a(y) components, you get...

S = a(0) + 4a(0)x + 4a(1)x^2 - 2a(0)x^2 + 4a(2)x^3 - 2a(1)x^3 and so forth.

Grouping like-coefficients (a):

S = a(0)+4a(0)x-2a(0)x^2 + 4a(1)x^2 - 2a(1)x^3 + 4a(2)x^3 - 2a(2)x^4... etc

This simplifies to:

S = a(0)(1+4x-2x^2) + (4x-2x^2)(a(1)x + a(2)x^2 + a(3)x^3 + ....) etc.

Now we already know that (a(1)x + a(2)x^2 + a(3)x^3 + ....) = [S - a(0)]

So....
S = a(0)(1+4x-2x^2) + (4x-2x^2)(S - a(0))

We know a(0) = 1, so substituting in...

S = 1 + (4x-2x^2) + (4x-2x^2)(S - 1)

Minus 1 from each side...

(S-1) = (4x-2x^2) + (4x-2x^2)(S - 1)

Simplifying:
(S-1) = (4x-2x^2) + (4x-2x^2)(S - 1)

Rearranging:
(S-1) [1-(4x-2x^2)] = (4x-2x^2)

Rearranging:
(S-1) = (4x-2x^2) / [1-(4x-2x^2)]

So S = (4x-2x^2) / [1-(4x-2x^2)] + 1


Which simplifies to: 1 / (1-4x+2x^2)

You may want to check the logic, but I think it's right.
:D




Then, to find the area (sum) between the ranges x=0 and x=0.25 you would merely integrate S(x) with respect to x between those ranges.

Xgen
02-04-05, 08:17 AM
Aha,
the correct answer is 1/(1-4x+2x^2). It took you least time then I expected!

Can you see the pattern? For all recurent rows there is a similar and simple relation. It had many usefull applications. Amazing that many people dont know it. I had discovered this by myself but maybe in Sets Theory is well known.


Then, to find the area (sum) between the ranges x=0 and x=0.25 you would merely integrate S(x) with respect to x between those ranges.


Yes. But I am rather interested from dS(x)/dx. In a model I am constructing x is the 'internal parameter' and S(x) is the measured variable.

Do you know a way easily to represent the numerical row members? I need formulae that gives the coefficients, i.e what will be the coefficient at arbitrary n? I.e. a(n) = f(n) , n = 0,1,2,3.........

Sarkus
02-04-05, 12:10 PM
There's no easy solution to f(x) for arbitrary n.

The solution is along the lines of:

x^n - A*(y^1)*x^(n-2) + B(y^2)*x^(n-4) - C(y^3)*x^(n-6) - D(y^4)*x^(n-8)... etc.
Where in this instance x=4 and y=2 (I used x and y as putting their values would confuse matters).

So the higher (n) you want the coefficient for the more terms you're going to have.

Also, coefficients A, B, C, D etc have their own geometric progression.
A is just (n-1) - so at n=2, A=1 etc.

B starts at n=4 and goes 1, 3, 6, 10, 15, 21 etc - i.e. the sum of the digits from 0 to (n-3) - so that at n=5, B=3.
It is actually more accurately expressed, in this instance, as the sum of the coefficients A up to (n-2).

C starts at n=6 and goes 1, 4, 10 etc.
This is the sum of the coefficients B up to (n-2).
So at n=9, the coefficients B (which are zero for n=1 to 3) are 0, 0, 0, 1, 3, 6, 10, 15, 21.
So at n=9, the coefficient for C is the sum of these up to n=7 - which is 0+0+0+1+3+6+10 = 20.

D will be the sum of the coefficients C up to (n-2).


And so forth.

I'm sure there is a much cleaner way of expressing it, but this is the best i could do.

Enjoy :D

Xgen
02-06-05, 11:18 AM
Sarkus ,

I am thinking anout what you had posted. I didnt put it well , I dont need exact solution of a(n) = f(n) (since it is so hard to be found) , I just need a continious function f(x,t) which very well approximates the given row.

In another words I am trying to pass from discreet to continious space. I already know that the answer is:

f(x,t)= Aexp(-at) or f(x,t)= Aexp(-a/T)

I run exponential approximation of the roe for x=0.25 and Origins gives me T = 6.433.
So I am trying to find out how the constant a is related with S(x).

At first I tought that a = 1-4x+3x^2 because:

(Int - refers to integral from zero to infinity):

S(x) = Int(q(x,t)dt) = Int(exp(-(1+4x-2x^2))dt)= -1/(1+4x-2x^2)Int(exp(-z)dz))
= 1/(1-4x+2x^2)

So the approximation q(x,t) = exp(-(1+4x-2x^2)t) seems a good suggestion. However 1+4x-2x^2 = 1/8, for x=0.25, and it is not even close to what Origin had gived - 1/6.433.

Now, am trying some complexer techics but I had not much success. I did found the ME (mathematical expectation) of the row:

ME = Sum(na(n)x^n) / Sum (a(n)x^n)

and i am trying to find out if the approximation q(x,t) = Aexp(-t/ME) is good, however for ME at x=0.25 I did get

ME = x(4-4x)/(1-4x+2x^2) = 6,

which is closer to 6.433, but still not enough.

Besides I checked this hypotesys with other rows from the same family, for example with the row a(n) = 5a(n-1) - 5a(n-2) , for it there was a very good match ME = 10, Origins gives 9.998. But for all other rows Origin exponential approxiumation and ME differs very seriously. I am really having hard times.

Sarkus
02-07-05, 09:28 AM
.e what will be the coefficient at arbitrary n? I.e. a(n) = f(n) , n = 0,1,2,3.........If coefficient a(n) = f(n) for n=0,1,2,3 etc, then since a(n) is the same for all x [in the equation S(x) = a(n)x^n] you could work out f(n) empirically.

The series a(n) goes, 1, 4, 14, 48 etc.

If you find the natural log - ln(a) - of the series and then assume a quadratic relationship ln(a) = W(n^2) + Y(n) + Z, you can come to an estimate f(n) of:
a(n) = exp (n^2 + 0.227947177*n + 0.188226406). I used a spreadsheet and a couple of moments of trial and error to work this out.

This will give you the following estimated a(n)
1.207106781
4.121320344
14.07106781
48.04163056
164.0243866
560.0142853
1912.008368
6528.004902
22288.00287
76096.00168
259808.001
887040.0006
3028544
10340096
35303296
120532992
411525376

compared to the actual a(n) of:
1, 4, 48, 164, 560, 1912, 6528, 22288, 76096, 259808, 887040, 3028544 etc

Between n=3 and n=200 you are no more than 0.01% out, and after n=17 you are 0.000000000004% inaccurate, although by then the values of a(n) are getting quite large.
You first become more inaccurate than 1 (i.e. when estimate of a(n) is greater / less than real a(n) by more than 1) when n = 25.
But by then a(n) is 2.594*10^13.

The only weakness of this estimate is between n=0 and n=3, but even at n=0 you're only 20% out (1.207 compared to real a(0) of 1).
The more accurate you try to be at low n, the more inaccurate you'll be at high n using the assumed quadratic relationship.

This emprical method thus gives an estimate f(n) = a(n).


Or are you looking for continuous function f(x) such that INTEGRAL f(x) from 0 to n = a(n) ?

Xgen
02-09-05, 09:37 AM
If coefficient a(n) = f(n) for n=0,1,2,3 etc, then since a(n) is the same for all x [in the equation S(x) = a(n)x^n] you could work out f(n) empirically.

The series a(n) goes, 1, 4, 14, 48 etc.

If you find the natural log - ln(a) - of the series and then assume a quadratic relationship ln(a) = W(n^2) + Y(n) + Z, you can come to an estimate f(n) of:
a(n) = exp (n^2 + 0.227947177*n + 0.188226406). I used a spreadsheet and a couple of moments of trial and error to work this out.


Yes I see that this approximation is very good. I should try what will give the quadratic approximation for the bigger rows. The problem is that i have not just one row but entire family of polynomials. it is awkward to calculate exery time a(n) . The polynomials become very large and I am not sure that quadratic approximation will work.

I am searching for a way to connect polynomials recurent coeficients, and S(x) with the coeficients between power of n in the exponential. I am sure that such connection exist. Because the integral of f(x,t) from 0 to infinity should give S(x) which we already know. Also the integral int(tf(x,t)dt) should give the mathematical expectation of the row.

Or are you looking for continuous function f(x) such that INTEGRAL f(x) from 0 to n = a(n) ?

Yes. When polynomials becomes too complex it will be more convenient the rows to be displaced with continious function f(x,t) , where x is parameter.I am trying to find good enough exponential approximation of the row a(n)x^n
in such a way that all coefficients in the exponential to be determined only knowing the recurent dependency. I suppose that if i found it for P(x,t) =1+4x-2x^2 I will be able to extrapolate it for the rest polynomials from the family.