lundi 30 mars 2015

From 256bit randomize from array of 54 elements

If I have a 256 bit array (selector),Ho do I select 5 elements from an array of 54 element using the 256 bit array ?. It's possible to take only first K bits from selector array to accomplish it and not use all the 256 bit. The requirements are:



  • Same selector will lead to same 5 elements being picked .

  • Need it to be statistically fair so if I run all every possibility of bits in the selector array it will bring an even spread of times occurrences in the the 5 elements array.


I know that there is 2,598,960 combinations of 5 element can be selected from array of 54, without caring about the order of selecting them.





Aucun commentaire:

Enregistrer un commentaire