Re: File Hashing



On May 29, 10:12 am, "Johnny Jörgensen" <j...@xxxxxxxxx> wrote:
3) To everybody who answered that my first two questions were identical:
They're not - it depends on the answer.

No it doesn't. They're logically equivalent.

Suppose the answer to question 2 was "yes" - i.e. there can never be
two different files with the same hash value. That implies that if two
files have the same hash value, they can't be different, i.e. they are
identical. Hence the answer to question 1 would have to be "yes" as
well.

To put it in pure logic terms, if A is the predicate "X and Y have
identical hashes" and B is the predicate "X and Y are identical
files", your questions were:

1) A => B
2) !B => !A

I hope you can see how these are logically equivalent questions.

Jon
.



Relevant Pages

  • Re: a short article about equality in Lisp (for beginners)
    ... | equality predicate + hash function. ... | according to whether the equality function is eq, eql, equal or equalp. ... tests and hashing methods. ... hashing function for an arbitrary equality predicate. ...
    (comp.lang.lisp)
  • Re: in praise of tabling
    ... Well, tabling is, to a first order approximation, Prolog-speak for ... Whenever a new result for the predicate is computed, ... result is recorded in the hash table. ... upon whether the cost of recomputation outweighs the cost of checking ...
    (comp.lang.prolog)
  • Re: User-defined EQUALP
    ... with a determinable initial hash size. ... The standard provides no appropriate hash table predicate for ... case sensitive vectors of strings: ...
    (comp.lang.lisp)
  • Re: in praise of tabling
    ... Whenever a new result for the predicate is computed, the result is recorded in the hash table. ... table calls, not returns, so as to act on recursion loops. ...
    (comp.lang.prolog)