   Bookmarking A Combination Algorithm?
  I have a method that calculates C(n, r) for an array of indices. No big deal. The problem is that I want to run this calculation asynchronously, because the size of possible combinations is too large a) to wait for, and b) to initialize an array to store it.For example if you were building a poker odds calculator, you'd notice that to find all combinations of you, and an unknown player showing down to the river, you'd have this on your hands:1. C(52, 2) : deal your hand, which is known; this is for reference only.2. C(50, 2) * C(48, 5) : deal your unknown opponent, then the board cards.   -------------------1225 * 1712304    = 2097572400 combinationsObviously you can't work with that kind of size with a single synchronous call to a combination method.My question is whether the concept of factoradics (in short, serializing a combination to a unique int) could be applied here to give that method, or a derived method, a "bookmark" to get back to the combination task at hand, which would allow it to process, say, one million combinations at a time, but know where it left off and still be able to access each combination in case we're not dealing with int arrays but references to objects -- I know we can't keep them around but can we reconstruct them dynamically from a factoradic index?I guess I'm looking for some help visualizing what this would look like, and how one could manage the combination method to be able to process example 2. (two combinations that depend on each other, i.e. a foreach in C#) so that it could be run asynchronously.   