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

117 Views Asked by At

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?

1

There are 1 best solutions below

0
One Lyner On BEST ANSWER

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