11.2.1 Collision Resolution

A collision occurs whenever two or more distinct public symbols in the library have the same block and bucket indexes. A technique known as linear open addressing is used to resolve collisions. It relies on two values, the block and bucket deltas, that are produced at the same time as the block and bucket indexes.

If a symbol collides with a symbol already in the dictionary, the library-management program (librarian) attempts to find an empty bucket for it by adding the bucket delta to the bucket index and using the result (modulo 37) as a new bucket index. If this new bucket index points to a bucket that is empty, the librarian installs the symbol in that bucket. If the bucket is not empty, the librarian applies the bucket delta repeatedly until an empty bucket is found or all buckets in the block have been tried.

If the block has no empty buckets, the librarian adds the block delta to the block index and uses the result (modulo the number of blocks in the dictionary) as a new block index. With the new block index and the original bucket index, the librarian repeats the procedure to find an empty bucket. Since the number of blocks and the number of buckets are both prime numbers, this procedure guarantees that all possible block-bucket combinations are tried no matter what block and bucket indexes and deltas are initially generated for the symbol.