shuffling

Best method of generating a number with 256 random bits?

What is the best method of generating a number with 256 random bits? Does concatenating random bytes work? byte[] data = new byte[32]; RNGCryptoServiceProvider rng = new RNGCryptoServiceProvider(); rng.GetNonZeroBytes(data); // should include zero bytes? string number = BitConverter.ToString(data, 0).Replace("-", ""); Further more, ...

Why is fisher yates the most useful shuffling algorithm?

Would you say modern version of fisher yates is the most unbiased shuffling algorithm? How would you explain that each element in the array has a probability of 1/n being in its original spot? ...

How can I shuffle a list without randomness, and guarantee that a portion of elements will eventually appear on one side?

Given a list of elements, does a shuffling algorithm exist that will guarantee that eventually a selected half portion will be on one side, and the remainder on the other? Example: { 4, 3, 10, 7, 2, 9, 6, 8, 1, 5 } Given the set above, I'd like to have a mixing algorithm that eventually moves the marked ones to the left, even though...

What shuffling algorithms exist besides Fisher-Yates and finding the "next permutation?"

Specifically in the domain of one-dimensional sets of items of the same type, such as a vector of integers. Say, for example, you had a vector of size 32,768 containing the sorted integers 0 through 32,767. What I mean by "next permutation" is performing the next permutation in a lexical ordering system. Wikipedia lists two (http://en...