N
Niv
Guest
I have to generate some unique codes of 16 bits length, but each code
must be at least differnt by 5 bits from any other code.
Now there are 65536 possible 16 bit codes, but what is the maximal
number of codes with 5 bit differences; I'm assuming, possibly
incorrectly, it'll vary depending on the seed code used.
i.e. "000000000000000" could be used as seed, then next code could be
"0000000000011111" etc etc.
I could perhaps write a programme to generate a sequence of
incrementing code, testing for 5 bit differences against all previously
generated codes, and counting how many I get, then loop back and
increment the start value.
This seems like a fairly useful algorithm; length N bits, M bit
differences, maximal sequence length to be found.
Has anyone got a pointer to somethingalready done please to save me
some time.
(I guess it fairly simple to write a process to fill arrays with codes
of 5 bit diffs, count the number of codes and then increment the seed
and see if more codes are generated & then update the filled array if
so.
must be at least differnt by 5 bits from any other code.
Now there are 65536 possible 16 bit codes, but what is the maximal
number of codes with 5 bit differences; I'm assuming, possibly
incorrectly, it'll vary depending on the seed code used.
i.e. "000000000000000" could be used as seed, then next code could be
"0000000000011111" etc etc.
I could perhaps write a programme to generate a sequence of
incrementing code, testing for 5 bit differences against all previously
generated codes, and counting how many I get, then loop back and
increment the start value.
This seems like a fairly useful algorithm; length N bits, M bit
differences, maximal sequence length to be found.
Has anyone got a pointer to somethingalready done please to save me
some time.
(I guess it fairly simple to write a process to fill arrays with codes
of 5 bit diffs, count the number of codes and then increment the seed
and see if more codes are generated & then update the filled array if
so.