SlideShare uma empresa Scribd logo
1 de 25
CSCE 3110 Data Structures & Algorithm Analysis Rada Mihalcea http://www.cs.unt.edu/~rada/CSCE3110 Hashing Reading: Chap.5,  Weiss
How to Implement a Dictionary? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Hashing ,[object Object],[object Object],[object Object]
Basic Idea ,[object Object],[object Object],[object Object],[object Object]
Example ,[object Object],[object Object],[object Object],[object Object],... 0 1 2 3 1000 hash table buckets
Analysis (Ideal Case) ,[object Object],[object Object]
Ideal Case is Unrealistic ,[object Object],[object Object],[object Object],[object Object],[object Object]
Hash Functions ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Collision Resolution Policies ,[object Object],[object Object],[object Object],[object Object]
Closed Hashing ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Example Linear (Closed) Hashing ,[object Object],0 2 3 4 5 6 7 1 b a c ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],d
Operations Using Linear Hashing ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Performance Analysis - Worst Case ,[object Object],[object Object],[object Object]
Performance Analysis - Avg Case ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Improved Collision Resolution ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Example 0 1 2 3 4 5 6 7 8 9 10 1001 9537 3016 9874 2009 9875 h(k) = k%11 0 1 2 3 4 5 6 7 8 9 10 1001 9537 3016 9874 2009 9875 1. What if next element has home bucket 0?    go to bucket 3 Same for elements with home bucket 1 or 2! Only a record with home position 3 will stay.    p = 4/11 that next record will go to bucket 3 2. Similarly, records hashing to 7,8,9 will end up in 10 3. Only records hashing to 4 will end up in 4 (p=1/11); same for 5 and 6 I II insert 1052 (h.b. 7)  1052 next element in bucket 3 with p = 8/11
Hash Functions -  Numerical Values ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Hash Function –  Strings of Characters ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Hash Function –  Strings of Characters ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Open Hashing ,[object Object],[object Object],[object Object],[object Object]
Open Hashing Data Organization 0 1 2 3 4 D-1 ... ... ...
Analysis ,[object Object],[object Object],[object Object],[object Object]
Analysis Cont’d ,[object Object],[object Object],[object Object],[object Object],[object Object]
Comparison with Closed Hashing ,[object Object],[object Object],[object Object],[object Object],[object Object]
Hashing Problem ,[object Object],[object Object]

Mais conteúdo relacionado

Mais procurados

Hashing and Hashtable, application of hashing, advantages of hashing, disadva...
Hashing and Hashtable, application of hashing, advantages of hashing, disadva...Hashing and Hashtable, application of hashing, advantages of hashing, disadva...
Hashing and Hashtable, application of hashing, advantages of hashing, disadva...NaveenPeter8
 
Hashing Technique In Data Structures
Hashing Technique In Data StructuresHashing Technique In Data Structures
Hashing Technique In Data StructuresSHAKOOR AB
 
heap Sort Algorithm
heap  Sort Algorithmheap  Sort Algorithm
heap Sort AlgorithmLemia Algmri
 
Hashing algorithms and its uses
Hashing algorithms and its usesHashing algorithms and its uses
Hashing algorithms and its usesJawad Khan
 
Searching and Sorting Techniques in Data Structure
Searching and Sorting Techniques in Data StructureSearching and Sorting Techniques in Data Structure
Searching and Sorting Techniques in Data StructureBalwant Gorad
 
Bubble Sort
Bubble SortBubble Sort
Bubble Sortgeeortiz
 
Pattern matching
Pattern matchingPattern matching
Pattern matchingshravs_188
 
Huffman's algorithm in Data Structure
 Huffman's algorithm in Data Structure Huffman's algorithm in Data Structure
Huffman's algorithm in Data StructureVrushali Dhanokar
 
1.5 binary search tree
1.5 binary search tree1.5 binary search tree
1.5 binary search treeKrish_ver2
 
Threaded Binary Tree
Threaded Binary TreeThreaded Binary Tree
Threaded Binary Treekhabbab_h
 
Data Structure and Algorithms Arrays
Data Structure and Algorithms ArraysData Structure and Algorithms Arrays
Data Structure and Algorithms ArraysManishPrajapati78
 
Relational algebra ppt
Relational algebra pptRelational algebra ppt
Relational algebra pptGirdharRatne
 
Hash table
Hash tableHash table
Hash tableVu Tran
 

Mais procurados (20)

Queues
QueuesQueues
Queues
 
Linked List
Linked ListLinked List
Linked List
 
Hashing and Hashtable, application of hashing, advantages of hashing, disadva...
Hashing and Hashtable, application of hashing, advantages of hashing, disadva...Hashing and Hashtable, application of hashing, advantages of hashing, disadva...
Hashing and Hashtable, application of hashing, advantages of hashing, disadva...
 
Hashing Technique In Data Structures
Hashing Technique In Data StructuresHashing Technique In Data Structures
Hashing Technique In Data Structures
 
heap Sort Algorithm
heap  Sort Algorithmheap  Sort Algorithm
heap Sort Algorithm
 
Hashing algorithms and its uses
Hashing algorithms and its usesHashing algorithms and its uses
Hashing algorithms and its uses
 
Sorting Algorithms
Sorting AlgorithmsSorting Algorithms
Sorting Algorithms
 
Searching and Sorting Techniques in Data Structure
Searching and Sorting Techniques in Data StructureSearching and Sorting Techniques in Data Structure
Searching and Sorting Techniques in Data Structure
 
Bubble Sort
Bubble SortBubble Sort
Bubble Sort
 
Expression trees
Expression treesExpression trees
Expression trees
 
Pattern matching
Pattern matchingPattern matching
Pattern matching
 
Huffman's algorithm in Data Structure
 Huffman's algorithm in Data Structure Huffman's algorithm in Data Structure
Huffman's algorithm in Data Structure
 
1.5 binary search tree
1.5 binary search tree1.5 binary search tree
1.5 binary search tree
 
Threaded Binary Tree
Threaded Binary TreeThreaded Binary Tree
Threaded Binary Tree
 
Hashing
HashingHashing
Hashing
 
Data Structure and Algorithms Arrays
Data Structure and Algorithms ArraysData Structure and Algorithms Arrays
Data Structure and Algorithms Arrays
 
Relational algebra ppt
Relational algebra pptRelational algebra ppt
Relational algebra ppt
 
Hash table
Hash tableHash table
Hash table
 
Binary search tree(bst)
Binary search tree(bst)Binary search tree(bst)
Binary search tree(bst)
 
Rehashing
RehashingRehashing
Rehashing
 

Destaque

Access technology
Access technologyAccess technology
Access technology김 성남
 
Pitfalls of Information Access with Visualizations in Remote Collaborative An...
Pitfalls of Information Access with Visualizations in Remote Collaborative An...Pitfalls of Information Access with Visualizations in Remote Collaborative An...
Pitfalls of Information Access with Visualizations in Remote Collaborative An...Aruna Balakrishnan
 
Live800の導入【Idの管理編】
Live800の導入【Idの管理編】Live800の導入【Idの管理編】
Live800の導入【Idの管理編】Live 800
 
When Plants Grow Bad
When Plants Grow BadWhen Plants Grow Bad
When Plants Grow Badschmad27
 
Appellate Order - NYCO Products v. First American Properties
Appellate Order - NYCO Products v. First American PropertiesAppellate Order - NYCO Products v. First American Properties
Appellate Order - NYCO Products v. First American Propertieskliebs
 
186 Ellesmere
186 Ellesmere186 Ellesmere
186 Ellesmereleeekim
 
TransAmerica Life - Social Media Workshop
TransAmerica Life - Social Media WorkshopTransAmerica Life - Social Media Workshop
TransAmerica Life - Social Media WorkshopBWEST Interactive
 
Berkaitan semantik ainol-
Berkaitan semantik  ainol-Berkaitan semantik  ainol-
Berkaitan semantik ainol-Mohammad Yaqin
 
Iksula Magento Solutions
Iksula Magento SolutionsIksula Magento Solutions
Iksula Magento SolutionsIksula
 
2012 Hum Specification Presentation
2012 Hum Specification Presentation2012 Hum Specification Presentation
2012 Hum Specification PresentationAlibia de Vente
 
Solar Power System
Solar Power SystemSolar Power System
Solar Power SystemYamin Malik
 

Destaque (20)

Access technology
Access technologyAccess technology
Access technology
 
Pitfalls of Information Access with Visualizations in Remote Collaborative An...
Pitfalls of Information Access with Visualizations in Remote Collaborative An...Pitfalls of Information Access with Visualizations in Remote Collaborative An...
Pitfalls of Information Access with Visualizations in Remote Collaborative An...
 
Live800の導入【Idの管理編】
Live800の導入【Idの管理編】Live800の導入【Idの管理編】
Live800の導入【Idの管理編】
 
Morumotto
MorumottoMorumotto
Morumotto
 
Writing In Science
Writing In ScienceWriting In Science
Writing In Science
 
When Plants Grow Bad
When Plants Grow BadWhen Plants Grow Bad
When Plants Grow Bad
 
S273
S273S273
S273
 
Appellate Order - NYCO Products v. First American Properties
Appellate Order - NYCO Products v. First American PropertiesAppellate Order - NYCO Products v. First American Properties
Appellate Order - NYCO Products v. First American Properties
 
tiaksaa.fi nettisivut
tiaksaa.fi nettisivuttiaksaa.fi nettisivut
tiaksaa.fi nettisivut
 
ACH 121 Lecture 12b Windows
ACH 121 Lecture 12b WindowsACH 121 Lecture 12b Windows
ACH 121 Lecture 12b Windows
 
12 First Draft
12 First Draft12 First Draft
12 First Draft
 
186 Ellesmere
186 Ellesmere186 Ellesmere
186 Ellesmere
 
TransAmerica Life - Social Media Workshop
TransAmerica Life - Social Media WorkshopTransAmerica Life - Social Media Workshop
TransAmerica Life - Social Media Workshop
 
Berkaitan semantik ainol-
Berkaitan semantik  ainol-Berkaitan semantik  ainol-
Berkaitan semantik ainol-
 
September 2012 Corporate Presentation
September 2012 Corporate PresentationSeptember 2012 Corporate Presentation
September 2012 Corporate Presentation
 
Facebook Workshop
Facebook WorkshopFacebook Workshop
Facebook Workshop
 
Iksula Magento Solutions
Iksula Magento SolutionsIksula Magento Solutions
Iksula Magento Solutions
 
2012 Hum Specification Presentation
2012 Hum Specification Presentation2012 Hum Specification Presentation
2012 Hum Specification Presentation
 
Solar Power System
Solar Power SystemSolar Power System
Solar Power System
 
David kenneth waldman_dissertation_june_2_2011
David kenneth waldman_dissertation_june_2_2011David kenneth waldman_dissertation_june_2_2011
David kenneth waldman_dissertation_june_2_2011
 

Semelhante a Hashing

Algorithm chapter 7
Algorithm chapter 7Algorithm chapter 7
Algorithm chapter 7chidabdu
 
Hashing.pptx
Hashing.pptxHashing.pptx
Hashing.pptxkratika64
 
Presentation.pptx
Presentation.pptxPresentation.pptx
Presentation.pptxAgonySingh
 
Algorithms notes tutorials duniya
Algorithms notes   tutorials duniyaAlgorithms notes   tutorials duniya
Algorithms notes tutorials duniyaTutorialsDuniya.com
 
Hashing In Data Structure Download PPT i
Hashing In Data Structure Download PPT iHashing In Data Structure Download PPT i
Hashing In Data Structure Download PPT icajiwol341
 
presentation on important DAG,TRIE,Hashing.pptx
presentation on important DAG,TRIE,Hashing.pptxpresentation on important DAG,TRIE,Hashing.pptx
presentation on important DAG,TRIE,Hashing.pptxjainaaru59
 
18. Dictionaries, Hash-Tables and Set
18. Dictionaries, Hash-Tables and Set18. Dictionaries, Hash-Tables and Set
18. Dictionaries, Hash-Tables and SetIntro C# Book
 
Hashing and File Structures in Data Structure.pdf
Hashing and File Structures in Data Structure.pdfHashing and File Structures in Data Structure.pdf
Hashing and File Structures in Data Structure.pdfJaithoonBibi
 
Advance algorithm hashing lec II
Advance algorithm hashing lec IIAdvance algorithm hashing lec II
Advance algorithm hashing lec IISajid Marwat
 
Open addressing &amp rehashing,extendable hashing
Open addressing &amp rehashing,extendable hashingOpen addressing &amp rehashing,extendable hashing
Open addressing &amp rehashing,extendable hashingHaripritha
 

Semelhante a Hashing (20)

Algorithm chapter 7
Algorithm chapter 7Algorithm chapter 7
Algorithm chapter 7
 
Lec5
Lec5Lec5
Lec5
 
Hashing.pptx
Hashing.pptxHashing.pptx
Hashing.pptx
 
Presentation.pptx
Presentation.pptxPresentation.pptx
Presentation.pptx
 
03.01 hash tables
03.01 hash tables03.01 hash tables
03.01 hash tables
 
Algorithms notes tutorials duniya
Algorithms notes   tutorials duniyaAlgorithms notes   tutorials duniya
Algorithms notes tutorials duniya
 
Hashing In Data Structure Download PPT i
Hashing In Data Structure Download PPT iHashing In Data Structure Download PPT i
Hashing In Data Structure Download PPT i
 
presentation on important DAG,TRIE,Hashing.pptx
presentation on important DAG,TRIE,Hashing.pptxpresentation on important DAG,TRIE,Hashing.pptx
presentation on important DAG,TRIE,Hashing.pptx
 
4.4 hashing02
4.4 hashing024.4 hashing02
4.4 hashing02
 
Lec4
Lec4Lec4
Lec4
 
Quadratic probing
Quadratic probingQuadratic probing
Quadratic probing
 
18. Dictionaries, Hash-Tables and Set
18. Dictionaries, Hash-Tables and Set18. Dictionaries, Hash-Tables and Set
18. Dictionaries, Hash-Tables and Set
 
Presentation1
Presentation1Presentation1
Presentation1
 
Hashing and File Structures in Data Structure.pdf
Hashing and File Structures in Data Structure.pdfHashing and File Structures in Data Structure.pdf
Hashing and File Structures in Data Structure.pdf
 
08 Hash Tables
08 Hash Tables08 Hash Tables
08 Hash Tables
 
session 15 hashing.pptx
session 15   hashing.pptxsession 15   hashing.pptx
session 15 hashing.pptx
 
Advance algorithm hashing lec II
Advance algorithm hashing lec IIAdvance algorithm hashing lec II
Advance algorithm hashing lec II
 
Open addressing &amp rehashing,extendable hashing
Open addressing &amp rehashing,extendable hashingOpen addressing &amp rehashing,extendable hashing
Open addressing &amp rehashing,extendable hashing
 
13-hashing.ppt
13-hashing.ppt13-hashing.ppt
13-hashing.ppt
 
LECT 10, 11-DSALGO(Hashing).pdf
LECT 10, 11-DSALGO(Hashing).pdfLECT 10, 11-DSALGO(Hashing).pdf
LECT 10, 11-DSALGO(Hashing).pdf
 

Último

Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 

Último (20)

Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 

Hashing

  • 1. CSCE 3110 Data Structures & Algorithm Analysis Rada Mihalcea http://www.cs.unt.edu/~rada/CSCE3110 Hashing Reading: Chap.5, Weiss
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16. Example 0 1 2 3 4 5 6 7 8 9 10 1001 9537 3016 9874 2009 9875 h(k) = k%11 0 1 2 3 4 5 6 7 8 9 10 1001 9537 3016 9874 2009 9875 1. What if next element has home bucket 0?  go to bucket 3 Same for elements with home bucket 1 or 2! Only a record with home position 3 will stay.  p = 4/11 that next record will go to bucket 3 2. Similarly, records hashing to 7,8,9 will end up in 10 3. Only records hashing to 4 will end up in 4 (p=1/11); same for 5 and 6 I II insert 1052 (h.b. 7) 1052 next element in bucket 3 with p = 8/11
  • 17.
  • 18.
  • 19.
  • 20.
  • 21. Open Hashing Data Organization 0 1 2 3 4 D-1 ... ... ...
  • 22.
  • 23.
  • 24.
  • 25.