algorithmmatrixdata-structureshamming-distancebinary-matrix

How do I find the least hamming distance matrix from a set of matrices for a given matrix?


I have a very large set of 400x400 binary matrices M. For a given binary matrix A, how do I find the matrix B within the set M such that it has the least hamming distance from A?


Solution

  • This is probably a duplicate of this question:

    Efficiently find binary strings with low Hamming distance in large set

    The fact that your string represents a matrix does not change anything to the hamming distance.

    For something fancier, you can also look at this recent paper:

    https://www.cas.mcmaster.ca/ashtiani/papers/online-nearest-neighbor.pdf