Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Beginning Java and the fly likes Formulas needed for calculating statistic using hashing. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Formulas needed for calculating statistic using hashing." Watch "Formulas needed for calculating statistic using hashing." New topic
Author

Formulas needed for calculating statistic using hashing.

Dubravko Zubavich
Greenhorn

Joined: Mar 04, 2009
Posts: 20
I am working on calculating statistics information using hash tables. My book provides formulas for calculating load factor, average number of elements examined during a successful search using hashing with linear probing, double hashing and chained hashing.

I was wondering if someone knows or can point me to a link which can tell me how to calculate the maximum number of items examined during a successful search for all these three hashing methods.

Thank you.
Dubravko Zubavich
Greenhorn

Joined: Mar 04, 2009
Posts: 20
anyone ?
Piet Verdriet
Ranch Hand

Joined: Feb 25, 2006
Posts: 266
Dubravko Zubavich wrote:...

I was wondering if someone knows or can point me to a link which can tell me how to calculate the maximum number of items examined during a successful search for all these three hashing methods.

Thank you.


A hash table is nothing more than an array of linked lists. So, iterate over that array, and on each item (linked list) in that array, check it's size. The maximum number of items examined during a successful search is the size of the biggest list.
Dhruva Mistry
Ranch Hand

Joined: Nov 21, 2008
Posts: 67

Dubravko Zubavich wrote:I am working on calculating statistics information using hash tables. My book provides formulas for calculating load factor, average number of elements examined during a successful search using hashing with linear probing, double hashing and chained hashing.

I was wondering if someone knows or can point me to a link which can tell me how to calculate the maximum number of items examined during a successful search for all these three hashing methods.

Thank you.


you can creat 1 static int variable that will get incremented after getting done with search method and when the whole loop will get finished, you can display that static int variable and that will show you no of amount search did


Dhruva
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Formulas needed for calculating statistic using hashing.
 
Similar Threads
relative URL in jar files
binarysearch() method doubt
Wrapper class question from Danchisolm
Coding calcs for frustum formula
Hash Tables