Melatonin@lemmy.dbzer0.com to Autism@lemmy.world · 7 days agoSeven standard "riffle" shuffles are needed to effectively randomize a 52-card deck.message-squaremessage-square21fedilinkarrow-up184arrow-down12
arrow-up182arrow-down1message-squareSeven standard "riffle" shuffles are needed to effectively randomize a 52-card deck.Melatonin@lemmy.dbzer0.com to Autism@lemmy.world · 7 days agomessage-square21fedilink
minus-squarehenfredemars@infosec.publinkfedilinkEnglisharrow-up10·7 days agoIt’s also not sufficient to randomize a deck of cards using a 32-bit seed as was once common in software. Indeed, even with a 64 bit seed, it is not sufficient.
minus-squarederekabutton@lemmy.worldlinkfedilinkEnglisharrow-up12·7 days agoSome quick math tells me you need 256 bits. Big numbers are wild
minus-squaremindbleachlinkfedilinkarrow-up1·6 days agox = new Array(52).fill(0).map( (v,i,a) => i+1 ) x.reduce( (a,b) => a + Math.log(b) ) / Math.log(2) 227.02369816459176 So it’d take 228 bits.
It’s also not sufficient to randomize a deck of cards using a 32-bit seed as was once common in software.
Indeed, even with a 64 bit seed, it is not sufficient.
Some quick math tells me you need 256 bits. Big numbers are wild
x = new Array(52).fill(0).map( (v,i,a) => i+1 )
x.reduce( (a,b) => a + Math.log(b) ) / Math.log(2)
227.02369816459176
So it’d take 228 bits.