Path: utzoo!attcan!uunet!seismo!sundc!pitstop!sun!decwrl!megatest!djones From: djones@megatest.UUCP (Dave Jones) Newsgroups: comp.lang.c Subject: Re: magic number 32821 (Attn. frede) Keywords: hash Message-ID: <835@goofy.megatest.UUCP> Date: 27 Sep 88 01:42:44 GMT Organization: Megatest Corporation, San Jose, Ca Lines: 15 I attempted to send this reply directly to frede@hplabs, but it got bounced. He wanted to know where in Sedgewick I found the number 32821 as a good candidate to multiply integers by in order to "splatter" them around as part of a hash function. I could have been more informative. Sedgewick does not recommend the technique for hashing. It's in the section on linear-congruential random number generators. Of course, just multiplying by this number may not splatter things enough for a good hash-function. If the input numbers are all even, for example, the splattered numbers will also be all even. Caveat Multiplicator.