Take the 2-minute tour ×
Cryptography Stack Exchange is a question and answer site for software developers, mathematicians and others interested in cryptography. It's 100% free, no registration required.

I've been reading about hash functions, but found nothing close to solve this problem - I'm looking for a function with could be used for binary comparison of multiple files / streams of bytes etc. Assume files:

  1. for file A we have 01000010100
  2. for file B we have 01000000000
  3. for file C we have 0100001
  4. for file D we have 11111000000
  5. for file E we have 010000101

Now, goal is to find out which files have smallest - sorry if I misuse term here - "newtons distance". So basically, I would expect an algorithm that can state that for file A files B and E are "close" match.

Does such function exist, or one would need to use combination of several?

Sorry if I'm posting this on the wrong SE network. I could not decide if this belongs to Mathematics or Computational Science, better so decided to go for Cryptography. I'm pretty sure they'll create "StackAlgorithm" soon. :)

Edit:

Or perhaps I'll elaborate.

Imagine we have 10k samples of various sizes. 1-10MB. Might be varied amplitude digital signals, might be un-normalized audio samples, I want to make it irrelevant. Goal is to keep database of such hashes to quickly select similar input, whether "shorter" or just partially different but same size.

share|improve this question
1  
I think this simhash.googlecode.com/svn/trunk/paper/SimHashWithBib.pdf is defines problem well –  user11372 Jan 11 at 18:02
1  
This isn't really a cryptography question, even if it's kind of close. Stack Overflow does allow algorithm design questions, so you could ask this there. Alternatively, Computer Science (as opposed to Computational Science) Stack Exchange could be another option. –  Ilmari Karonen Jan 12 at 7:02
    
This has nothing to do with cryptography. Your question is probably one for Computer Science, but your problem statement is very hard to understand. It looks like you're trying to build a fuzzy matching algorithm, but this is very dependent on the type of data, since the nature of the transformations that don't matter depends a lot on the nature of the data. –  Gilles Jan 12 at 19:48
add comment

closed as off-topic by Ilmari Karonen, DrLecter, e-sushi, AFS, Gilles Jan 12 at 19:45

  • This question does not appear to be about cryptography within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

Browse other questions tagged or ask your own question.