What will answer 2 3 1 4 5? I think it is infinity.
1 - 2 3 1 4 5
2 - 3 1 2 4 5
3 - 2 3 1 4 5
1 and 3 are same
Re: What will answer 2 3 1 4 5? I think it is infinity.
No, 3-1 2 3 4 5. The digit always mean index for the first line.
Re: What will answer 2 3 1 4 5? I think it is infinity.
but i can't find answer 3 with LCM?
Re: What will answer 2 3 1 4 5? I think it is infinity.
2&3&1 is a loop with length 3
4 is a loop with length 1
5 is a loop with length 1
LCM(3,1,1)=3
I can't undertand it : 2&3&1 is a loop with length 3
2&3&1 is a loop with length 3
Edited by author 19.08.2010 16:11
Re: I can't undertand it : 2&3&1 is a loop with length 3
ok.I understood.
Edited by author 19.08.2010 16:21
Re: I can't undertand it : 2&3&1 is a loop with length 3
Say it in this way:
select an arbitraty number n, let i=n;
while( P(i)!=n ) i=P(i);
all the numbers "involved" makes a loop.
in case 2 3 1
select n=2,i=2;
P(i)=3 so i=3;
P(i)=1 so i=2;
now i=n, exit loop;
You can prove the following statement:
if a loop has X elements, then after exactly X permutations, every elements in the loop is on its proper position in EN.
is that clear? Since you are very good in maths, you may prove it yourself.
Re: I can't undertand it : 2&3&1 is a loop with length 3
yes my math is good. But i begun to learn programming since 18.
Due to it I am not very good at finding algorythm.
Do you know really good book with examples for learning algorythms.
Re: I can't undertand it : 2&3&1 is a loop with length 3
Sorry I only know books written in Chinese.
Re: I can't undertand it : 2&3&1 is a loop with length 3
May be it is translation from English or Russian
Re: I can't undertand it : 2&3&1 is a loop with length 3
All I know are written by Chinese authors.
Re: I can't undertand it : 2&3&1 is a loop with length 3
cormen introduction to algorithms (pdf)
Knuth and other)
yes my math is good. But i begun to learn programming since 18.
Due to it I am not very good at finding algorythm.
Do you know really good book with examples for learning algorythms.