linear linear scheme computer programming resolving collisions tables data structures maintaining collection key value pairs looking value associated given key invented analyzed double linear form open addressing schemes cell table stores single key value pair function causes collision mapping new key cell table occupied key linear searches table closest following free location new key performed way searching table starting position given function finding cell matching key cell write tables commonly data structures popular implementation standard hardware uses linear fast simple linear provide high performance good locality reference sensitive quality function collision resolution schemes takes constant expected time search implemented random function independent function operations linear component open addressing schemes table solve dictionary problem dictionary problem data structure maintain collection key value pairs subject operations insert pairs collection search value associated given key open addressing solutions problem data structure array table cells store single key value pair function map key cell key stored typically keys keys similar values placed near table collision occurs function maps key cell occupied different key linear strategy resolving collisions placing new key closest following cell search search given key cells examined beginning cell index function continuing adjacent cells finding cell cell stored key cell containing key found search returns value cell cell found key table placed cell preference later cell searched case search returns result key present dictionary insert key value pair table possibly replacing existing pair key follows sequence cells followed search finding cell cell stored key new key value pair placed cell cause load factor table fraction occupied cells grow threshold table replaced new table larger constant factor new function dynamic array setting threshold close zero high growth rate table size leads faster table operations greater memory usage threshold values close low growth rates common choice double table size load factor exceed causing load factor stay possible remove key value pair dictionary sufficient simply cell affect searches keys value earlier emptied cell stored position later emptied cell emptied cell cause searches incorrectly report key present instead cell emptied necessary search forward following cells table finding cell key moved cell key value equal earlier cell found cell safe process terminates search finds key moved cell performs effect speeding later searches moved key cell later block occupied cells search key continues new emptied cell way terminates reaching cell process moving keys earlier cells key examined time complete process proportional length block occupied cells containing deleted key matching running time table operations alternatively possible use lazy strategy key value pair removed replacing value special flag value indicating deleted key flag values contribute load factor table strategy necessary clean flag values array remaining key value pairs large fraction array occupied deleted keys properties linear provides good locality reference causes require memory operation low moderate load factors provide high performance compared open addressing strategies performance quickly high load factors primary tendency collision cause nearby collisions additionally achieving good performance method requires higher quality function collision resolution schemes low quality functions fail eliminate input distribution linear slower open addressing strategies double sequence cells separation determined second function size step varies depending position probe sequence analysis linear dictionary operations implemented constant expected time words insert remove search operations implemented long load factor table constant strictly detail time particular operation search proportional length block occupied cells operation starts starting cells equally likely table cells block occupied cells probability containing starting location search time starting location expected time operation calculated product terms summed blocks cells table similar sum squared block lengths gives expected time bound random function random starting location specific state table blocks exist ones actually exist given state table term potential block probability block actually occupied defining block event block occupied cells length beginning index expected time operation formula formula replacing block simpler necessary condition event elements values lie block cells length replacement value sum longer depends factor terms outer lead bound formula form bound load factor bounded away probability block length contains values small function causing sum bounded constant independent possible perform analysis instead bound estimate probability block contains exactly values terms load factor expected time successful search expected time unsuccessful search new key constant load factors high probability longest probe sequence probe sequences keys stored table length choice function linear especially sensitive distributed values important combine high quality function produce irregularities analysis assumes key random number independent keys assumption unrealistic applications random values objects identity value instance linear class java collections framework value class associates object guaranteed remain fixed lifetime object arbitrary constructed object required related object address value construction involve slower random number generator instance uses number generator construct values applications necessary function value time object created applications random numbers values different objects value different functions designed indistinguishable truly random functions usually slow tables instead methods constructing functions devised methods function quickly proven work linear particular linear analyzed framework independent class functions small random seed equally likely map distinct keys thought measure function quality larger time function behave similarly completely random functions linear independence guarantee constant expected time operation independent functions perform badly taking time operation method constructing functions high quality practical speed method value key key index table random numbers different table position numbers table cells combined exclusive operation functions constructed way independent linear functions takes constant expected time operation standard methods generating independent functions limited keys fixed number bits handle strings types variable length keys possible compose simpler universal technique maps keys intermediate values higher quality independent function maps intermediate values table history idea array allows data accessed value address dates work tables described memorandum different collision resolution method linear early history linear open addressing method originally synonymous open addressing according née program computer published description linear credits samuel adds system natural likely conceived independently time early publication method soviet researcher theoretical analysis linear showing takes constant expected time operation random functions given calls work landmark analysis significant later developments include detailed analysis probability distribution running time proof linear runs constant time operation practically usable functions random functions assumed earlier analysis
Linear probing