Prob.
Sampling from random
Q: use a uniform random generator
rand(7)to produce uniform randomrand(10).
Combine 2 rand(7) ( and ) as , we can obtain a uniform sampling .
Then reject if , and finally .
Coding
Coding is the basic skills for a software engineer, no matter how LLM/agent powerful is.
All permutations
permutation.cc
Loading…
Q: if we have a
next_permutationfunction, how to obtain all possible values of combination based on this?
Compare a 0-1 array with ones and zeros.
Run next_permutation on this array, each result means a snapshot of combination.