Strings of size X per Hash of size Y

2 bits hash

2 bits string: 4/4=1
3 bits string: 8/4=2
4 bits string: 16/4=4
5 bits string: 32/4=8

# of strings X bits long producing a hash Y bits long: (2^X)/(2^Y)
# of strings with [Y..X] bits producing Y bits long hash:
For Z=Y to X: Result=Result+(2^Z/2^Y)
or
For Z=0 to (X-Y): Result=Result+2^Z

I’ll test both algos and then tell you why I am measuring how many strings of a given size can have the same hash.

Advertisements

Leave a comment

Filed under Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s