![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Dec 2005
Posts: 2
Rep Power: 0
![]() |
2 problems on permutations
I have two problems on permutations which I canīt solve now becuase my knowledge about permutations and the necessary tricks is very poor.
1st: Find an algorithm that for given natural N (N<=1000), K and given permutation of N elements will find the Kth composition of this permutation in time less or equal to O(N log K). 2nd: Find an algorithm that fot given natural N (N<=1000) and given permutation of N elements will determine the number of all cycles that the permutation is composed from in time less or equal to O(n). Can anybody give me some hint related with any of this two problems, Iīm mainly confused as to the satisfaction the maximal possible effecienty. |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|