Is there a heuristic or function to determine if two arrays of integers are alike or similar

cs.stackexchange https://cs.stackexchange.com/questions/86964

سؤال

What I am trying to do is determine "closeness" or how similar are arrays of integers (or byte arrays, doesn't matter). For example, let's say a = [0, 1, 2, 3, 4], b = [0, 2, 1, 3, 4], and c = [1, 4, 2, 0, 3]. Is there a function to determine that a is closer to b than c is?

So the function I am looking for I think should be similar to SHA, but without the avalanche effect. The examples I give is using arrays of integers, but obviously this should also work on any arbitrary stream of data.

لا يوجد حل صحيح

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى cs.stackexchange
scroll top