Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement the reverse encoding to compute the Hamming distance #50

Open
3 tasks
Tracked by #37
emmorais opened this issue Apr 17, 2024 · 0 comments
Open
3 tasks
Tracked by #37

Implement the reverse encoding to compute the Hamming distance #50

emmorais opened this issue Apr 17, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@emmorais
Copy link
Contributor

emmorais commented Apr 17, 2024

This is an exploration of bit extraction.

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.
@teor2345 teor2345 added the enhancement New feature or request label Apr 21, 2024
@teor2345 teor2345 added deliverable A deliverable for a project, or part of a deliverable needs-advice We need advice or feedback before working on this ticket can-triage-out Do we need to do this ticket right now? labels May 30, 2024
@emmorais emmorais self-assigned this Jun 6, 2024
@teor2345 teor2345 removed needs-advice We need advice or feedback before working on this ticket can-triage-out Do we need to do this ticket right now? labels Jun 6, 2024
@teor2345 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
@teor2345 teor2345 added can-triage-out Do we need to do this ticket right now? and removed deliverable A deliverable for a project, or part of a deliverable can-triage-out Do we need to do this ticket right now? labels Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants