Hello,
For a project of Statistical O.R. (Operational research), I have to make several things:
From a mathematical point of view, the set A contains n! / (k! (n - k)!) and every set Bi contains j! Elements; let be a total of j! (n! / (k! (n - k)!)).
Example:
A bus of 80 places possesses 15 passengers and every passenger in a specific peculiarity among 10 categories, count all the possibilities of placement of these passengers in the bus.
The total number of combinations is thus 10! (80! / (15! (80 - 15)!)) = 5 472 782 816 133 670 000 000
I would want your opinion to proceed how, I have to begin by calculating the set A in its entirety or seeing to it that as this one fills to create the sets Bi in which I have "access"; or to approach quite other approach?
Furthermore I would like a help on some points where I do not how see proceeding:
Thank you in advance in all, for the worn attention on this message as well as on any brought help!
NB This was translated from french, so it may be inaccurate translation
For a project of Statistical O.R. (Operational research), I have to make several things:
- First of all, list the set A all the combinations of k elements in a set of n elements (k < = n)
- Then, for every combinations Have to list the set Bi all the permutations of j possible values.
- Finally for every Bil verify if they corresponds to the constraints (to define according to the research).
From a mathematical point of view, the set A contains n! / (k! (n - k)!) and every set Bi contains j! Elements; let be a total of j! (n! / (k! (n - k)!)).
Example:
A bus of 80 places possesses 15 passengers and every passenger in a specific peculiarity among 10 categories, count all the possibilities of placement of these passengers in the bus.
The total number of combinations is thus 10! (80! / (15! (80 - 15)!)) = 5 472 782 816 133 670 000 000
I would want your opinion to proceed how, I have to begin by calculating the set A in its entirety or seeing to it that as this one fills to create the sets Bi in which I have "access"; or to approach quite other approach?
Furthermore I would like a help on some points where I do not how see proceeding:
- Manage the saving of the process, the sort to be able to resume it later at the stage where it had stopped (as for the moment I manage all this by means of récursive I do not manage to save correctly my state)
- Allow the display of the progress by means of ProgressBar, the problem being large numbers to be managed and which format to use to store them knowing that it has to slow down the least possible the rest (thus Decimal to avoid for example)
- Any runway useful for the optimization of as well in term of speed of execution, that in term of memory (of the process in him even on one hand and the format of storage of the valid results on the other hand, knowing that any data base is excluded (at least for the moment))
Thank you in advance in all, for the worn attention on this message as well as on any brought help!
NB This was translated from french, so it may be inaccurate translation