SlideShare a Scribd company logo
1 of 17
Z
I
M
C
O
R
E
H
U
B
S
OPEN ADDRESSING AND DOUBLE HASHING
HASHING TABLE
bsinfotech-202a
bsinfotech-202a
bsinfotech-202a
Introduction
ZimCore Hubs • Apr. 30, 2020
Introduction
• >Hash tables are fundamental data
structures that provide efficient
lookup, insertion, and deletion
operations for key-value pairs. This
report aims to provide an overview
of hash tables, discuss their key
features and operations, analyze
their strengths and weaknesses,
and highlight their various
applications.
HAsh table
ZimCore Hubs • Apr. 30, 2020
Overview of
Hash Tables
*Definition and Purpose: A hash table, also
known as a hash map, is a data structure
that uses a hash function to map keys to
unique indices,
*Hash Function: A hash function
transforms keys into hash values, which
are used as indices to store and retrieve
data.
*Collision Resolution: Collisions occur
when two or more keys produce the same
hash value. Collision resolution
techniques such as open addressing and
separate chaining are employed to handle
collisions.
*Load Factor and Rehashing: The load
factor represents the ratio of stored
items to the total capacity of the hash
table. Rehashing is performed to maintain a
balanced load factor and avoid excessive
collisions.
HAsh table
hash function
collision resolution
ZimCore Hubs • Apr. 30, 2020
Operations
*Insertion: The process of adding a key-
value pair to a hash table. The hash
function determines the index where the
pair is stored, and collision resolution is
applied if necessary.
*Search: The operation to retrieve the
value associated with a given key. The hash
function calculates the index, and the
search is performed within the
corresponding bucket or slot.
*Deletion: Removing a key-value pair from
the hash table. The hash function locates
the index, and the item is deleted from the
appropriate bucket, considering collision
resolution mechanisms.
HAsh table
ASH
TABLE
ZimCore Hubs • Apr. 30, 2020
• Insertion
the search for an empty bucket proceeds through a
predefined search sequence. The first empty bucket found is
used for the new key.
• Lookup
When looking up a key, the same search sequence is used. The
search terminates when the key is found, or an empty bucket is
found in which case the key does not exist in the table.
• Removal
buckets are typically not cleared, but instead marked as
"deleted". Such buckets, called tombstones, do not cause
lookups to terminate early, and can be reused by the insert
algorithm
ZimCore Hubs • Apr. 30, 2020
Performance
*Time Complexity: Hash table operations
typically achieve O(1) average-case time
complexity for insertions, searches, and
deletions. However, in the worst case,
collision resolution techniques may lead
to O(n) time complexity.
*Collision Handling: The choice of
collision resolution technique affects the
performance. Open addressing can lead to
clustering and degraded performance,
while separate chaining incurs additional
memory overhead due to linked lists or
other data structures.
*Load Factor Impact: Maintaining a low load
factor is crucial to prevent excessive
collisions and maintain optimal
performance. Rehashing is performed when
the load factor exceeds a threshold, but it
incurs additional overhead.
HAsh table
ZimCore Hubs • Apr. 30, 2020
Applications
Databases: Hash tables are used for
efficient indexing and retrieval of data in
database systems.
Caching: Hash tables enable fast data
lookup in caching systems, improving
performance by storing frequently
accessed items.
//Caching Data is a process that stores
multiple copies of data or files in a
temporary storage location—or cache—so
they can be accessed faster.
Cryptography: Hash functions play a
critical role in cryptographic applications,
providing data integrity and security
measures.
//a method of protecting information and
communications through the use of codes,
so that only those for whom the
information is intended can read and
process it
HAsh table
HASH
TABLE
A hash table is a
way of storing data
whose address is
determined based on
some key data or hash
key. The hash key is a
value that can be used
to map to a specific
table location when
used as input into a
hash function.
ZimCore Hubs • Apr. 30, 2020
Hash
Collision
• a collision happens when different
data inputs result in the same hash
after being processed by a hashing
mechanism.
• we should note here that
collisions are not a problem but an
intrinsic characteristic of the
hashing mechanisms.
• emerge due to hashing maps any
input (regardless of its length)
into a fixed-length code. since we
have an infinite set of available
inputs and a finite set o available
outputs, the hashing mechanisms
will eventually generate repeated
hashes.
ZimCore Hubs • Apr. 30, 2020
Conclusion
Hash tables are versatile data structures widely used in computer
science. They provide efficient operations for storing, retrieving, and
manipulating key-value pairs. By leveraging hash functions and collision
resolution techniques, hash tables offer fast access times and find
applications in various domains, including databases, caching, and
cryptography.Hash tables, also known as hash maps, are data structures
that provide efficient lookup, insertion, and deletion operations for key-
value pairs. They use a hash function to map keys to unique indices within
an underlying array or similar structure, allowing for constant-time
access to values.
HAsh table
Hash tables are versatile data structures widely used in computer science. They provide efficient operations for storing,
retrieving, and manipulating key-value pairs. By leveraging hash functions and collision resolution techniques, hash
tables offer fast access times and find applications in various domains, including databases, caching, and
cryptography.Hash tables, also known as hash maps, are data structures that provide efficient lookup, insertion, and
deletion operations for key-value pairs. They use a hash function to map keys to unique indices within an underlying array
or similar structure, allowing for constant-time access to values.
The key components of hash tables include the hash function, which transforms keys into hash values, and collision
resolution techniques to handle cases where multiple keys produce the same hash value. Common collision resolution
methods include open addressing (probing for alternative slots) and separate chaining (storing collided items in linked
lists or other data structures).
Hash tables offer several advantages, such as fast access times, typically achieving O(1) average-case time complexity for
operations. However, collision resolution techniques and the load factor (ratio of stored items to total capacity) can
impact performance. High load factors increase the likelihood of collisions, while different collision resolution
techniques have varying effects on performance.
Hash tables find applications in various fields. They are widely used in databases for efficient indexing and retrieval, in
caching systems for quick data lookup, and in cryptography for data integrity and security measures.
OPEN
ADdRESSING
bsinfotech-202a
bsinfotech-202a
bsinfotech-202a
OPEN ADDRESSING
Open addressing, or closed hashing,
is a method of collision resolution
in hash tables. With this method a
hash collision is resolved by
probing, or searching through
alternative locations in the array
(the probe sequence) until either
the target record is found, or an
unused array slot is found, which
indicates that there is no such key
in the table.
The three Major
collision
resolution
strategies
LINEAR PROBING
in which the interval between probes is
fixed — often set to 1.
QUADRATIC PROBING
in which the interval between probes
increases quadratically (hence, the indices
are described by a quadratic function).
DOUBLE HASHING
in which the interval between probes is
fixed for each record but is computed
by another hash function.
bsinfotech-202a
double
hashing
bsinfotech-202a
bsinfotech-202a
bsinfotech-202a
bsinfotech-202a
Double Hashing
Double hashing is a computer
programming technique used in
conjunction with open
addressing in hash tables to
resolve hash collisions, by
using a secondary hash of the
key as an offset when a
collision occurs. Double
hashing with open addressing is
a classical data structure on a
table �.
Z
I
M
C
O
R
E
H
U
B
S
THANK YOU!!
bsinfotech-202a
bsinfotech-202a
bsinfotech-202a
AMORGANDA,MICO
ALVARICO, ZAEDRICK
BALABA,EDWARD HUNTER
BALANAY,RANDALL ACE
BRIONES, IARIAN DAVE
CADUA,DARYLLKRYSS
CANTEMPRATE,EMJAY

More Related Content

Similar to Understanding Hash Tables and Collision Resolution Techniques

Hashing and Hash Tables
Hashing and Hash TablesHashing and Hash Tables
Hashing and Hash Tablesadil raja
 
Ts project Hash based inventory system
Ts project Hash based inventory systemTs project Hash based inventory system
Ts project Hash based inventory systemDADITIRUMALATARUN
 
Data Step Hash Object vs SQL Join
Data Step Hash Object vs SQL JoinData Step Hash Object vs SQL Join
Data Step Hash Object vs SQL JoinGeoff Ness
 
Presentation.pptx
Presentation.pptxPresentation.pptx
Presentation.pptxAgonySingh
 
Chapter 10: hashing data structure
Chapter 10:  hashing data structureChapter 10:  hashing data structure
Chapter 10: hashing data structureMahmoud Alfarra
 
Lecture12 abap on line
Lecture12 abap on lineLecture12 abap on line
Lecture12 abap on lineMilind Patil
 
Data Structures : hashing (1)
Data Structures : hashing (1)Data Structures : hashing (1)
Data Structures : hashing (1)Home
 
Implementação do Hash Coalha/Coalesced
Implementação do Hash Coalha/CoalescedImplementação do Hash Coalha/Coalesced
Implementação do Hash Coalha/CoalescedCriatividadeZeroDocs
 
Data Structure and Algorithms: What is Hash Table ppt
Data Structure and Algorithms: What is Hash Table pptData Structure and Algorithms: What is Hash Table ppt
Data Structure and Algorithms: What is Hash Table pptJUSTFUN40
 
11. Hashing - Data Structures using C++ by Varsha Patil
11. Hashing - Data Structures using C++ by Varsha Patil11. Hashing - Data Structures using C++ by Varsha Patil
11. Hashing - Data Structures using C++ by Varsha Patilwidespreadpromotion
 
Unit II Hadoop Ecosystem_Updated.pptx
Unit II Hadoop Ecosystem_Updated.pptxUnit II Hadoop Ecosystem_Updated.pptx
Unit II Hadoop Ecosystem_Updated.pptxBhavanaHotchandani
 
Overview of Storage and Indexing ...
Overview of Storage and Indexing                                             ...Overview of Storage and Indexing                                             ...
Overview of Storage and Indexing ...Javed Khan
 

Similar to Understanding Hash Tables and Collision Resolution Techniques (20)

Hashing and Hash Tables
Hashing and Hash TablesHashing and Hash Tables
Hashing and Hash Tables
 
Ts project Hash based inventory system
Ts project Hash based inventory systemTs project Hash based inventory system
Ts project Hash based inventory system
 
Hashing
HashingHashing
Hashing
 
DMBS Indexes.pptx
DMBS Indexes.pptxDMBS Indexes.pptx
DMBS Indexes.pptx
 
Data Step Hash Object vs SQL Join
Data Step Hash Object vs SQL JoinData Step Hash Object vs SQL Join
Data Step Hash Object vs SQL Join
 
Hashing
HashingHashing
Hashing
 
Presentation.pptx
Presentation.pptxPresentation.pptx
Presentation.pptx
 
DS THEORY 35.pptx
DS THEORY 35.pptxDS THEORY 35.pptx
DS THEORY 35.pptx
 
Chapter 10: hashing data structure
Chapter 10:  hashing data structureChapter 10:  hashing data structure
Chapter 10: hashing data structure
 
Lecture12 abap on line
Lecture12 abap on lineLecture12 abap on line
Lecture12 abap on line
 
Ds 8
Ds 8Ds 8
Ds 8
 
Data Structures : hashing (1)
Data Structures : hashing (1)Data Structures : hashing (1)
Data Structures : hashing (1)
 
Database management system session 6
Database management system session 6Database management system session 6
Database management system session 6
 
Implementação do Hash Coalha/Coalesced
Implementação do Hash Coalha/CoalescedImplementação do Hash Coalha/Coalesced
Implementação do Hash Coalha/Coalesced
 
Data Structure and Algorithms: What is Hash Table ppt
Data Structure and Algorithms: What is Hash Table pptData Structure and Algorithms: What is Hash Table ppt
Data Structure and Algorithms: What is Hash Table ppt
 
11. Hashing - Data Structures using C++ by Varsha Patil
11. Hashing - Data Structures using C++ by Varsha Patil11. Hashing - Data Structures using C++ by Varsha Patil
11. Hashing - Data Structures using C++ by Varsha Patil
 
Hash based inventory system
Hash based inventory systemHash based inventory system
Hash based inventory system
 
Unit II Hadoop Ecosystem_Updated.pptx
Unit II Hadoop Ecosystem_Updated.pptxUnit II Hadoop Ecosystem_Updated.pptx
Unit II Hadoop Ecosystem_Updated.pptx
 
Hashing
HashingHashing
Hashing
 
Overview of Storage and Indexing ...
Overview of Storage and Indexing                                             ...Overview of Storage and Indexing                                             ...
Overview of Storage and Indexing ...
 

Recently uploaded

No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in KarachiNo.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in KarachiAmil Baba Mangal Maseeh
 
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in KarachiNo.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in KarachiAmil Baba Mangal Maseeh
 
肄业证书结业证书《德国汉堡大学成绩单修改》Q微信741003700提供德国文凭照片可完整复刻汉堡大学毕业证精仿版本《【德国毕业证书】{汉堡大学文凭购买}》
肄业证书结业证书《德国汉堡大学成绩单修改》Q微信741003700提供德国文凭照片可完整复刻汉堡大学毕业证精仿版本《【德国毕业证书】{汉堡大学文凭购买}》肄业证书结业证书《德国汉堡大学成绩单修改》Q微信741003700提供德国文凭照片可完整复刻汉堡大学毕业证精仿版本《【德国毕业证书】{汉堡大学文凭购买}》
肄业证书结业证书《德国汉堡大学成绩单修改》Q微信741003700提供德国文凭照片可完整复刻汉堡大学毕业证精仿版本《【德国毕业证书】{汉堡大学文凭购买}》2tofliij
 
Sawwaf Calendar, 2024
Sawwaf Calendar, 2024Sawwaf Calendar, 2024
Sawwaf Calendar, 2024Bassem Matta
 
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in KarachiNo.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in KarachiAmil Baba Naveed Bangali
 
Culture Clash_Bioethical Concerns_Slideshare Version.pptx
Culture Clash_Bioethical Concerns_Slideshare Version.pptxCulture Clash_Bioethical Concerns_Slideshare Version.pptx
Culture Clash_Bioethical Concerns_Slideshare Version.pptxStephen Palm
 
شرح الدروس المهمة لعامة الأمة للشيخ ابن باز
شرح الدروس المهمة لعامة الأمة  للشيخ ابن بازشرح الدروس المهمة لعامة الأمة  للشيخ ابن باز
شرح الدروس المهمة لعامة الأمة للشيخ ابن بازJoEssam
 
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in KarachiNo.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in KarachiAmil Baba Naveed Bangali
 
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in KarachiNo.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachiamil baba kala jadu
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Chirag Delhi | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Chirag Delhi | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Chirag Delhi | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Chirag Delhi | Delhisoniya singh
 
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in KarachiNo.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in KarachiAmil Baba Mangal Maseeh
 
Top Astrologer, Kala ilam expert in Multan and Black magic specialist in Sind...
Top Astrologer, Kala ilam expert in Multan and Black magic specialist in Sind...Top Astrologer, Kala ilam expert in Multan and Black magic specialist in Sind...
Top Astrologer, Kala ilam expert in Multan and Black magic specialist in Sind...baharayali
 
The Chronological Life of Christ part 097 (Reality Check Luke 13 1-9).pptx
The Chronological Life of Christ part 097 (Reality Check Luke 13 1-9).pptxThe Chronological Life of Christ part 097 (Reality Check Luke 13 1-9).pptx
The Chronological Life of Christ part 097 (Reality Check Luke 13 1-9).pptxNetwork Bible Fellowship
 
Codex Singularity: Search for the Prisca Sapientia
Codex Singularity: Search for the Prisca SapientiaCodex Singularity: Search for the Prisca Sapientia
Codex Singularity: Search for the Prisca Sapientiajfrenchau
 
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in KarachiNo.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in KarachiAmil Baba Mangal Maseeh
 

Recently uploaded (20)

No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in KarachiNo.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
 
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in KarachiNo.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
 
肄业证书结业证书《德国汉堡大学成绩单修改》Q微信741003700提供德国文凭照片可完整复刻汉堡大学毕业证精仿版本《【德国毕业证书】{汉堡大学文凭购买}》
肄业证书结业证书《德国汉堡大学成绩单修改》Q微信741003700提供德国文凭照片可完整复刻汉堡大学毕业证精仿版本《【德国毕业证书】{汉堡大学文凭购买}》肄业证书结业证书《德国汉堡大学成绩单修改》Q微信741003700提供德国文凭照片可完整复刻汉堡大学毕业证精仿版本《【德国毕业证书】{汉堡大学文凭购买}》
肄业证书结业证书《德国汉堡大学成绩单修改》Q微信741003700提供德国文凭照片可完整复刻汉堡大学毕业证精仿版本《【德国毕业证书】{汉堡大学文凭购买}》
 
🔝9953056974🔝!!-YOUNG BOOK model Call Girls In Pushp vihar Delhi Escort service
🔝9953056974🔝!!-YOUNG BOOK model Call Girls In Pushp vihar  Delhi Escort service🔝9953056974🔝!!-YOUNG BOOK model Call Girls In Pushp vihar  Delhi Escort service
🔝9953056974🔝!!-YOUNG BOOK model Call Girls In Pushp vihar Delhi Escort service
 
Sawwaf Calendar, 2024
Sawwaf Calendar, 2024Sawwaf Calendar, 2024
Sawwaf Calendar, 2024
 
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in KarachiNo.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
 
Rohini Sector 21 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 21 Call Girls Delhi 9999965857 @Sabina Saikh No AdvanceRohini Sector 21 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 21 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
 
Culture Clash_Bioethical Concerns_Slideshare Version.pptx
Culture Clash_Bioethical Concerns_Slideshare Version.pptxCulture Clash_Bioethical Concerns_Slideshare Version.pptx
Culture Clash_Bioethical Concerns_Slideshare Version.pptx
 
شرح الدروس المهمة لعامة الأمة للشيخ ابن باز
شرح الدروس المهمة لعامة الأمة  للشيخ ابن بازشرح الدروس المهمة لعامة الأمة  للشيخ ابن باز
شرح الدروس المهمة لعامة الأمة للشيخ ابن باز
 
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in KarachiNo.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
 
🔝9953056974 🔝young Delhi Escort service Vinay Nagar
🔝9953056974 🔝young Delhi Escort service Vinay Nagar🔝9953056974 🔝young Delhi Escort service Vinay Nagar
🔝9953056974 🔝young Delhi Escort service Vinay Nagar
 
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in KarachiNo.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Chirag Delhi | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Chirag Delhi | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Chirag Delhi | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Chirag Delhi | Delhi
 
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in KarachiNo.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
 
Top Astrologer, Kala ilam expert in Multan and Black magic specialist in Sind...
Top Astrologer, Kala ilam expert in Multan and Black magic specialist in Sind...Top Astrologer, Kala ilam expert in Multan and Black magic specialist in Sind...
Top Astrologer, Kala ilam expert in Multan and Black magic specialist in Sind...
 
The Chronological Life of Christ part 097 (Reality Check Luke 13 1-9).pptx
The Chronological Life of Christ part 097 (Reality Check Luke 13 1-9).pptxThe Chronological Life of Christ part 097 (Reality Check Luke 13 1-9).pptx
The Chronological Life of Christ part 097 (Reality Check Luke 13 1-9).pptx
 
Call Girls In Nehru Place 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICE
Call Girls In Nehru Place 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICECall Girls In Nehru Place 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICE
Call Girls In Nehru Place 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICE
 
Codex Singularity: Search for the Prisca Sapientia
Codex Singularity: Search for the Prisca SapientiaCodex Singularity: Search for the Prisca Sapientia
Codex Singularity: Search for the Prisca Sapientia
 
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in KarachiNo.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
 
young Whatsapp Call Girls in Adarsh Nagar🔝 9953056974 🔝 escort service
young Whatsapp Call Girls in Adarsh Nagar🔝 9953056974 🔝 escort serviceyoung Whatsapp Call Girls in Adarsh Nagar🔝 9953056974 🔝 escort service
young Whatsapp Call Girls in Adarsh Nagar🔝 9953056974 🔝 escort service
 

Understanding Hash Tables and Collision Resolution Techniques

  • 1. Z I M C O R E H U B S OPEN ADDRESSING AND DOUBLE HASHING HASHING TABLE bsinfotech-202a bsinfotech-202a bsinfotech-202a Introduction
  • 2. ZimCore Hubs • Apr. 30, 2020 Introduction • >Hash tables are fundamental data structures that provide efficient lookup, insertion, and deletion operations for key-value pairs. This report aims to provide an overview of hash tables, discuss their key features and operations, analyze their strengths and weaknesses, and highlight their various applications. HAsh table
  • 3. ZimCore Hubs • Apr. 30, 2020 Overview of Hash Tables *Definition and Purpose: A hash table, also known as a hash map, is a data structure that uses a hash function to map keys to unique indices, *Hash Function: A hash function transforms keys into hash values, which are used as indices to store and retrieve data. *Collision Resolution: Collisions occur when two or more keys produce the same hash value. Collision resolution techniques such as open addressing and separate chaining are employed to handle collisions. *Load Factor and Rehashing: The load factor represents the ratio of stored items to the total capacity of the hash table. Rehashing is performed to maintain a balanced load factor and avoid excessive collisions. HAsh table
  • 5. ZimCore Hubs • Apr. 30, 2020 Operations *Insertion: The process of adding a key- value pair to a hash table. The hash function determines the index where the pair is stored, and collision resolution is applied if necessary. *Search: The operation to retrieve the value associated with a given key. The hash function calculates the index, and the search is performed within the corresponding bucket or slot. *Deletion: Removing a key-value pair from the hash table. The hash function locates the index, and the item is deleted from the appropriate bucket, considering collision resolution mechanisms. HAsh table
  • 6. ASH TABLE ZimCore Hubs • Apr. 30, 2020 • Insertion the search for an empty bucket proceeds through a predefined search sequence. The first empty bucket found is used for the new key. • Lookup When looking up a key, the same search sequence is used. The search terminates when the key is found, or an empty bucket is found in which case the key does not exist in the table. • Removal buckets are typically not cleared, but instead marked as "deleted". Such buckets, called tombstones, do not cause lookups to terminate early, and can be reused by the insert algorithm
  • 7. ZimCore Hubs • Apr. 30, 2020 Performance *Time Complexity: Hash table operations typically achieve O(1) average-case time complexity for insertions, searches, and deletions. However, in the worst case, collision resolution techniques may lead to O(n) time complexity. *Collision Handling: The choice of collision resolution technique affects the performance. Open addressing can lead to clustering and degraded performance, while separate chaining incurs additional memory overhead due to linked lists or other data structures. *Load Factor Impact: Maintaining a low load factor is crucial to prevent excessive collisions and maintain optimal performance. Rehashing is performed when the load factor exceeds a threshold, but it incurs additional overhead. HAsh table
  • 8. ZimCore Hubs • Apr. 30, 2020 Applications Databases: Hash tables are used for efficient indexing and retrieval of data in database systems. Caching: Hash tables enable fast data lookup in caching systems, improving performance by storing frequently accessed items. //Caching Data is a process that stores multiple copies of data or files in a temporary storage location—or cache—so they can be accessed faster. Cryptography: Hash functions play a critical role in cryptographic applications, providing data integrity and security measures. //a method of protecting information and communications through the use of codes, so that only those for whom the information is intended can read and process it HAsh table
  • 9. HASH TABLE A hash table is a way of storing data whose address is determined based on some key data or hash key. The hash key is a value that can be used to map to a specific table location when used as input into a hash function.
  • 10. ZimCore Hubs • Apr. 30, 2020 Hash Collision • a collision happens when different data inputs result in the same hash after being processed by a hashing mechanism. • we should note here that collisions are not a problem but an intrinsic characteristic of the hashing mechanisms. • emerge due to hashing maps any input (regardless of its length) into a fixed-length code. since we have an infinite set of available inputs and a finite set o available outputs, the hashing mechanisms will eventually generate repeated hashes.
  • 11. ZimCore Hubs • Apr. 30, 2020 Conclusion Hash tables are versatile data structures widely used in computer science. They provide efficient operations for storing, retrieving, and manipulating key-value pairs. By leveraging hash functions and collision resolution techniques, hash tables offer fast access times and find applications in various domains, including databases, caching, and cryptography.Hash tables, also known as hash maps, are data structures that provide efficient lookup, insertion, and deletion operations for key- value pairs. They use a hash function to map keys to unique indices within an underlying array or similar structure, allowing for constant-time access to values. HAsh table Hash tables are versatile data structures widely used in computer science. They provide efficient operations for storing, retrieving, and manipulating key-value pairs. By leveraging hash functions and collision resolution techniques, hash tables offer fast access times and find applications in various domains, including databases, caching, and cryptography.Hash tables, also known as hash maps, are data structures that provide efficient lookup, insertion, and deletion operations for key-value pairs. They use a hash function to map keys to unique indices within an underlying array or similar structure, allowing for constant-time access to values. The key components of hash tables include the hash function, which transforms keys into hash values, and collision resolution techniques to handle cases where multiple keys produce the same hash value. Common collision resolution methods include open addressing (probing for alternative slots) and separate chaining (storing collided items in linked lists or other data structures). Hash tables offer several advantages, such as fast access times, typically achieving O(1) average-case time complexity for operations. However, collision resolution techniques and the load factor (ratio of stored items to total capacity) can impact performance. High load factors increase the likelihood of collisions, while different collision resolution techniques have varying effects on performance. Hash tables find applications in various fields. They are widely used in databases for efficient indexing and retrieval, in caching systems for quick data lookup, and in cryptography for data integrity and security measures.
  • 13. OPEN ADDRESSING Open addressing, or closed hashing, is a method of collision resolution in hash tables. With this method a hash collision is resolved by probing, or searching through alternative locations in the array (the probe sequence) until either the target record is found, or an unused array slot is found, which indicates that there is no such key in the table.
  • 14. The three Major collision resolution strategies LINEAR PROBING in which the interval between probes is fixed — often set to 1. QUADRATIC PROBING in which the interval between probes increases quadratically (hence, the indices are described by a quadratic function). DOUBLE HASHING in which the interval between probes is fixed for each record but is computed by another hash function. bsinfotech-202a
  • 16. bsinfotech-202a Double Hashing Double hashing is a computer programming technique used in conjunction with open addressing in hash tables to resolve hash collisions, by using a secondary hash of the key as an offset when a collision occurs. Double hashing with open addressing is a classical data structure on a table �.
  • 17. Z I M C O R E H U B S THANK YOU!! bsinfotech-202a bsinfotech-202a bsinfotech-202a AMORGANDA,MICO ALVARICO, ZAEDRICK BALABA,EDWARD HUNTER BALANAY,RANDALL ACE BRIONES, IARIAN DAVE CADUA,DARYLLKRYSS CANTEMPRATE,EMJAY

Editor's Notes

  1. 1.7.2013
  2. 1.7.2013