You are not logged in.
I'll try to explain one function.
It takes a string and seaches for 1-s and 2-s. It replaces the 1-s with 2-s and the 2-s with "12".
Start with 1:
1
F[1]= 12
| |\
F[12]=21 2
/|| /\
F[&]=122 1 2
| |\\\ \\ \
F[&]=21212212
and so on.
I need a function f[m,n] that gives the value of the n-th element of the m-th row.
Example:
f[1,1]=1
f[2,1]=1;f[2,2]=2
f[3,1]=2;f[3,2]=1;f[3,3]=2
...
Please post every suggestions.
IPBLE: Increasing Performance By Lowering Expectations.
Offline
And the other question: does
number of 1-s in a row
-------------------------- ≈ 1, or not?
number of 2-s in a row
If not, num(1)/num(2)≈?, if exist such a number.
IPBLE: Increasing Performance By Lowering Expectations.
Offline
Here's a program in Mathematica:
Starting with:
in[1]:=
str = "1";
in[2]:=
StringReplace[str,"2" -> "34"];
StringReplace[%,"1" -> "2"];
StringReplace[%,"3" -> "1"];
p=StringReplace[%,"4" -> "2"];
Print[p];
str=p;
pt=Table[StringTake[p,{i}],{i,1,StringLength[p]}];
Print[N[Count[pt,"1"]/Count[pt,"2"],20]];
The first out gives the string, the second gives num(1)/num(2).
You can execute in[2] much times and you'll get bigger and bigger number.
IPBLE: Increasing Performance By Lowering Expectations.
Offline
Now I'm starting with num(1)/num(2) question.
IPBLE: Increasing Performance By Lowering Expectations.
Offline
Lim[row->oo] num(1)/num(2)=phi
(phi=(1+sqrt(5))/2)
Why?
here's a proof:
let in a row r we have n 1-s and m 2-s. :
I'll wrote it like this:
R(r)= (n,m)
Then in a row r+1 we'll have m 2-s and n+m 1-s:
R(r+1)= (m,n+m)
Starting with R(1)= (1,0) we get:
R(1)= (1,0)
R(2)= (0,1)
R(3)= (1,1)
R(4)= (1,2)
R(5)= (2,3)
R(6)= (3,5)
R(7)= (5,8)
R(8)= (8,13)
...
So n and m are sonsecutive Fibonacci numbers.
We use the well-known limit:
Last edited by krassi_holmz (2006-02-05 21:46:43)
IPBLE: Increasing Performance By Lowering Expectations.
Offline
Interesting question, krazzi. I'm sure there must be a pattern hidden in there if we look hard enough. I'll have a closer look later, but for now I'll give you this formula, in case you don't know it:
...where
is the n[sup]th[/sup] Fibonacci number.Why did the vector cross the road?
It wanted to be normal.
Offline
thank you, Mathsy, but I've known it.
I think I found something.
IPBLE: Increasing Performance By Lowering Expectations.
Offline
The fractal relation is that when we write the connections, we get a kind of tree.
IPBLE: Increasing Performance By Lowering Expectations.
Offline