IMA International Conference on Cryptography and Coding

Cryptography and Coding 1995: Cryptography and Coding pp 184-187

Efficient generation of binary words of given weight

  • Nicolas Sendrier
Conference paper

DOI: 10.1007/3-540-60693-9_20

Volume 1025 of the book series Lecture Notes in Computer Science (LNCS)
Cite this paper as:
Sendrier N. (1995) Efficient generation of binary words of given weight. In: Boyd C. (eds) Cryptography and Coding. Cryptography and Coding 1995. Lecture Notes in Computer Science, vol 1025. Springer, Berlin, Heidelberg


We thus provide here a linear time encoder/decoder of binary sequences into words of given weight and length. Furthermore, our algorithm is easy to implement and requires a limited amount of memory. Any exact solution, that a bijection between Wn,t and {1,2,..., (n/t)} will require, as far as we know, an algorithm of complexity at least O(n2), and computations over large integers.

It must be noted however that the statistical properties of the words generated are not very good. The major drawback being that the average length of the last sequence of consecutive “0”s is much larger than the other. For instance with n=1024, t=50 and K=80 the length of this last sequence is 124 instead of 20.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Springer-Verlag 1995

Authors and Affiliations

  • Nicolas Sendrier
    • 1
  1. 1.INRIA, Domaine de Voluceau, RocquencourtLe Chesnay CedexFrance