Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <2cc3d54adc359e2a7bb6051c808d32c9@smtp.hushmail.com>
Date: Tue, 18 Apr 2023 18:28:54 +0200
From: magnum <magnumripper@...hmail.com>
To: john-dev@...ts.openwall.com
Subject: Re: Birthday paradox

On 2023-04-18 17:57, magnum wrote:
> Can anyone point me to a (approximation) formula for the birthday 
> paradox, where for example we have a bitmap with 4096 bits and populate 
> it with 1024 random bits. What is the expected number of bits set in the 
> bitmap?
> 
> I think the answer is ~907, as that's what I'm seeing in my experiments 
> - and also what this simple script shows:

Talking to the duck works every time :)

Found it at 
https://jaxwebster.wordpress.com/2012/01/24/expected-number-of-different-birthdays/

It's as simple as 4096*(1-(4095/4096)^1023) where ^ means power of, as 
in bc(1):

$ bc -l <<< '4096*(1-(4095/4096)^1023)'
905.35038980915274346496

magnum

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.