wraithx on Sun, 26 Jun 2016 07:19:08 +0200 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: Need permutation help for n!/(n-r)! |
On 6/25/2016 7:53 AM, chandra sekaran wrote:
Hi Bill I have not put the question properly. (18:08) gp > 50!/(50-3)! %3 = 117600 Out of 117600 , some number following permutation will fall. I want to find the number. [38, 40, 41] , [2,3,5], [10,11,12], [12,11,10] or Find the three number permutation which will fall on 2000. If n grows bigger( say 600! ) fast finding three number set and reverse is possible? Thanks Chandrasekaran B
You will need to define what order you want to put these elements in. For example [2,3,5], could be obtained with:
[1,2,3] #1 [1,2,4] #2 [1,3,4] #3 [2,3,4] #4 [1,2,5] #5 [1,3,5] #6 [1,4,5] #7 [2,3,5] #8 *Found Found on the 8th element. Or, is it: [1,2,(3-50)] #1-48 [1,3,(4-50)] #49-95 [1,4,(5-50)] #96-141 ... [1,49,50] #1176 [2,3,4] #1177 [2,3,5] #1178 *Found Found on the 1178th element.Also, do the elements of interest for you range from 0-49, or from 1-50? (the above examples use 1-50)
-David C.