From: "SHULTZ,BARRY (HP-Israel,ex1)" Date: 2001-01-03T06:21:03+09:00 Subject: [ruby-talk:8540] Re: speedup of anagram finder > -----Original Message----- > From: Ben Tilly [mailto:ben_tilly@hotmail.com] > Sent: Tuesday, January 02, 2001 9:22 PM > To: ruby-talk@netlab.co.jp > Subject: [ruby-talk:8533] Re: speedup of anagram finder > > Those with some math will know that e=exp(1) is transcendental. > This was proved by Hermite in 1873. From that it is trivial > that exp(0.1) is also transcendental. Therefore no linear > combination (with integer coefficients) of exp(0.1), exp(0.2), > ..., exp(3.0) can be 0 except the trivial one. > > This allows us to come up with a hashing function using floating > point numbers. The only issue is what point we will get into > pain from round-off errors. > > Just map the characters onto convenient fractional powers of e > and add them together. > Oops. Now I see I'm the one who didn't understand what _you_ were saying. Thanks for the input. Barry