ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1024. Permutations

Please, explain me something
Posted by VladG 1 May 2003 18:08
It looks like the permutation in given example enters to the
infinitive loop.
4 1 5 2 3
2 4 3 1 5
4 1 3 2 5
2 4 3 1 5
....

In what I'm wrong???
Re: It is simple!
Posted by Ovchinnikov Georg 1 May 2003 22:21

Product permutations means application of one permutation after
another look:
1 2 3 4 5
4 1 5 2 3
To increase on
1 2 3 4 5
4 1 5 2 3
Let's receive
2 4 3 1 5
That as means that 1 passes in 4 which then passes in 2,
2 passes in 1 which then passes in 1 which passes in 4 and so on.
Let's multiply once again:
1 2 3 4 5
4 1 5 2 3
On
1 2 3 4 5
2 4 3 1 5
Let's receive
1 2 3 4 5
Still it is necessary to notice that permutations have no
commutativity
If you want to learn that that still about permutation that look
Knuth
' The art of computer programming ' volume1.


Re: It is simple!
Posted by VladG 6 May 2003 19:55
Thank you,

I just had a confusion with understanding what is a power of a
permutation. After I understood it, I solve it quite easily.
Re: It is simple!
Posted by Quyon 23 Oct 2009 18:13
I think that it is wrong.

Edited by author 23.10.2009 18:13

Edited by author 23.10.2009 18:13