#separator:tab
#html:true
#notetype:Basic
#tags column:3
#deck:cracked.guide::TAOCP Vol 3::6.4 Hashing (part 2)
#columns:Front	Back	Tags
TAOCP §6.4 Hashing (part 2): what does it cover?	Part 2 covers the rest of the section (pages 533 to 549): deleting from open-addressed tables without breaking later searches, the starred analysis of expected probe counts for chaining, linear probing and double hashing as the table fills, hashing on external storage with buckets, a comparison of all the methods, and history.	cracked.guide cracked.guide::phase::taocp-3 cracked.guide::section::6.4 cracked.guide::kind::about
TAOCP §6.4 (part 2): why does it matter?	Open addressing with linear probing is what many modern high-performance hash tables use. Knuth's linear probing analysis is historically the start of the field of algorithm analysis.	cracked.guide cracked.guide::phase::taocp-3 cracked.guide::section::6.4 cracked.guide::kind::why
TAOCP §6.4 (part 2), a common trap: “Deleting by just clearing a slot breaks later searches.” What's the catch?	Tombstones or Knuth's deletion algorithm fix this.	cracked.guide cracked.guide::phase::taocp-3 cracked.guide::section::6.4 cracked.guide::kind::trap
TAOCP §6.4 (part 2): what traps should you watch for?	<ul><li>Letting the load factor get close to 1 with linear probing.</li></ul>	cracked.guide cracked.guide::phase::taocp-3 cracked.guide::section::6.4 cracked.guide::kind::traps
TAOCP §6.4 (part 2), exercise 21 (rated 20, recommended): what is it asking?	After marking a record deleted, should the item count go down?	cracked.guide cracked.guide::phase::taocp-3 cracked.guide::section::6.4 cracked.guide::kind::exercise
TAOCP §6.4 (part 2), exercise 65 (rated 20, recommended): what is it asking?	How to store variable-length keys in a hash table.	cracked.guide cracked.guide::phase::taocp-3 cracked.guide::section::6.4 cracked.guide::kind::exercise
TAOCP §6.4 (part 2), exercise 42 (rated M20, recommended): what is it asking?	Probability that chained hashing finds a free slot immediately.	cracked.guide cracked.guide::phase::taocp-3 cracked.guide::section::6.4 cracked.guide::kind::exercise
TAOCP §6.4 (part 2), exercise 29 (rated M21): what is it asking?	The parking problem: linear probing told as a story about cars.	cracked.guide cracked.guide::phase::taocp-3 cracked.guide::section::6.4 cracked.guide::kind::exercise
TAOCP §6.4 (part 2), exercise 33 (rated M23, recommended): what is it asking?	Why the classic linear probing estimate is only an approximation.	cracked.guide cracked.guide::phase::taocp-3 cracked.guide::section::6.4 cracked.guide::kind::exercise
TAOCP §6.4 (part 2), exercise 34 (rated M23, recommended): what is it asking?	List-length distribution and probe counts for separate chaining.	cracked.guide cracked.guide::phase::taocp-3 cracked.guide::section::6.4 cracked.guide::kind::exercise
TAOCP §6.4 (part 2), exercise 23 (rated 33, recommended): what is it asking?	Design deletion for coalesced chaining, analogous to linear-probing deletion.	cracked.guide cracked.guide::phase::taocp-3 cracked.guide::section::6.4 cracked.guide::kind::exercise
TAOCP §6.4 (part 2), exercise 37 (rated M29, recommended): what is it asking?	Variance of successful search cost under separate chaining. The stretch.	cracked.guide cracked.guide::phase::taocp-3 cracked.guide::section::6.4 cracked.guide::kind::exercise
TAOCP §6.4 (part 2): how many exercises, and how are they rated?	78 exercises, rated 10 to M49.	cracked.guide cracked.guide::phase::taocp-3 cracked.guide::section::6.4 cracked.guide::kind::exercises
TAOCP §6.4 (part 2): what should you be comfortable with first?	<ul><li>6.4 Hashing (part 1)</li></ul>	cracked.guide cracked.guide::phase::taocp-3 cracked.guide::section::6.4 cracked.guide::kind::prereqs
TAOCP §6.4 (part 2): how should you work through it?	Compare this with your clox hash table from chapter 20: tombstones, load factor, linear probing. Measure probe counts at load factors 0.5, 0.75 and 0.9 and compare to Knuth's formulas.	cracked.guide cracked.guide::phase::taocp-3 cracked.guide::section::6.4 cracked.guide::kind::approach
