Questions tagged [hash-collision]

a situation that occurs when two distinct pieces of data have the same hash value, checksum, fingerprint, or cryptographic digest.

See also the wiki tag.

233 questions
-1
votes
1 answer

How to generate random number without repetition in java using hash function

I want to add a shuffle option in my android music player app. For that purpose i am calling a random function in java to return a number between 0 and size of the currently playing songs list. The problem is that the function returns same value as…
Shanij P.S
  • 164
  • 3
  • 12
-1
votes
1 answer

Collision generators or Datasets for hash collisions (like MD5, SHA-1 ...)

I'd like to test 3rd party (including "closed source") tools (like synchronization, de-duplication...) behaves in presence of files with same size and digest checksum (popular ones CRC32, MD5,SHA-1 ... etc). Some of those hashing methods have known…
-2
votes
1 answer

go maps non-performant for large number of keys

I discovered very strange behaviour with go maps recently. The use case is to create a group of integers and have O(1) check for IsMember(id int). The current implementation is : func convertToMap(v []int64) map[int64]void { out :=…
zaRRoc
  • 345
  • 1
  • 7
  • 18
-2
votes
2 answers

Implementing HashMap: Avoid collisions caused by compress function

I'm implementing a hashmap to contain all words in a word file (e.g dictionary.txt, bible.txt) and I am having a collision problem. I know that there are many good hash functions out there but when I try compressing the hash code using this…
Mike Pham
  • 437
  • 6
  • 17
-2
votes
1 answer

Fast and (practically) collision free hash

I have an object which calculates a (long) path. Two objects are equal if the calculates the same path. I previously tested if two objects were equal by just doing something like: obj1.calculatePath() == obj2.calculatePath() However, now this has…
Markus
  • 2,526
  • 4
  • 28
  • 35
-3
votes
2 answers

How can I resolve the collision in the hashing in this code I did? Currently cannot search for NG CHEA YEAT's ID only

I have the following text file 1171203258:HOSSAIN, MARUF 1181202660:KUHAN RAJ A/L TAMIL CHEL WAM 1181203465:PONG KAI SUN 1191102443:FAIZA OSAMA ABDALLA HASHIM 1201302289:LEE JIA WEI 1201302368:SHEIKH, AHNAF AZMAIN 1201100584:HI CHIA…
-3
votes
1 answer

Java HashMap gives wrong values for the given key

I am using a Map of type Map>>. After populating the map, if I immediately retrieve some values using the String key, the returned List is correct. But after some iteration the values are changing.…
Ranji
  • 61
  • 1
  • 1
  • 6
-3
votes
1 answer

Hash table for search words in large text. O(1)

I must create hash table with operation speed O(1) for large text(search, paste, delete). Is it real? How minimize collision? Any example? I never used C++ later. i can't find any example hash table with dictionary for text. Target language C++…
Sergey
  • 37
  • 1
  • 2
  • 5
1 2 3
15
16