The document discusses different techniques for handling collisions in hash tables, including separate chaining and open addressing. Separate chaining uses linked lists to chain together elements that hash to the same slot, while open addressing resolves collisions by probing to alternate slots using functions like linear probing, quadratic probing, and double hashing. Pseudocode is provided for initializing and inserting elements into a hash table using separate chaining with linked lists.
About Cache Memory
working of cache memory
levels of cache memory
mapping techniques for cache memory
1. direct mapping techniques
2. Fully associative mapping techniques
3. set associative mapping techniques
Cache memroy organization
cache coherency
every thing in detail
OVERVIEW:
Introduction
Definition
Example of Threaded BT.
Types & Structure
One-way .
Double-way.
Structure.
Traversal
Algorithm for Traversal
Traversal Example
Inserting
Algorithm for Inserting
Inserting Example
Comparison With Binary Tree
Advantages and Disadvantages
Why Threaded BT are used?
Conclusion
Reference
About Cache Memory
working of cache memory
levels of cache memory
mapping techniques for cache memory
1. direct mapping techniques
2. Fully associative mapping techniques
3. set associative mapping techniques
Cache memroy organization
cache coherency
every thing in detail
OVERVIEW:
Introduction
Definition
Example of Threaded BT.
Types & Structure
One-way .
Double-way.
Structure.
Traversal
Algorithm for Traversal
Traversal Example
Inserting
Algorithm for Inserting
Inserting Example
Comparison With Binary Tree
Advantages and Disadvantages
Why Threaded BT are used?
Conclusion
Reference
My presentation presents the basic concepts and some generally accepted rules of thumb for designing good web sites. Sites with different objectives will obviously have different needs.
Moreover, individuality and uniqueness of web sites are also valued features.
With that in mind, those guidelines are offered as a starting point for developing good web design skills, not as formula that should be followed point by point.
Parallel computing and its applicationsBurhan Ahmed
Parallel computing is a type of computing architecture in which several processors execute or process an application or computation simultaneously. Parallel computing helps in performing large computations by dividing the workload between more than one processor, all of which work through the computation at the same time. Most supercomputers employ parallel computing principles to operate. Parallel computing is also known as parallel processing.
↓↓↓↓ Read More:
Watch my videos on snack here: --> --> http://sck.io/x-B1f0Iy
@ Kindly Follow my Instagram Page to discuss about your mental health problems-
-----> https://instagram.com/mentality_streak?utm_medium=copy_link
@ Appreciate my work:
-----> behance.net/burhanahmed1
Thank-you !
Merge sort is a sorting technique based on divide and conquer technique. With worst-case time complexity being Ο(n log n), it is one of the most respected algorithms.
Merge sort first divides the array into equal halves and then combines them in a sorted manner.
this presentation is made for the students who finds data structures a complex subject
this will help students to grab the various topics of data structures with simple presentation techniques
best regards
BCA group
(pooja,shaifali,richa,trishla,rani,pallavi,shivani)
My presentation presents the basic concepts and some generally accepted rules of thumb for designing good web sites. Sites with different objectives will obviously have different needs.
Moreover, individuality and uniqueness of web sites are also valued features.
With that in mind, those guidelines are offered as a starting point for developing good web design skills, not as formula that should be followed point by point.
Parallel computing and its applicationsBurhan Ahmed
Parallel computing is a type of computing architecture in which several processors execute or process an application or computation simultaneously. Parallel computing helps in performing large computations by dividing the workload between more than one processor, all of which work through the computation at the same time. Most supercomputers employ parallel computing principles to operate. Parallel computing is also known as parallel processing.
↓↓↓↓ Read More:
Watch my videos on snack here: --> --> http://sck.io/x-B1f0Iy
@ Kindly Follow my Instagram Page to discuss about your mental health problems-
-----> https://instagram.com/mentality_streak?utm_medium=copy_link
@ Appreciate my work:
-----> behance.net/burhanahmed1
Thank-you !
Merge sort is a sorting technique based on divide and conquer technique. With worst-case time complexity being Ο(n log n), it is one of the most respected algorithms.
Merge sort first divides the array into equal halves and then combines them in a sorted manner.
this presentation is made for the students who finds data structures a complex subject
this will help students to grab the various topics of data structures with simple presentation techniques
best regards
BCA group
(pooja,shaifali,richa,trishla,rani,pallavi,shivani)
Concurrent Hashing and Natural Parallelism : The Art of Multiprocessor Progra...Subhajit Sahu
Highlighted notes of:
Chapter 13: Concurrent Hashing and Natural Parallelism
Book:
The Art of Multiprocessor Programming
Authors:
Maurice Herlihy
Nir Shavit
Maurice Herlihy has an A.B. in Mathematics from Harvard University, and a Ph.D. in Computer Science from M.I.T. He has served on the faculty of Carnegie Mellon University and the staff of DEC Cambridge Research Lab. He is the recipient of the 2003 Dijkstra Prize in Distributed Computing, the 2004 Gödel Prize in theoretical computer science, the 2008 ISCA influential paper award, the 2012 Edsger W. Dijkstra Prize, and the 2013 Wallace McDowell award. He received a 2012 Fulbright Distinguished Chair in the Natural Sciences and Engineering Lecturing Fellowship, and he is fellow of the ACM, a fellow of the National Academy of Inventors, the National Academy of Engineering, and the National Academy of Arts and Sciences.
Nir Shavit received B.Sc. and M.Sc. degrees in Computer Science from the Technion - Israel Institute of Technology in 1984 and 1986, and a Ph.D. in Computer Science from the Hebrew University of Jerusalem in 1990. Shavit is a co-author of the book The Art of Multiprocessor Programming. He is a recipient of the 2004 Gödel Prize in theoretical computer science for his work on applying tools from algebraic topology to model shared memory computability and of the 2012 Dijkstra Prize in Distributed Computing for the introduction of Software Transactional Memory. He is a past program chair of the ACM Symposium on Principles of Distributed Computing (PODC) and the ACM Symposium on Parallelism in Algorithms and Architectures (SPAA). His current research covers techniques for desinging scalable software for multiprocessors, in particular concurrent data structures for multicore machines.
Data Structure and Algorithms: What is Hash Table pptJUSTFUN40
Outline:
What is a HASH TABLE?
What is a HASH FUNCTION?
What is a HASH COLLISION?
Implementation of a Hash Table
Discussion on collision resolution methods in particular SEPARATE CHAINING and OPEN ADDRESSING
Separate Chaining Implementation
Open Addressing Implementation
Linear Probing
Quadratic Probing
Double Hashing
Hashing notes data structures (HASHING AND HASH FUNCTIONS)Kuntal Bhowmick
A Hash table is a data structure used for storing and retrieving data very quickly. Insertion of data in the hash table is based on the key value. Hence every entry in the hash table is associated with some key.
HASHING AND HASH FUNCTIONS, HASH TABLE REPRESENTATION, HASH FUNCTION, TYPES OF HASH FUNCTIONS, COLLISION, COLLISION RESOLUTION, CHAINING, OPEN ADDRESSING – LINEAR PROBING, QUADRATIC PROBING, DOUBLE HASHING
How to Split Bills in the Odoo 17 POS ModuleCeline George
Bills have a main role in point of sale procedure. It will help to track sales, handling payments and giving receipts to customers. Bill splitting also has an important role in POS. For example, If some friends come together for dinner and if they want to divide the bill then it is possible by POS bill splitting. This slide will show how to split bills in odoo 17 POS.
The Roman Empire A Historical Colossus.pdfkaushalkr1407
The Roman Empire, a vast and enduring power, stands as one of history's most remarkable civilizations, leaving an indelible imprint on the world. It emerged from the Roman Republic, transitioning into an imperial powerhouse under the leadership of Augustus Caesar in 27 BCE. This transformation marked the beginning of an era defined by unprecedented territorial expansion, architectural marvels, and profound cultural influence.
The empire's roots lie in the city of Rome, founded, according to legend, by Romulus in 753 BCE. Over centuries, Rome evolved from a small settlement to a formidable republic, characterized by a complex political system with elected officials and checks on power. However, internal strife, class conflicts, and military ambitions paved the way for the end of the Republic. Julius Caesar’s dictatorship and subsequent assassination in 44 BCE created a power vacuum, leading to a civil war. Octavian, later Augustus, emerged victorious, heralding the Roman Empire’s birth.
Under Augustus, the empire experienced the Pax Romana, a 200-year period of relative peace and stability. Augustus reformed the military, established efficient administrative systems, and initiated grand construction projects. The empire's borders expanded, encompassing territories from Britain to Egypt and from Spain to the Euphrates. Roman legions, renowned for their discipline and engineering prowess, secured and maintained these vast territories, building roads, fortifications, and cities that facilitated control and integration.
The Roman Empire’s society was hierarchical, with a rigid class system. At the top were the patricians, wealthy elites who held significant political power. Below them were the plebeians, free citizens with limited political influence, and the vast numbers of slaves who formed the backbone of the economy. The family unit was central, governed by the paterfamilias, the male head who held absolute authority.
Culturally, the Romans were eclectic, absorbing and adapting elements from the civilizations they encountered, particularly the Greeks. Roman art, literature, and philosophy reflected this synthesis, creating a rich cultural tapestry. Latin, the Roman language, became the lingua franca of the Western world, influencing numerous modern languages.
Roman architecture and engineering achievements were monumental. They perfected the arch, vault, and dome, constructing enduring structures like the Colosseum, Pantheon, and aqueducts. These engineering marvels not only showcased Roman ingenuity but also served practical purposes, from public entertainment to water supply.
The Art Pastor's Guide to Sabbath | Steve ThomasonSteve Thomason
What is the purpose of the Sabbath Law in the Torah. It is interesting to compare how the context of the law shifts from Exodus to Deuteronomy. Who gets to rest, and why?
This is a presentation by Dada Robert in a Your Skill Boost masterclass organised by the Excellence Foundation for South Sudan (EFSS) on Saturday, the 25th and Sunday, the 26th of May 2024.
He discussed the concept of quality improvement, emphasizing its applicability to various aspects of life, including personal, project, and program improvements. He defined quality as doing the right thing at the right time in the right way to achieve the best possible results and discussed the concept of the "gap" between what we know and what we do, and how this gap represents the areas we need to improve. He explained the scientific approach to quality improvement, which involves systematic performance analysis, testing and learning, and implementing change ideas. He also highlighted the importance of client focus and a team approach to quality improvement.
Read| The latest issue of The Challenger is here! We are thrilled to announce that our school paper has qualified for the NATIONAL SCHOOLS PRESS CONFERENCE (NSPC) 2024. Thank you for your unwavering support and trust. Dive into the stories that made us stand out!
How to Create Map Views in the Odoo 17 ERPCeline George
The map views are useful for providing a geographical representation of data. They allow users to visualize and analyze the data in a more intuitive manner.
Unit 8 - Information and Communication Technology (Paper I).pdfThiyagu K
This slides describes the basic concepts of ICT, basics of Email, Emerging Technology and Digital Initiatives in Education. This presentations aligns with the UGC Paper I syllabus.
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxEduSkills OECD
Andreas Schleicher presents at the OECD webinar ‘Digital devices in schools: detrimental distraction or secret to success?’ on 27 May 2024. The presentation was based on findings from PISA 2022 results and the webinar helped launch the PISA in Focus ‘Managing screen time: How to protect and equip students against distraction’ https://www.oecd-ilibrary.org/education/managing-screen-time_7c225af4-en and the OECD Education Policy Perspective ‘Students, digital devices and success’ can be found here - https://oe.cd/il/5yV
Synthetic Fiber Construction in lab .pptxPavel ( NSTU)
Synthetic fiber production is a fascinating and complex field that blends chemistry, engineering, and environmental science. By understanding these aspects, students can gain a comprehensive view of synthetic fiber production, its impact on society and the environment, and the potential for future innovations. Synthetic fibers play a crucial role in modern society, impacting various aspects of daily life, industry, and the environment. ynthetic fibers are integral to modern life, offering a range of benefits from cost-effectiveness and versatility to innovative applications and performance characteristics. While they pose environmental challenges, ongoing research and development aim to create more sustainable and eco-friendly alternatives. Understanding the importance of synthetic fibers helps in appreciating their role in the economy, industry, and daily life, while also emphasizing the need for sustainable practices and innovation.
2. Synopsis:
SEPARATE CHAINING
Open Hashtable.
Type declaration for separate chaining.
Insert routine for separate chaining Hash
Table
Initialization routine for separate chaining
Hash table.
OPEN ADDRESSING
Linear Probing
Quadric Probing
Double Hashing
3. SEPARATE CHANNING
(Open hashing)
Open hashing is to keep a list of all elements that hash to
the same value.
In the space is tight , it might be preferable to avoid their
use.
In this section that the keys are the first 10 perfect squares
and that the hash function is simply Hash(X)=X mod 10.
That we use the hash function to determine which list to
traverse this list in the normal manner , returning the
position where the item is found.
5. To be involve insert. we travese down the appropriate list to
check then the element is placed.
If the element turns out to be new it is inserted either at the
front of the list or at the end of the list.
This is easily addressed while the code is being written.In the
new element are sometimes are inserted at thre front of the list.The class
specification required to implement the open hashing.
Last item is accessed by the accessing item in the current list
with the ()operator.
The lists are automatically initialized by the list constructor.
Routines to copy and reinitialize are provided. Line 4 through 6 allocate a
hash table structure.
H will be point to s structure containing an integer and a pointer to a
list.Line 7 sets table size to a prime number and lines 8 through 10 attempt to
allocate an array of list.
Implementation uses header allocate one header per list and set its next field
to NULL.
6. Type declaration for separate chaining
hash table
#ifndef_hashsep_H
Struct ListNode;
Typedef struct ListNode *Position;
Struct HashTbl;
typedef struct HashTbl *Hash Table;
HashTable Initialize (int Tablesize);
Void DestroyTable (HashTable H);
Position Find (ElementType Key,
HashTable);
Void insert(ElementType key, HashTable
H);
Element type retrive(position p);
/*Routines such as Delete and make
empty are omitted */
#endif /*_Hashsep_H*/
/* Place in the implementation file*/
struct ListNode
{
ElementType Element;
Position Next;
};
Typedef Position Lists;
/*List *The List will be an array of
lists,allocated later
/*The lists use header (for simplicity,*),*/
/*though this wastes space*/
Struct HashTb
{
int TableSize;
Lists*TheLists;
};
7. Insert routine for separate chaining Hash table
Void
Insert(ElementType key,HashTable H)
{
Position pos,Newcell;
List L;
/*1*/ Pos=Find(key, H);
/*2*/if (pos==NULL)/*Key is not found*/
/*3*/Newcell=malloc(sizeof(struct ListNode));
/*4*/if(Newcell==NULL)
/*5*/ Fatalerror(“Out of space”);
else
{
/*6*/ L=H->The Lists[Hash(Key,H->TableSize)];
/*7*/Newcell->Next=L->Next;
/*8*/Newcell->Element=key; /*Probably need strcpy!*/
/*9*/L->Next =NewCell;
}
}
}
8. Initialization routine for separate
chaining hash table
HashTable
InitializeTable(int Tablesize)
{
HashTable H;
int I;
/*1*/ if (TableSize<MinTableSize)
{
/*2*/ Error (“table size too small”);
/*3*/ return NULL;
}
/*Allocate table*/
/*4*/H=malloc(sizeof(struct HashTbl));
/*5*/if(H==NULL)
/*6*/FatalError(“Out of space!!!”);
/*7*/H->Tablesize = Nextprime(TableSize)
/*Allocate arraay of list*/
/*8*/H->The lists =malloc (sizeof(List)*H-
>TableSize);
/*9*/if (H->TheLists==NULL)
/*10*/ FatalError(“Out of space!!!”);
/*Allocate list header*/
/*11*/ for (i=0;i<H->TableSize;i++)
{
/*12*/H->The Lists [i]=malloc(Sizeof(struct
ListNode));
/*13*/if (H->The lists[i]==NULL)
/*14*/FatalError(“Out of space!!!”);
else
/*15*/ H->The lists[i]->Next=NULL;
}
/*16*/ return H;
}
9. The deletion routine is a straightforward implementation
of deletion in a linked list,so will not bother with it here.
If the table is large and the hash function is good,all the
lists should be short so it is not worthwhile to try anything
cmplicated.
The loaded factor ʎ of a hash table to the ratio of the
number element to the hash table to the table
size.(ex:above ʎ=1.0. The average length of the list is ʎ)
The number of the link to traverse is ʎ on average.A
successful search requires that about 1+(ʎ+2)link be
traversed.
The general rule for separate chaining hashing is to make
the table size about the large as the number of the element
expected
10. OPEN ADDRESSING
Open addressing, or closed hashing, is a method
of collision resolution in hash tables.
Open addressing hashing is an alternative to resolving
collisions with linked list.
Separate chaining hashing has the disadvantage of using
linked lists.
The algorithm down a bit because of the time to allocate
new cells.
Its essentially requires the implements of a second data
structure.
12. LINEAR PROBING
The amounts to trying cells sequentially in search of
empty cell.
The result of inserting keys {89,18,49,58,69} into a
hash table using the same hash function.
The collision resolution strategy ,f(i)=i.
The first collision occurs when 49 is inserted; in spot
0,which is open.
Unsuccessful search ½(1+1/(1-ℷ)2)
Successful search ½(1+1/(1-ℷ))
13. 0
1
2
3
4
5
6
7
8
9
Linear Probing: after
checking spot h(k), try
spot h(k)+1, if that is full,
try h(k)+2, then h(k)+3,
etc.
Insert:
38
19
8
109
10
14. OPEN ADDRESSING HASH TABLE WITH
LINEAR PROBING
Empty table After 89 After 18 After 49 After 58 After 69
0 49 49 49
1 58 58
2 69
3
4
5
6
7
8 18 18 18 18
9 89 89 89 89 89
16. Quadratic Probing:
Success guarantee for < ½
• show for all 0 i,j size/2 and i j
(h(x) + i2) mod size (h(x) + j2) mod size
• by contradiction: suppose that for some i j:
(h(x) + i2) mod size = (h(x) + j2) mod size
i2 mod size = j2 mod size
(i2 - j2) mod size = 0
[(i + j)(i - j)] mod size = 0
Because size is prime(i-j)or (i+j) must be zero, and
neither can be
17. OPEN ADDRESSING HASH TABLE WITH
QUADRATIC PROBING
Empty table After 89 After 18 After 49 After 58 After 69
0 49 49 49
1
2 58 58
3 69
4
5
6
7
8 18 18 18 18
9 89 89 89 89 89
18. DOUBLE HASHING
The last collision resolution method
examine is double hashing.
Double hashing f(i)=i⋅hash2(x).
Hash function to x and probe at a distance
hash2(x),2hash2(x)…,
A function such as hash2(x)=R-(x mod R),
with R a prime smaller than Table Size.
19. f(i) = i * g(k)
where g is a second hash function
Probe sequence:
0th probe = h(k) mod Table Size
1th probe = (h(k) + g(k)) mod Table Size
2th probe = (h(k) + 2*g(k)) mod Table Size
3th probe = (h(k) + 3*g(k)) mod Table Size
. . .
ith probe = (h(k) + i*g(k)) mod Table Size
20. Resolving Collisions with Double
Hashing
Insert these values into the hash table in this order.
Resolve any collisions with double hashing:
13
28
33
147
43
Hash Functions:
H(K) = K mod M
H2(K) = 1 + ((K/M) mod (M-1))