ArticleslgStudy

science

Static hashing

Static hashing is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Static hashing rather than just read about it. In short: Static hashing is a form of hashing where lookups are performed on a finalized dictionary set (all objects in the dictionary are final and not changing). Usage Application Since static hashing requires that the database, its objects, and reference remain the same, its applications are limited.

Key takeaways

  • Static hashing belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Static hashing to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Static hashing from memory before moving on to harder problems.

Reference excerpt

Static hashing is a form of hashing where lookups are performed on a finalized dictionary set (all objects in the dictionary are final and not changing).

Usage

Application Since static hashing requires that the database, its objects, and reference remain the same, its applications are limited. Databases which contain information which changes rarely are also eligible as it would only require a full rehash of the entire database on rare occasion. Examples of this include sets of words and definitions of specific languages, sets of significant data for an organization's personnel, etc.

Perfect hashing Perfect hashing is a model of hashing in which any set of n {\displaystyle n} elements can be stored in a hash table of equal size and can have lookups done in constant time. It was specifically discovered and discussed by Fredman, Komlos and Szemeredi (1984) and has therefore been nicknamed "FKS hashing".

FKS hashing FKS hashing makes use of a hash table with two levels in which the top level contains n {\displaystyle n} buckets which each contain their own hash table. FKS hashing requires that if collisions occur they must do so only on the top level.

Implementation The top level contains a randomly created hash function, h ( x ) {\displaystyle h(x)} , which fits within the constraints of a Carter and Wegman hash function from universal hashing. Having done so the top level shall contain n {\displaystyle n} buckets labeled k 1 , k 2 , k 3 , . . . , k n {\displaystyle k_{1},k_{2},k_{3},...,k_{n}} . Following this pattern, all of the buckets hold a hash table of size s i {\displaystyle s_{i}} and a respective hash function h i ( x ) {\displaystyle h_{i}(x)} . The hash function will be decided by setting s i {\displaystyle s_{i}} to k i 2 {\displaystyle k_{i}^{2}} and randomly going through functions until there are no collisions. This can be done in constant time.

Performance Because there are ( n 2 ) {\displaystyle n \choose 2} pairs of elements, of which have a probability of collision equal to 1 / n {\displaystyle 1/n} , FKS hashing can expect to have strictly less than n / 2 {\displaystyle n/2} collisions. Based on this fact and that each h ( x ) {\displaystyle h(x)} was selected so that the number of collisions would be at most n / 2 {\displaystyle n/2} , the size of each table on the lower level will be no greater than 2 n {\displaystyle 2n} .

See also Hash function Dynamic perfect hashing

References

Worked examples

Example 1 — a first encounter with Static hashing

Start with the simplest possible case. Write down what Static hashing claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Static hashing before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Static hashing ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Static hashing

In research
Static hashing appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Static hashing in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Static hashing is common in secondary-school and first-year university syllabi. It links to neighbouring topics Hashing, so understanding it makes those chapters shorter.
In everyday life
Look for Static hashing outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Static hashing” →

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Static hashing in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Static hashing means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Static hashing out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Static hashing in simple terms?

Static hashing is a form of hashing where lookups are performed on a finalized dictionary set (all objects in the dictionary are final and not changing). Usage Application Since static hashing requires that the database, its objects, and reference remain the same, its applications are limited.

Why does Static hashing matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Static hashing?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Static hashing.

Tags

  • Hashing

Keep exploring