Hash Tables + probability question

  • Context: Graduate 
  • Thread starter Thread starter FlashStorm
  • Start date Start date
  • Tags Tags
    Probability
Click For Summary

Discussion Overview

The discussion revolves around a homework question related to hash tables, specifically focusing on the expected length of probes using Markov's inequality. Participants explore the mathematical implications of the problem, including probability distributions and bounds on expected values.

Discussion Character

  • Homework-related
  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • One participant, Aviv, describes the context of the question and outlines their progress on the first three sub-questions, noting that the fourth question involves proving that the expected length of probes is O(log n) using Markov's inequality.
  • Another participant suggests rewriting the inequality to facilitate the proof and proposes that E(X) can be expressed in terms of t and a positive value v.
  • Aviv responds that they have already attempted this approach without success, leading to a relationship involving probabilities and logarithmic expressions, but they struggle to derive an upper bound.
  • One participant comments on the approximation of t, suggesting that if t is close to 1, it simplifies the logarithmic expression.
  • Aviv counters that t should not be approximated as 1, arguing that it represents the number of probes and that such an assumption leads to incorrect conclusions about E(X).
  • Another participant questions whether Aviv's reasoning holds for t = 1, prompting further clarification.
  • Aviv reiterates their belief that t should be larger and expresses concern that assuming t = 1 contradicts the expected outcome of the problem.

Areas of Agreement / Disagreement

Participants express differing views on the treatment of the variable t and its implications for the expected value E(X). There is no consensus on how to approach the problem or whether certain assumptions about t are valid.

Contextual Notes

Participants note that the question is new and has not appeared in previous assignments, raising concerns about its appropriateness or potential errors. The discussion reflects ongoing uncertainty regarding the application of Markov's inequality and the bounds on expected values.

FlashStorm
Messages
17
Reaction score
0
Now before I'll post the question , I want to be clear. Technically , this WAS a homework question. BUT since I don't have to submit it (because I finished with the homework submitting process , and now studying for the test), I think it is legitimate to post here the homework file + I am doing it because I couldn't really solve it. (and there is no official solutions because our lecturers and his assistance are pretty god damn lazy:( )

now this is question 6 (with the hash table of size 2n to store n elements).
I've solved the first three sub-questions:

the first one is upper bounded by p=1/2 and it distributes as geometric random variable.
the second one is just substituting in the first sub question.
the third one is basically the sum of all n Xi insertions with the answer of sub question b.

Now, the forth questions deals somehow with Markov's inequality and about to prove that the expected length of probes is O(logn).

So I know that Markov's inequality means :
P(x>=t)<= E(X)/t

and although i tried to used this fact to get an upper bound , I couldn't find any solution or a lead.

Note: This is a new question which didn't appear on previous years assignments. If you have a reason to believe this question was made inappropriately or maybe even some mistakes.

Looking forward for your help
and thank you,
Aviv
 

Attachments

Physics news on Phys.org
Rewrite P(x>t) < E(X)/t as t*P(x>t) < E(X), or E(X) = t*P(x>t) + v for some v > 0. Show that t*P(x>=t) + v is O(Log n).
 
It was the first thing i have done, obviously. yet couldn't get any results.

according to the questions P(X>=t)<= n/2^t (according to question 6.1 the probability to probe more then k times is 2^-k , sum it n times and you will get n/2^t).

So that leads us to nt/2^t<=E(X).

after doing log on both sides (log2) i get logn+logt-t<=log (E(X)). since t can be any number, I can't block it or take it out. I lack insights about that situation. But even if I do manage to get E(X)>={log expression}. All I get is a lower bound. then I will have to show an upper bound.

:(
Thanks in advance
 
Last edited:
If t [itex]\approx[/itex] 1, then log t [itex]\approx[/itex] t - 1.
 
I don't think t has any estimations, why would t[tex]\approx[/tex]1 . t is the number of probes
but even if it had anything like it i would get that E(X)=[tex]\Omega[/tex](n), which is the complete contrary.
 
Are you saying that what you have does not work for t = 1?
 
Yes, I think at least. t is the number of probes on the array. and the question says "use markov's inequality to prove that the longest probe sequence is E(X)=O(logn)".

there is no reason to believe that t = 1 (it should even be much bigger to my opinion), and even if it were true, i would still get the wrong answer.
 
Last edited:

Similar threads

  • · Replies 7 ·
Replies
7
Views
1K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 0 ·
Replies
0
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 57 ·
2
Replies
57
Views
7K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 13 ·
Replies
13
Views
3K
  • · Replies 29 ·
Replies
29
Views
6K