Hamming Distance for Kanerva Coding
Vectors & Geometry DS practice problem on Onlearn.
Difficulty: medium.
Topics: Understanding Hamming Distance in the context of Kanerva Sparse Distributed Memory, XOR Gate Logic, Popcount Operation, Memory Addressing in Neural Networks, Radial Basis Function Approximation, Manhattan Distance in Hamming Space, Linear Algebra, Information Theory, Sparse Distributed Memory, Computational Geometry, Binary Arithmetic, Vector Norms, Error-Detecting Codes, High-Dimensional Mapping, Similarity Metrics, Bitwise Operations.
In Kanerva Coding, data is mapped to a high dimensional space where retrieval depends on 'closeness' to memory addresses. Given two binary vectors of equal length, implement a function to calculate the Hamming distance, which represents the number of positions at which the corresponding symbols are different.