Special Handout:  Hashing Revisited.

Hashing and indexing: Using part of a key as index to determine where to 
	store and find data.

The data is stored in buckets or bins.

Indexing uses meaningful (ordered) parts of the key:
    Example: put visitting card into slots labelled with first letter of 
	name.
   On average: reduces size of problem by dividing by number of buckets.
   BUT what if all the names start with 'S'?

Hashing uses deliberately randomizes the key to spread the data over the 
	buckets evenly.

	Ch 17. Lucky hash
	Collisions.
	Perfect = 0 collisions plus 100% efficient storage.
	Demo of hashing/indexing with Cards
              open item hashing?

        coding:various hashing steps
		letter->int trick.
			c-'a'
		extract([]), fold, mod(%), exor(^), mod(%), shift (>>, <<)...

	Hashing revisited paper

	Ch 17 sorting
   countSort
	Use when items repeat themselves.
	Inverted index!

skip   bucketSort needs a monotonic 'hashfunction' -- this is indexing not
	hashing.

   radixsort - when keys lie in a small range of values
		bitwise faster, but may as well use a single bit and two 
		hardcoded vectors!
	Optimal: use two arrays and pointers to switch buffers.

Review for final.
   Projects?
   Questions about Final?

Handout: final structure and old question on hashing.

Topics on Final:
  http://ftp.csci.csusb.edu/dick/cs330/Slides/20.review.html

Course Review
   Knuth on Searching and Sorting, IFIP 1971,

   Best Wishes for the Final
   Draft Scorers and grades posted on WWW   as soon as calculated.
   Posted outside office on Tuesday morning.


References for after end of class
	http://www.nist.gov/dads/