SlideShare a Scribd company logo
MATRIX HASHING WITH TWO LEVEL COLLISION
RESOLUTION
Authors
Anand Agrawal, Sriram Bhyravarapu and N.V.K.Chaitanya
Presented by
N.V.K.Chaitanya
Agenda
• Hashing and it's existence
• Existing hashing techniques and their disadvantages
• Proposed work
• Advantages and disadvantages
• Conclusion
Hashing and it's existence
• A hash function is a function which when given a Value, generates
an address in the table. The example of a hash function is a book
call number. Each book in the library has a unique call number.
• A hash table uses a hash function to compute an index into an
array in which an element will be inserted or searched.
• By using a good hash function, hashing can work well.
Existing hashing techniques and their
disadvantages
• Using a single Dimensional array will only provide two directions to
move in a array which is forward or backwards.
Proposed Work
• Using a two Dimensional Array for the hashing technique.
• Using two different prime numbers to hash the items,
improving collision free range.
• Using two level collision handling technique.
Two dimensional Array
• We use a two dimensional matrix with dimensions
[q+3][p+2]. Given p , q are the prime numbers used in
hashing.
• rows([0][*], [q][*]), columns[*][0],[*][p] are there to act as
neighbours to the blocks that are on the edge of matrix.
• Row([q+2][*]) is used as Collision removal block, which will
be further discussed in the topic Level 2 collision handling.
Advantages of using a two dimensional Array
• Having eight neighbours will give more blocks to handle
collision, when one occurs.
• Having eight neighbours will give more blocks to handle
collision, when one occurred.
Using two prime numbers for hashing
• By using two prime numbers p , q for hashing can avoid
collision for numbers in range 0 to p*q . So if we know the
range of the numbers being inserted we can avoid
collision.
• By using q for hashing we will calculate 1st dimensional
index and by using p we can compute 2nd dimension
index. That is [V%q][V%p].
Two level collision handling technique.
• As we cant predict the numbers that are going to be
inserted in the matrix, we have a Two levels of collision
handling.
Level one collision handling technique
• When ever a number is given to be inserted we hash them
using the selected prime numbers. Let the result to be
stored in variables i , j.
• If array[i+1][j+1] is empty the element is inserted, else the
element will be inserted in any one of the eight neighbours
which was empty.
Level two collision handling technique
• If all the neighbours of the selected block are filled the
level two collision handling is done.
• The element that to be inserted will inserted in the collision
removal block that is [q+2] row.
• When we are inserting, we insert sort the element such
that all the elements in the row are sorted.
Searching
• When an element is to be searched, we calculate values
of i , j. Then search the block [i+1][j+1], if not found all the
eight neighbours will be searched.
• If any of the block is empty in the sequence then the
element is not present, If al are filled we compute a binary
search on the collision removal block.
• The result of the search determines the result of search for
the element
Advantages and Disadvantages
• Advantages
• Can completely remove collision in the range p*q.
• Search Complexity: O(log(n))
• Disadvantages
• High memory requirement
• There is a chance of overflow in collision removal block even when
there are few empty blocks in matrix.
Conclusion
• An efficient collision resolution strategy based on 2D array
is proposed in this paper. It is interesting to see the role of
multidimensional array and other similar data structures
that outperforms the presented techniques.
Thank You

More Related Content

What's hot (19)

PPTX
Algorithms 101 for Data Scientists
Christopher Conlan
 
PDF
Graph Algorithms, Sparse Algebra, and the GraphBLAS with Janice McMahon
Christopher Conlan
 
PDF
Parallel sorting Algorithms
GARIMA SHAKYA
 
PPT
Linear algebra
mathematicssac
 
PPTX
Analysis of algorithms
iqbalphy1
 
PPT
Intro matlab
danie_sileshi
 
PDF
R programmingmilano
Ismail Seyrik
 
PPTX
WF ED 540, Class Meeting 2 - Identifying & converting data types, 2016
Penn State University
 
PPTX
Radix Sort
Faiza Saleem
 
DOC
A sorted linear array
Suneel Dogra
 
PPTX
Alg II Unit 3-6-solvingsystemsmatrices
jtentinger
 
PPTX
Alg II 3-6 Solving Systems - Matrices
jtentinger
 
PPT
DATASTRUCTURES UNIT-1
Malikireddy Bramhananda Reddy
 
PDF
Sienna 8 countingsorts
chidabdu
 
PDF
Quick sort
Abdelrahman Saleh
 
PDF
Linear search
Abdelrahman Saleh
 
PPTX
Clustering: A Scikit Learn Tutorial
Damian R. Mingle, MBA
 
PDF
02 Stack
Budditha Hettige
 
PPT
Big oh Representation Used in Time complexities
LAKSHMITHARUN PONNAM
 
Algorithms 101 for Data Scientists
Christopher Conlan
 
Graph Algorithms, Sparse Algebra, and the GraphBLAS with Janice McMahon
Christopher Conlan
 
Parallel sorting Algorithms
GARIMA SHAKYA
 
Linear algebra
mathematicssac
 
Analysis of algorithms
iqbalphy1
 
Intro matlab
danie_sileshi
 
R programmingmilano
Ismail Seyrik
 
WF ED 540, Class Meeting 2 - Identifying & converting data types, 2016
Penn State University
 
Radix Sort
Faiza Saleem
 
A sorted linear array
Suneel Dogra
 
Alg II Unit 3-6-solvingsystemsmatrices
jtentinger
 
Alg II 3-6 Solving Systems - Matrices
jtentinger
 
DATASTRUCTURES UNIT-1
Malikireddy Bramhananda Reddy
 
Sienna 8 countingsorts
chidabdu
 
Quick sort
Abdelrahman Saleh
 
Linear search
Abdelrahman Saleh
 
Clustering: A Scikit Learn Tutorial
Damian R. Mingle, MBA
 
Big oh Representation Used in Time complexities
LAKSHMITHARUN PONNAM
 

Similar to MATRIX HASHING WITH TWO LEVEL OF COLLISION RESOLUTION (20)

PPTX
GRAPHS, BREADTH FIRST TRAVERSAL AND DEPTH FIRST TRAVERSAL
mohanrajm63
 
PPT
computer notes - Data Structures - 36
ecomputernotes
 
PPTX
DS Unit 1.pptx
chin463670
 
PDF
Unit-9 Searching .pdf
Yatru Harsha Hiski
 
PPT
Concept of hashing
Rafi Dar
 
PPT
Hashing
Ghaffar Khan
 
PDF
hashing.pdf
Yuvraj919347
 
PPTX
Working with python Nice PPT must try very good
MuhammadChala
 
PDF
Algorithms notes tutorials duniya
TutorialsDuniya.com
 
PPTX
Introduction to Hash Tables | What is a HashTable in Algorithm
Learning Courses Online
 
PPTX
Data structures and algorithms lab11
Bianca Teşilă
 
PPTX
Hashing and Binary Search Tree powerp.pptx
lemerdzsison3
 
PDF
Performance Analysis of Hashing Mathods on the Employment of App
IJECEIAES
 
PPTX
Unit viii searching and hashing
Tribhuvan University
 
PPTX
Presentation1
Saurabh Mishra
 
PDF
Hashing and File Structures in Data Structure.pdf
JaithoonBibi
 
PPT
Data Structures UNIT II Jntuh syllabus.ppt
vaishnavid3111
 
PPTX
hashing1.pptx Data Structures and Algorithms
snehalkulkarni78
 
PPTX
Hash based inventory system
DADITIRUMALATARUN
 
PPT
Hashing PPT
Saurabh Kumar
 
GRAPHS, BREADTH FIRST TRAVERSAL AND DEPTH FIRST TRAVERSAL
mohanrajm63
 
computer notes - Data Structures - 36
ecomputernotes
 
DS Unit 1.pptx
chin463670
 
Unit-9 Searching .pdf
Yatru Harsha Hiski
 
Concept of hashing
Rafi Dar
 
Hashing
Ghaffar Khan
 
hashing.pdf
Yuvraj919347
 
Working with python Nice PPT must try very good
MuhammadChala
 
Algorithms notes tutorials duniya
TutorialsDuniya.com
 
Introduction to Hash Tables | What is a HashTable in Algorithm
Learning Courses Online
 
Data structures and algorithms lab11
Bianca Teşilă
 
Hashing and Binary Search Tree powerp.pptx
lemerdzsison3
 
Performance Analysis of Hashing Mathods on the Employment of App
IJECEIAES
 
Unit viii searching and hashing
Tribhuvan University
 
Presentation1
Saurabh Mishra
 
Hashing and File Structures in Data Structure.pdf
JaithoonBibi
 
Data Structures UNIT II Jntuh syllabus.ppt
vaishnavid3111
 
hashing1.pptx Data Structures and Algorithms
snehalkulkarni78
 
Hash based inventory system
DADITIRUMALATARUN
 
Hashing PPT
Saurabh Kumar
 
Ad

Recently uploaded (20)

PPTX
Climate Action.pptx action plan for climate
justfortalabat
 
PDF
apidays Helsinki & North 2025 - API-Powered Journeys: Mobility in an API-Driv...
apidays
 
PPTX
apidays Munich 2025 - Building an AWS Serverless Application with Terraform, ...
apidays
 
PPTX
apidays Singapore 2025 - Designing for Change, Julie Schiller (Google)
apidays
 
PPTX
Exploring Multilingual Embeddings for Italian Semantic Search: A Pretrained a...
Sease
 
PDF
Merits and Demerits of DBMS over File System & 3-Tier Architecture in DBMS
MD RIZWAN MOLLA
 
PPTX
ER_Model_with_Diagrams_Presentation.pptx
dharaadhvaryu1992
 
PDF
Product Management in HealthTech (Case Studies from SnappDoctor)
Hamed Shams
 
PDF
How to Connect Your On-Premises Site to AWS Using Site-to-Site VPN.pdf
Tamanna
 
PDF
What does good look like - CRAP Brighton 8 July 2025
Jan Kierzyk
 
PDF
Web Scraping with Google Gemini 2.0 .pdf
Tamanna
 
PDF
Early_Diabetes_Detection_using_Machine_L.pdf
maria879693
 
PPTX
Aict presentation on dpplppp sjdhfh.pptx
vabaso5932
 
PDF
apidays Helsinki & North 2025 - Monetizing AI APIs: The New API Economy, Alla...
apidays
 
PDF
The European Business Wallet: Why It Matters and How It Powers the EUDI Ecosy...
Lal Chandran
 
PPTX
apidays Helsinki & North 2025 - Running a Successful API Program: Best Practi...
apidays
 
PPTX
apidays Helsinki & North 2025 - API access control strategies beyond JWT bear...
apidays
 
PPTX
The _Operations_on_Functions_Addition subtruction Multiplication and Division...
mdregaspi24
 
PDF
OOPs with Java_unit2.pdf. sarthak bookkk
Sarthak964187
 
PPTX
apidays Helsinki & North 2025 - Vero APIs - Experiences of API development in...
apidays
 
Climate Action.pptx action plan for climate
justfortalabat
 
apidays Helsinki & North 2025 - API-Powered Journeys: Mobility in an API-Driv...
apidays
 
apidays Munich 2025 - Building an AWS Serverless Application with Terraform, ...
apidays
 
apidays Singapore 2025 - Designing for Change, Julie Schiller (Google)
apidays
 
Exploring Multilingual Embeddings for Italian Semantic Search: A Pretrained a...
Sease
 
Merits and Demerits of DBMS over File System & 3-Tier Architecture in DBMS
MD RIZWAN MOLLA
 
ER_Model_with_Diagrams_Presentation.pptx
dharaadhvaryu1992
 
Product Management in HealthTech (Case Studies from SnappDoctor)
Hamed Shams
 
How to Connect Your On-Premises Site to AWS Using Site-to-Site VPN.pdf
Tamanna
 
What does good look like - CRAP Brighton 8 July 2025
Jan Kierzyk
 
Web Scraping with Google Gemini 2.0 .pdf
Tamanna
 
Early_Diabetes_Detection_using_Machine_L.pdf
maria879693
 
Aict presentation on dpplppp sjdhfh.pptx
vabaso5932
 
apidays Helsinki & North 2025 - Monetizing AI APIs: The New API Economy, Alla...
apidays
 
The European Business Wallet: Why It Matters and How It Powers the EUDI Ecosy...
Lal Chandran
 
apidays Helsinki & North 2025 - Running a Successful API Program: Best Practi...
apidays
 
apidays Helsinki & North 2025 - API access control strategies beyond JWT bear...
apidays
 
The _Operations_on_Functions_Addition subtruction Multiplication and Division...
mdregaspi24
 
OOPs with Java_unit2.pdf. sarthak bookkk
Sarthak964187
 
apidays Helsinki & North 2025 - Vero APIs - Experiences of API development in...
apidays
 
Ad

MATRIX HASHING WITH TWO LEVEL OF COLLISION RESOLUTION

  • 1. MATRIX HASHING WITH TWO LEVEL COLLISION RESOLUTION Authors Anand Agrawal, Sriram Bhyravarapu and N.V.K.Chaitanya Presented by N.V.K.Chaitanya
  • 2. Agenda • Hashing and it's existence • Existing hashing techniques and their disadvantages • Proposed work • Advantages and disadvantages • Conclusion
  • 3. Hashing and it's existence • A hash function is a function which when given a Value, generates an address in the table. The example of a hash function is a book call number. Each book in the library has a unique call number. • A hash table uses a hash function to compute an index into an array in which an element will be inserted or searched. • By using a good hash function, hashing can work well.
  • 4. Existing hashing techniques and their disadvantages • Using a single Dimensional array will only provide two directions to move in a array which is forward or backwards.
  • 5. Proposed Work • Using a two Dimensional Array for the hashing technique. • Using two different prime numbers to hash the items, improving collision free range. • Using two level collision handling technique.
  • 6. Two dimensional Array • We use a two dimensional matrix with dimensions [q+3][p+2]. Given p , q are the prime numbers used in hashing. • rows([0][*], [q][*]), columns[*][0],[*][p] are there to act as neighbours to the blocks that are on the edge of matrix. • Row([q+2][*]) is used as Collision removal block, which will be further discussed in the topic Level 2 collision handling.
  • 7. Advantages of using a two dimensional Array • Having eight neighbours will give more blocks to handle collision, when one occurs. • Having eight neighbours will give more blocks to handle collision, when one occurred.
  • 8. Using two prime numbers for hashing • By using two prime numbers p , q for hashing can avoid collision for numbers in range 0 to p*q . So if we know the range of the numbers being inserted we can avoid collision. • By using q for hashing we will calculate 1st dimensional index and by using p we can compute 2nd dimension index. That is [V%q][V%p].
  • 9. Two level collision handling technique. • As we cant predict the numbers that are going to be inserted in the matrix, we have a Two levels of collision handling.
  • 10. Level one collision handling technique • When ever a number is given to be inserted we hash them using the selected prime numbers. Let the result to be stored in variables i , j. • If array[i+1][j+1] is empty the element is inserted, else the element will be inserted in any one of the eight neighbours which was empty.
  • 11. Level two collision handling technique • If all the neighbours of the selected block are filled the level two collision handling is done. • The element that to be inserted will inserted in the collision removal block that is [q+2] row. • When we are inserting, we insert sort the element such that all the elements in the row are sorted.
  • 12. Searching • When an element is to be searched, we calculate values of i , j. Then search the block [i+1][j+1], if not found all the eight neighbours will be searched. • If any of the block is empty in the sequence then the element is not present, If al are filled we compute a binary search on the collision removal block. • The result of the search determines the result of search for the element
  • 13. Advantages and Disadvantages • Advantages • Can completely remove collision in the range p*q. • Search Complexity: O(log(n)) • Disadvantages • High memory requirement • There is a chance of overflow in collision removal block even when there are few empty blocks in matrix.
  • 14. Conclusion • An efficient collision resolution strategy based on 2D array is proposed in this paper. It is interesting to see the role of multidimensional array and other similar data structures that outperforms the presented techniques.