Skip to content

Fast calculation of specific pairs in a set of numbers

Notifications You must be signed in to change notification settings

mickamcia/Hamming

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This program counts pairs of numbers in binary representation, that differ by exactly one digit.

Is is capable of large input size, i.e. n = 131072 numbers and l = 1024 bits for each number. The program is designed to run on a CUDA-capable GPU only. Time complexity is a stunning O(n*l). Final project for GPU computing course at WUT.

Screenshot from 2023-06-09 14-21-50

Explaination

We can see here 4 distinct binary strings. 3rd and 4th string differ by two digits. 3rd and 5th string differ by one digit, so it is a pair that we are interested in. Checking every possible pair gives us O(ln^2) complexity, which is way less efficient than this implementation's O(nl).

About

Fast calculation of specific pairs in a set of numbers

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published