3
Most read
11
Most read
13
Most read
Hashing Algorithms and its
applications
Introduction to data sorting and Key searching
What is Hash table?
• A faster way to access data keeping table
• Also known as bucket
• It can be an array of objects (that has all the data)
• Requires a function to convert the real data into placing position
deciding data
• Can use part of the data or time/space stamp to decide the position
• The position is termed as HASH
Randomness of Data
• Data can be of defined pattern and length for which we can have
static length of hash table entries
• Each hash table entry place is a position that is access by the key
• The key is calculated by hash function
• If we know the data pattern, we can easily solve all the key
calculations and also know the number of rows in the has table
• If the data is random, we don’t know the number of entries in the
table
Hashing Function
• Calculates the key for address assignment
• Key = position Hasher (Type entry)
• position StoringPosition = HashTable[Key]
• Here the Hasher is “to add the ASCII values of
Each letter and then take modulo 11”
• Folding:
• A method that divides data into chunks for processing in a Hasher
Normal allocation
• The data is processed using has function
• The hash that is created by the function is searched in the table
• The data is placed there
Hashing algorithms and its uses
Collision
• The Hasher gives a key that is already occupied
• Normally, the old value is discarded and the new incoming data is
stored
• It is probable when the table space is lesser than the incoming data
• Even if table data space is greater than the incoming data, this
problem is probable to occur
Solution to Collision
• Open Addressing
• Same level address is used but on a different location which is calculated by
the user defined rule
• Linear Probing (the entry is saved in the next free space) - It can create clustering
• Plus 3 rehash (the key is are-calculated by adding 3 to the previous entry value)
• Quadratic Probing (the entry is saved by leaving 1, 2, 4, 16 spaces on the HT)
• Double Hashing (Finding the hash of the key obtained)
• PreviousHashKey = Hasher(entry)
• NewHash = Hasher(PreviousHashKey)
• Closed Addressing
• Creating chains
Data Searching and Retrieval
• The data that we want to search uses the same Hash Function
• After the Hasher calculates the Key, it is given directly to the table
Variable and that position has the data
• Search is usually O(n) for linear search and O(log(n)) for binary search
but this method makes the search operation reduced to O(1)
• O(1) means that we calculated the key in a fixed time process and the
we go to the Array[key] to retrieve data using fixed time again
• In case of chaining, we traverse on the node to reach our data so that
makes it an O(n), still faster than complete search strategy.
Linear Probing
Chaining using Linked List
A good Hash Function!
• Minimum Collisions
• Uniform distribution of hash values/keys (avoid clustering)
• Easy to calculate Hash
• Resolve the collision swiftly
Summary
• Used to index large data sets
• Address of each key is calculated by the data itself
• Collision resolved with open or closed addressing
• Hashing is widely used in database indexing, compilers, caching,
password authentication, Blockchain, etc.
• Insert, Delete and retrieve occurs on a fixed time (mostly)

More Related Content

PPTX
Hashing
PPT
Hashing
PPT
Chapter 12 ds
PPTX
Data Structures : hashing (1)
PPTX
Hash table
PPTX
Public Key Cryptography
PPT
Hash table
Hashing
Hashing
Chapter 12 ds
Data Structures : hashing (1)
Hash table
Public Key Cryptography
Hash table

What's hot (20)

PPTX
Hashing in datastructure
PPTX
Hashing Technique In Data Structures
PPTX
Hashing In Data Structure
PPT
Hashing PPT
PPTX
Hashing
PPT
AES.ppt
PPTX
Data structure - Graph
PPTX
Critical section problem in operating system.
PPT
Analysis Of Algorithms - Hashing
PPTX
Graph representation
PPT
DESIGN AND ANALYSIS OF ALGORITHMS
PPT
Graphs In Data Structure
PPT
Asymptotic analysis
PPT
Os Swapping, Paging, Segmentation and Virtual Memory
PPTX
PPT
Skip list vinay khimsuriya_200430723005
PPTX
DMBS Indexes.pptx
PPT
key distribution in network security
PPTX
Key Management and Distribution
PPTX
Code generation
Hashing in datastructure
Hashing Technique In Data Structures
Hashing In Data Structure
Hashing PPT
Hashing
AES.ppt
Data structure - Graph
Critical section problem in operating system.
Analysis Of Algorithms - Hashing
Graph representation
DESIGN AND ANALYSIS OF ALGORITHMS
Graphs In Data Structure
Asymptotic analysis
Os Swapping, Paging, Segmentation and Virtual Memory
Skip list vinay khimsuriya_200430723005
DMBS Indexes.pptx
key distribution in network security
Key Management and Distribution
Code generation
Ad

Similar to Hashing algorithms and its uses (20)

PPTX
Hashing .pptx
PPT
4.4 hashing02
PPT
Hashing
PPTX
session 15 hashing.pptx
PPT
Hashing in Data Structure and analysis of Algorithms
PPTX
Hashing And Hashing Tables
PPTX
Lecture14_15_Hashing.pptx
PPTX
hashing in data structure for Btech.pptx
PPTX
hashing in data structure for Btech .pptx
PPTX
hashing in data structure for engineering.pptx
PPTX
Hashing techniques, Hashing function,Collision detection techniques
PPTX
Data Structures-Topic-Hashing, Collision
PPT
PPTX
Hashing a searching technique in data structures
PPTX
Presentation.pptx
PDF
08 Hash Tables
PPTX
Hashing_Unit4.pptx Data Structures and Algos
PPTX
hashing1.pptx Data Structures and Algorithms
PPTX
8. Hash table
PPT
Hashing Techniques in Data Strucures and Algorithm
Hashing .pptx
4.4 hashing02
Hashing
session 15 hashing.pptx
Hashing in Data Structure and analysis of Algorithms
Hashing And Hashing Tables
Lecture14_15_Hashing.pptx
hashing in data structure for Btech.pptx
hashing in data structure for Btech .pptx
hashing in data structure for engineering.pptx
Hashing techniques, Hashing function,Collision detection techniques
Data Structures-Topic-Hashing, Collision
Hashing a searching technique in data structures
Presentation.pptx
08 Hash Tables
Hashing_Unit4.pptx Data Structures and Algos
hashing1.pptx Data Structures and Algorithms
8. Hash table
Hashing Techniques in Data Strucures and Algorithm
Ad

More from Jawad Khan (20)

PPTX
2.1 input and output in c
PPTX
2.2 variable arithmetics and logics
PPTX
1.2 programming fundamentals
PPTX
1.1 programming fundamentals
PPTX
7 8. emi - analog instruments and digital instruments
PPTX
6. emi instrument transformers (with marking)
PPTX
5 emi ac bridges (with marking)
PPTX
4. emi potentiometer and ac bridges
PPTX
3 .emi wattmeter and energy meter
PPTX
2. emi analog electromechanical instruments
PPTX
1. emi concept of measurement system
PPTX
Varibale frequency response lecturer 2 - audio+
PPTX
Variable frequency response lecture 3 - audio
PPTX
Varibale frequency response lecturer 1 - audio
PPTX
Two port network - part 3
PPTX
Two port network - part 2
PPTX
Two port network - part 1
PPTX
4. ideal transformer and load conversion
PPTX
3. magnetic coupled circuits examples
PPTX
2. magnetic coupled circuits
2.1 input and output in c
2.2 variable arithmetics and logics
1.2 programming fundamentals
1.1 programming fundamentals
7 8. emi - analog instruments and digital instruments
6. emi instrument transformers (with marking)
5 emi ac bridges (with marking)
4. emi potentiometer and ac bridges
3 .emi wattmeter and energy meter
2. emi analog electromechanical instruments
1. emi concept of measurement system
Varibale frequency response lecturer 2 - audio+
Variable frequency response lecture 3 - audio
Varibale frequency response lecturer 1 - audio
Two port network - part 3
Two port network - part 2
Two port network - part 1
4. ideal transformer and load conversion
3. magnetic coupled circuits examples
2. magnetic coupled circuits

Recently uploaded (20)

PDF
The-2025-Engineering-Revolution-AI-Quality-and-DevOps-Convergence.pdf
PDF
SaaS reusability assessment using machine learning techniques
PDF
Transform-Quality-Engineering-with-AI-A-60-Day-Blueprint-for-Digital-Success.pdf
PDF
CCUS-as-the-Missing-Link-to-Net-Zero_AksCurious.pdf
PDF
CEH Module 2 Footprinting CEH V13, concepts
PDF
Transform-Your-Factory-with-AI-Driven-Quality-Engineering.pdf
PDF
Launch a Bumble-Style App with AI Features in 2025.pdf
PDF
zbrain.ai-Scope Key Metrics Configuration and Best Practices.pdf
PDF
AI.gov: A Trojan Horse in the Age of Artificial Intelligence
PDF
Identification of potential depression in social media posts
PPTX
Blending method and technology for hydrogen.pptx
PPTX
Report in SIP_Distance_Learning_Technology_Impact.pptx
PDF
Co-training pseudo-labeling for text classification with support vector machi...
PDF
A hybrid framework for wild animal classification using fine-tuned DenseNet12...
PPTX
Presentation - Principles of Instructional Design.pptx
PDF
NewMind AI Weekly Chronicles – August ’25 Week IV
PPTX
How to Convert Tickets Into Sales Opportunity in Odoo 18
PPTX
Rise of the Digital Control Grid Zeee Media and Hope and Tivon FTWProject.com
PDF
The-Future-of-Automotive-Quality-is-Here-AI-Driven-Engineering.pdf
PDF
Decision Optimization - From Theory to Practice
The-2025-Engineering-Revolution-AI-Quality-and-DevOps-Convergence.pdf
SaaS reusability assessment using machine learning techniques
Transform-Quality-Engineering-with-AI-A-60-Day-Blueprint-for-Digital-Success.pdf
CCUS-as-the-Missing-Link-to-Net-Zero_AksCurious.pdf
CEH Module 2 Footprinting CEH V13, concepts
Transform-Your-Factory-with-AI-Driven-Quality-Engineering.pdf
Launch a Bumble-Style App with AI Features in 2025.pdf
zbrain.ai-Scope Key Metrics Configuration and Best Practices.pdf
AI.gov: A Trojan Horse in the Age of Artificial Intelligence
Identification of potential depression in social media posts
Blending method and technology for hydrogen.pptx
Report in SIP_Distance_Learning_Technology_Impact.pptx
Co-training pseudo-labeling for text classification with support vector machi...
A hybrid framework for wild animal classification using fine-tuned DenseNet12...
Presentation - Principles of Instructional Design.pptx
NewMind AI Weekly Chronicles – August ’25 Week IV
How to Convert Tickets Into Sales Opportunity in Odoo 18
Rise of the Digital Control Grid Zeee Media and Hope and Tivon FTWProject.com
The-Future-of-Automotive-Quality-is-Here-AI-Driven-Engineering.pdf
Decision Optimization - From Theory to Practice

Hashing algorithms and its uses

  • 1. Hashing Algorithms and its applications Introduction to data sorting and Key searching
  • 2. What is Hash table? • A faster way to access data keeping table • Also known as bucket • It can be an array of objects (that has all the data) • Requires a function to convert the real data into placing position deciding data • Can use part of the data or time/space stamp to decide the position • The position is termed as HASH
  • 3. Randomness of Data • Data can be of defined pattern and length for which we can have static length of hash table entries • Each hash table entry place is a position that is access by the key • The key is calculated by hash function • If we know the data pattern, we can easily solve all the key calculations and also know the number of rows in the has table • If the data is random, we don’t know the number of entries in the table
  • 4. Hashing Function • Calculates the key for address assignment • Key = position Hasher (Type entry) • position StoringPosition = HashTable[Key] • Here the Hasher is “to add the ASCII values of Each letter and then take modulo 11” • Folding: • A method that divides data into chunks for processing in a Hasher
  • 5. Normal allocation • The data is processed using has function • The hash that is created by the function is searched in the table • The data is placed there
  • 7. Collision • The Hasher gives a key that is already occupied • Normally, the old value is discarded and the new incoming data is stored • It is probable when the table space is lesser than the incoming data • Even if table data space is greater than the incoming data, this problem is probable to occur
  • 8. Solution to Collision • Open Addressing • Same level address is used but on a different location which is calculated by the user defined rule • Linear Probing (the entry is saved in the next free space) - It can create clustering • Plus 3 rehash (the key is are-calculated by adding 3 to the previous entry value) • Quadratic Probing (the entry is saved by leaving 1, 2, 4, 16 spaces on the HT) • Double Hashing (Finding the hash of the key obtained) • PreviousHashKey = Hasher(entry) • NewHash = Hasher(PreviousHashKey) • Closed Addressing • Creating chains
  • 9. Data Searching and Retrieval • The data that we want to search uses the same Hash Function • After the Hasher calculates the Key, it is given directly to the table Variable and that position has the data • Search is usually O(n) for linear search and O(log(n)) for binary search but this method makes the search operation reduced to O(1) • O(1) means that we calculated the key in a fixed time process and the we go to the Array[key] to retrieve data using fixed time again • In case of chaining, we traverse on the node to reach our data so that makes it an O(n), still faster than complete search strategy.
  • 12. A good Hash Function! • Minimum Collisions • Uniform distribution of hash values/keys (avoid clustering) • Easy to calculate Hash • Resolve the collision swiftly
  • 13. Summary • Used to index large data sets • Address of each key is calculated by the data itself • Collision resolved with open or closed addressing • Hashing is widely used in database indexing, compilers, caching, password authentication, Blockchain, etc. • Insert, Delete and retrieve occurs on a fixed time (mostly)