Pearson Hashing

Pearson hashing is a way of producing random numbers. In 1990, Peter K. Pearson published a pseudo-random walk hash algorithm which produces integers from 0 to 255, using a combination of XOR and a 256-entry non-linear permutation table. Pearson hashing can often be used with a specially selected non-linear permutation table to make a perfect hash function: this combination is known as perfect Pearson hashing. In the Python programming language, the hash algorithm can be implemented as follows (assuming that permutation_table is defined externally):
  def hash(input):      hash_value = len(input) % 256      for character in input:          character = ord(character)  # ord() gets the character's byte value          hash_value = permutation_table^ character 
return hash_value

 

<< PreviousWord BrowserNext >>
mckenzie, alabama
bracknell forest
daniel mcfadden
robert lucas jr
lo fi
prestonsburg, kentucky
royal pavilion
camel (band)
paregoric
incident on 57th street
rosalita (come out tonight)
new york city serenade
gaeltacht
munda
chanda
norurmri
pieter van den hoogenband
chamunda
chandanayika
prescience
akureyri
hull, quebec
rie mastenbroek
saratoga, wyoming
croydon airport
nigel lawson
steinley cup
molar
tetsuya mizuguchi
rez
terrestrial planet finder
owensboro, kentucky
rod serling
chartism
isabelle adjani
khan yunis
euler jacobi pseudoprime
high temperature superconductivity
switchfoot
scandinavian
wayne williams
cornetto
karen ann quinlan
theodor escherich