Login
Register
@
Dark Mode
Profile
Edit my Profile
Messages
My favorites
Register
Activity
Q&A
Questions
Unanswered
Tags
Subjects
Users
Ask
Previous Years
Blogs
New Blog
Exams
Dark Mode
Topic-Hashing, Made Easy Test Series problem . Please explain and concept also.
Devwritt
asked
in
Algorithms
Oct 27, 2016
retagged
Jun 22, 2022
by
makhdoom ghaya
441
views
2
votes
2
votes
Please explain also--
made-easy-test-series
uniform-hashing
Devwritt
asked
in
Algorithms
Oct 27, 2016
retagged
Jun 22, 2022
by
makhdoom ghaya
by
Devwritt
441
views
answer
comment
Follow
share this
share
0 Comments
Please
log in
or
register
to add a comment.
Please
log in
or
register
to answer this question.
1
Answer
4
votes
4
votes
Best answer
Here m=6 and k=8
Probability of slot not hashed = $\frac{m-1}{m}$
Probability that particular slot being empty after k insertion =$\begin{pmatrix} \frac{m-1}{m} \end{pmatrix}^{k}$
So not being empty for particular slot=$1- \begin{pmatrix} \frac{m-1}{m} \end{pmatrix}^{k}$
Each slot having same probability so= $m \times \begin{pmatrix} 1- \begin{pmatrix} \frac{m-1}{m} \end{pmatrix}^{k} \end{pmatrix}$
So ans should be: $6 \times \begin{pmatrix} 1- \begin{pmatrix} \frac{5}{6} \end{pmatrix}^{8} \end{pmatrix}$ = 4.6045
papesh
answered
Oct 27, 2016
selected
Oct 27, 2016
by
Prashant.
by
papesh
comment
Follow
share this
3 Comments
by
Devwritt
commented
Oct 27, 2016
reply
Follow
share this
Probability of slot not hashed = m-1 / m
can you please explain or give me a reference (any book), So i can get whole concept from there .
And Thanks for the answer
0
0
by
Aboveallplayer
commented
Oct 27, 2016
reply
Follow
share this
just normally say m slots now one key will be hashed in any one of the m slot ( as it is chanining,here multiple keys can be hashed to same slot (indexed with pointers)) so slot being empty is m-1
so prob of that = m-1/m
1
1
by
Devwritt
commented
Oct 28, 2016
reply
Follow
share this
Okay . Got it Thanks.
And if its not chaining , in place of chaining if linear probing then
Probability of slot not hashed =1/m.
is it correct?
0
0
Please
log in
or
register
to add a comment.
← Previous
Next →
← Previous in category
Next in category →
Related questions
0
votes
0
votes
1
answer
1
tishhaagrawal
asked
in
Programming in C
Dec 16, 2023
290
views
Made Easy Test Series : Consider an open addressing hashing scheme with m slots and n keys. Assuming uniform hashing, the expected number of empty slots in the hash table for m=7 and n=3 is equal to ____________(Round off to two decimal places)
tishhaagrawal
asked
in
Programming in C
Dec 16, 2023
by
tishhaagrawal
290
views
hashing
uniform-hashing
data-structures
doubt
made-easy-test-series
0
votes
0
votes
1
answer
2
Anshul_S
asked
in
Algorithms
Oct 26, 2016
457
views
MADE EASY 2016 TEST SERIES
Given a hash table with 6 keys and 10 slots, with simple uniform hashing. If collisions are resolved by chaining then the probability that first slot ends up empty?
Anshul_S
asked
in
Algorithms
Oct 26, 2016
by
Anshul_S
457
views
algorithms
hashing
uniform-hashing
numerical-answers
made-easy-test-series
0
votes
0
votes
1
answer
3
qwertyui
asked
in
Algorithms
Sep 24, 2016
426
views
made easy
what is the expected number of probs requires when inserting an element into an open address hash table with load factor x (assume uniform hashing) a 1/(1-x) b 1/(1+x) c 1/x d 2/(2-x)
qwertyui
asked
in
Algorithms
Sep 24, 2016
by
qwertyui
426
views
hashing
uniform-hashing
made-easy-test-series
1
vote
1
vote
1
answer
4
s_dr_13
asked
in
Algorithms
Mar 6, 2019
950
views
Hashing
Consider an open address hash table with uniform hashing. Out of 10 locations, 8 are occupied. What are the expected number of probes in an unsuccessful and successful search respectively?
s_dr_13
asked
in
Algorithms
Mar 6, 2019
by
s_dr_13
950
views
hashing
data-structures
uniform-hashing
probability
Subscribe to GATE CSE 2024 Test Series
Subscribe to GO Classes for GATE CSE 2024
Quick search syntax
tags
tag:apple
author
user:martin
title
title:apple
content
content:apple
exclude
-tag:apple
force match
+apple
views
views:100
score
score:10
answers
answers:2
is accepted
isaccepted:true
is closed
isclosed:true
Recent Posts
Post GATE 2024 Guidance [Counseling tips and resources]
GATE CSE 2024 Result Responses
[Project Contest] Pytorch backend support for MLCommons Cpp Inference implementation
Participating in MLCommons Inference v4.0 submission (deadline is February 23 12pm IST)
IIITH PGEE 2024 Test Series by GO Classes
Subjects
All categories
General Aptitude
(3.5k)
Engineering Mathematics
(10.4k)
Digital Logic
(3.6k)
Programming and DS
(6.2k)
Algorithms
(4.8k)
Theory of Computation
(6.9k)
Compiler Design
(2.5k)
Operating System
(5.2k)
Databases
(4.8k)
CO and Architecture
(4.0k)
Computer Networks
(4.9k)
Artificial Intelligence
(79)
Machine Learning
(48)
Data Mining and Warehousing
(25)
Non GATE
(1.4k)
Others
(2.7k)
Admissions
(683)
Exam Queries
(1.6k)
Tier 1 Placement Questions
(17)
Job Queries
(80)
Projects
(11)
Unknown Category
(870)
64.3k
questions
77.9k
answers
243k
comments
79.7k
users
Recent Blog Comments
Hlo I'm Rupesh I got AIR 3485 in gate CS and AIR...
@Ajay Sasank here is the direct link...
Thank you for the post didi My GATE 2023 & 2024...
I Hope it helps 😊
Today's best post I seen thank you for motivation
Twitter
WhatsApp
Facebook
Reddit
LinkedIn
Email
Link Copied!
Copy