If you want to solve your problem with a random number generator, you just need to find a way to divide the parameter space of all possible shuffling cards into groups.
For example, if you had a random seed that could only be 1 to 4, but a parameter space that had 12 possible permutations, you would decide to use two random samples:
(seed1) determines which group of parameters you were in (1-4.5-8 or 9-12)
(seed2) determines which element is your final result
(The parameter set does not have to be an even multiple of the seed size for this to work.)
I used this method for very complex problems of complexity in physical modeling of a solid body. This is a rigorous mathematical solution, but it may not be the most elegant software solution. Good luck to you.
source share