Permutation method in C#

Posted by Sunitajadhav under C# on 1/12/2010 | Views : 5729 | Status : [Member] | Replies : 1
Hello friends,
I have one schedule it contain 10 activities and first and last activities are dummy activity.I want permutation of remaining 8 activities.Using factorial i got total number of permutations.

Input: Number of Activities :10. Ex: 1,2,3,4,5,6,7,8,9,10
Dummy activities: 1, 10
Number of activities for factorial: 8 Ex: 2,3,4,5,6,7,8,9

Factorial Sequences: 8!= 40320 permutations.
In each combination first and last activities will remain same.

Now i want 40320 schedules.Using permutation i want schedule sequence.

Thanks in advance.




Responses

Posted by: Sagarp on: 1/12/2010 [Member] Bronze

Up
0
Down

HI Sunita
ref this link

http://www.developersdex.com/csharp/message.asp?p=1111&r=6555442
http://www.codeproject.com/KB/recipes/Premutations.aspx

http://stackoverflow.com/questions/710670/c-permutation-of-an-array-of-arraylists
http://www.functionx.com/csharp2/examples/permutation.htm
http://www.dreamincode.net/code/snippet2335.htm

Thanks

sagar pardeshi

Thanks
SagarP
http://www.emanonsolutions.net
http://emanonsolutions.blogspot.com/

Sunitajadhav, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response