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, ...
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?
...
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...
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...