wood burning stoves 2.0*
The moose likes Performance and the fly likes Performans of Cyclic Shift Hash Codes in Turkish Dictionary 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 » Performance
Bookmark "Performans of Cyclic Shift Hash Codes in Turkish Dictionary" Watch "Performans of Cyclic Shift Hash Codes in Turkish Dictionary" New topic
Author

Performans of Cyclic Shift Hash Codes in Turkish Dictionary

Oguzhan Cerit
Greenhorn

Joined: Jul 19, 2013
Posts: 2
Hello everyone,

I did an program which is calculate the collision numbers in the hashtable and my hash codes cyclic shift codes. Turkish dictionary size 64.XXX, initial size of table = 100 and default load factor = 0.5 . I think, results are very huge. What do you think about my result? Can it be true?

total collison

Cyclic 0 = 1955572687
Cyclic 1 = 22908670
Cyclic 2 = 61177946
Cyclic 3 = 165753628
Cyclic 4 = 132100650
Cyclic 5 = 199552619
Cyclic 6 = 171852805
Cyclic 7 = 57775799
Cyclic 8 = 32423039
Cyclic 9 = 100528376
Cyclic 10 = 135211468
Cyclic 11 = 87988889
Cyclic 12 = 86773321
Cyclic 13 = 314981380
Cyclic 14 = 205773236
Cyclic 15 = 165812902
Cyclic 16 = 52394829

Thank you.
Winston Gutkowski
Bartender

Joined: Mar 17, 2011
Posts: 7552
    
  18

Oguzhan Cerit wrote:I think, results are very huge. What do you think about my result? Can it be true?

Sure it can, the size of the hash value will depend on the size of the word, and even if you only use a shift value of 5, it won't take more than 5 or 6 letters to overflow a 32-bit int - maybe even less, depending on your algorithm. I would also imagine that some specifically "Turkish" letters have quite high values to start with; although, as I recall, there aren't too many of those.

Do you have some reason to think there's a problem? For example, are you getting lots of collisions?

Winston

Isn't it funny how there's always time and money enough to do it WRONG?
Articles by Winston can be found here
Oguzhan Cerit
Greenhorn

Joined: Jul 19, 2013
Posts: 2
Thank you Winston for your answer. Now, I want to explain more.

In my code, there is no deficiency. There are some result below. These results might be more clear for you and you will understand me. My results changed but when I compare the result of English Dictionary and result of Turkish dictionary, I feel that something is wrong?

Results : English Dictionary and Turkish Dictionary. webpage





Oguzhan
Winston Gutkowski
Bartender

Joined: Mar 17, 2011
Posts: 7552
    
  18

Oguzhan Cerit wrote:In my code, there is no deficiency.

A very dangerous thing to say, particularly as you haven't shown it to us.

There are some result below. These results might be more clear for you and you will understand me. My results changed but when I compare the result of English Dictionary and result of Turkish dictionary, I feel that something is wrong?

Which would suggest that your opening statement is wrong.

Show us the actual code, because without it, it's very difficult to make any suggestions.

And when you do: please UseCodeTags (←click) and DontWriteLongLines.

We also don't want your entire program; just the pieces that are relevant to your cyclic hash.

Winston
 
Consider Paul's rocket mass heater.
 
subject: Performans of Cyclic Shift Hash Codes in Turkish Dictionary
 
Similar Threads
Not Compiling > problelm
Modification of an application
Decrpytion Using SHA-1
KeyGenerator, Part II
Sorting two ArrayLists, one dependent on the other