Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Dec 15th, 2005, 3:07 AM   #1
alejandrito
Newbie
 
Join Date: Dec 2005
Posts: 2
Rep Power: 0 alejandrito is on a distinguished road
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.
alejandrito is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 1:42 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC