You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In order to compute the Hamming distance between 2 polynomials a and b, we can encode one of those polynomials in the reverse order and then use polynomial multiplication to obtain the Hamming distance.
Let a_vec and b_vec be the 2 input vectors and we want to compute their Hamming distance. Assume their length is the same, and it is equal to SIZE.
Reverse the order of vector elements from b_vec (the choice of second input instead of first is arbitrary).
Encode both vectors as usual into cyclotomic polynomials.
Polynomial multiplication gives another polynomial whose coefficient at position SIZE is the Hamming distance.
The text was updated successfully, but these errors were encountered:
teor2345
changed the title
Implement the reverse encoding proposed by Eduardo (allows us to compute the Hamming distance)
Implement the reverse encoding to compute the Hamming distance
Jun 6, 2024
This is an exploration of bit extraction.
In order to compute the Hamming distance between 2 polynomials
a
andb
, we can encode one of those polynomials in the reverse order and then use polynomial multiplication to obtain the Hamming distance.Let
a_vec
andb_vec
be the 2 input vectors and we want to compute their Hamming distance. Assume their length is the same, and it is equal toSIZE
.b_vec
(the choice of second input instead of first is arbitrary).SIZE
is the Hamming distance.The text was updated successfully, but these errors were encountered: