Math Is Fun Forum
  Discussion about math, puzzles, games and fun.   Useful symbols: √ ∞ ≠ ≤ ≥ ≈ ⇒ ∈ Δ θ ∴ ∑ ∫ π -

Login

Username

Password

Not registered yet?

  • Index
  •  » Help Me !
  •  » non-requrent function for requrent fractal processes

#1 2006-02-06 18:13:52

krassi_holmz
Real Member

Offline

non-requrent function for requrent fractal processes

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.

#2 2006-02-06 18:16:50

krassi_holmz
Real Member

Offline

Re: non-requrent function for requrent fractal processes

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.

#3 2006-02-06 19:54:24

krassi_holmz
Real Member

Offline

Re: non-requrent function for requrent fractal processes

Here's a program in Mathematica:
Starting with:
in[1]:=

Code:

str = "1";

in[2]:=

Code:

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.

#4 2006-02-06 19:55:45

krassi_holmz
Real Member

Offline

Re: non-requrent function for requrent fractal processes

Now I'm starting with num(1)/num(2) question.


IPBLE:  Increasing Performance By Lowering Expectations.

#5 2006-02-06 20:45:05

krassi_holmz
Real Member

Offline

Re: non-requrent function for requrent fractal processes

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:


so
,
where x[[i]] means the i-th element of list x.

Last edited by krassi_holmz (2006-02-06 20:46:43)


IPBLE:  Increasing Performance By Lowering Expectations.

#6 2006-02-07 04:48:01

mathsyperson
Moderator

Offline

Re: non-requrent function for requrent fractal processes

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 nth Fibonacci number.


Why did the vector cross the road?
It wanted to be normal.

#7 2006-02-07 06:35:08

krassi_holmz
Real Member

Offline

Re: non-requrent function for requrent fractal processes

thank you, Mathsy, but I've known it.
I think I found something.


IPBLE:  Increasing Performance By Lowering Expectations.

#8 2006-02-07 06:38:08

krassi_holmz
Real Member

Offline

Re: non-requrent function for requrent fractal processes

The fractal relation is that when we write the connections, we get a kind of tree.


IPBLE:  Increasing Performance By Lowering Expectations.
  • Index
  •  » Help Me !
  •  » non-requrent function for requrent fractal processes

Board footer

Powered by FluxBB