war story: parallel(1) command

Eric gyre-Ja3L+HSX0kI at public.gmane.org
Fri Aug 2 16:24:32 UTC 2013


On Thu, 1 Aug 2013, James Knott wrote:

> D. Hugh Redelmeier wrote:
> > MD5 hashes are quite reasonably distributed over the 128-bit space. You'd
> > need something like 2^64 things for the birthday paradox to fire.
>
> Okay.  You have 128 bit hash.  That's 2^128 possible combinations.  Now
> take a bunch of 1 KB (2^10) files.  Those are 2^13 bits and 2^(2^13)
> combinations.  That means for any given hash, you could have an
> extremely large number of different files that size that could have the
> same hash.  Granted, duplicate hashes are extremely rare, but you can
> never claim they're impossible.

Are you arguing about this specific case, or the principle?

To make it clear, consider an extreme example:
If an event has a probability of
occurring once in a googolplex universe lifetimes, will that
occur in reality?  Of course, not.

Next, is that worth wasting CPU/IO/real time programming for
it because someone says "It is not impossible."?

> 1. The KDE calculator can't handle a number that large

Use 'bc' or Perl with 'bignum':

  $ perl -le 'use bignum; print 2**128'
  340282366920938463463374607431768211456

--
Eric B.

--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list