« first day (4735 days earlier)   

03:12
1
Q: Incremental generation of random permutations?

BCSI have a case where I need to choose a random subset of a list of know size $n$, but I don't know in advance how many items I will need (i.e. keep picking new indexes until $k$ are found that pass some test). What I want is an iterator that, once seeded with a random number, will generate a permu...


« first day (4735 days earlier)