Beruflich Dokumente
Kultur Dokumente
Discrete Mathematics II
Done by:
Lejla Tašaković
Our project was to analyze the behavior of hashing with chaining using the
balls-and-bins simulations . The balls-and- bins problem is a classic problem
in probability theory that has many applications in computer science. The problem
involves m balls and n bins, and, in order to answer on this problem, we wrote a code that
throws n balls uniformly randomly into m bins. Also, we answered od three main
questions :
1) How many of bins were empty?
2) How many bins had more than average (n/m) number of balls, how many had more
than twice the average (2n/m) number of balls?
3) How full was the fullest bin?
In the end, in order to get a fairly reliable statistic, we have launched our code
50 times for each one of these experiments.
Project implementation