Article View: comp.theory
Article #2082Re: Modulus (Re: hashing function for strings)
From: Robert D. Silverman
Date: Fri, 23 Feb 1990 12:38
Date: Fri, 23 Feb 1990 12:38
33 lines
2109 bytes
2109 bytes
In article <E5$4$m@cs.psu.edu> flee@shire.cs.psu.edu (Felix Lee) writes:
>Bob Silverman <bs@linus.mitre.org> wrote:
>>The mapping 5 div 3 -- > 1 is a function. It is the floor function
>>of the quotient. Why on earth SHOULD one expect that for some function f
>>abs(f(a,b)) = abs(f(-a,b))?????
>>It would be the same as expecting f(a,b) = -f(-a,b). This simply is not
>>true of all functions.
>
>I find this statement a little strange. Consider:
> The mapping 2 plus 3 -> 5 is a function. Why on earth SHOULD one
> expect that for some function f, f(a,b) = f(b,a)??
Huh? This statement has absolutely nothing to do with what I said.
Oh, for blanks sake. When are you CS weenies going to learn some math?
I said for *some* function f. Not for *all* functions f, and this clown
then picks out an example of a linear function for which f(a,b) = f(b,a),
which has absolutely nothing to do with the issue at hand.
It works for this particular function, but won't work for all.
Will everyone PLEASE go look up the difference between a ring and a field?
The integers are not a field and division is not well defined for every
pair of integers. Choosing a,b \in Z --> a/b = floor[a/b] is the best,
mathematically consistent way to handle integer division. This means
-5/3 = -2. This is absolutely necessary. The integers form a Euclidean
domain. We therefore MUST have 3*(-5/3) + (-5 mod 3) = -5.
--
Bob Silverman
#include <std.disclaimer>
Internet: bs@linus.mitre.org; UUCP: {decvax,philabs}!linus!bs
Mitre Corporation, Bedford, MA 01730
Technical Details
Message-ID:
<98717@linus.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!wuarchive!usc!snorkelwacker!spdcc!merk!alliant!linus!bsReferences:
<Er$cfg@cs.psu.edu> <12099@goofy.megatest.UUCP> <98399@linus.UUCP> <E5$4$m@cs.psu.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!wuarchive!usc!snorkelwacker!spdcc!merk!alliant!linus!bs From: bs@linus.UUCP (Robert D. Silverman) Newsgroups: comp.theory,comp.misc,comp.lang.misc Subject: Re: Modulus (Re: hashing function for strings) Message-ID: <98717@linus.UUCP> Date: 23 Feb 90 12:38:56 GMT References: <Er$cfg@cs.psu.edu> <12099@goofy.megatest.UUCP> <98399@linus.UUCP> <E5$4$m@cs.psu.edu> Reply-To: bs@linus.UUCP (Robert D. Silverman) Organization: The MITRE Corporation, Bedford MA Lines: 33