Skip to main content

Ordering the Boolean Cube Vectors by Their Weights and with Minimal Change

  • Conference paper
  • First Online:
Algebraic Informatics (CAI 2022)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 13706))

Included in the following conference series:

  • 260 Accesses

Abstract

The topic of generating all subsets of a given set occupies an important place in the books on combinatorial algorithms. The considered algorithms, like many other generating algorithms, are of two main types: for generating in lexicographic order or in Gray code order. Both use binary representation of integers (i.e., binary vectors) as characteristic vectors of the subsets.

Ordering the vectors of the Boolean cube according to their weights is applied in solving some problems—for example, in computing the algebraic degree of Boolean functions, which is an important cryptographic parameter. Among the numerous orderings of Boolean cubic vectors by their (Hamming) weights, two are most important. The weight ordering, where the second criterion for sorting the vectors of equal weights, is the so-called weight-lexicographic order. It is considered in detail in [2]. Considered here is the second weight ordering, where the vectors of equal weights are arranged so that every two consecutive vectors differ in exactly two coordinates, i.e., they are ordered by minimal change. The properties of this ordering are derived. Based on these, an algorithm was developed that generates the vectors of the Boolean cube in this ordering. It uses a binary representation of integers and only performs additions of integers instead of operations on binary vectors. Its time and space complexities are of a linear type with respect to the number of vectors generated. The algorithm was used in the creation of sequence A351939 in OEIS [8].

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    Here, \(A <= B\) means \(A\subseteq B\) and \(Card(A) <= Card(B)\) means \(|A|<=|B|\).

References

  1. Bakoev, V.: A method for fast computing the algebraic degree of boolean functions. In: Proceedings of the 21st International Conference on Computer Systems and Technologies (CompSysTech 2020), Ruse, Bulgaria, 19–20 June 2020, pp. 141–147 (2020). https://doi.org/10.1145/3407982.3408005

  2. Bakoev, V.: Some problems and algorithms related to the weight order relation on the \(n\)-dimensional boolean cube. Discrete Math. Algorithms Appl. 13(3), 2150021 (23 p) (2021). https://doi.org/10.1142/S179383092150021X

  3. Knuth, D.: The Art of Computer Programming, Volume 4A: Combinatorial Algorithms, Part 1. Addison-Wesley, New Jersey (2011)

    Google Scholar 

  4. Kreher, D., Stinson, D.: Combinatorial Algorithms: Generation, Enumeration and Search. CRC Press, Boca Raton (1999)

    MATH  Google Scholar 

  5. Nijenhuis, A., Wilf, H.: Combinatorial Algorithms for Computers and Calculators, 2nd edn. Academic Press, Cambridge (1978)

    MATH  Google Scholar 

  6. Reingold, E., Nievergelt, J., Deo, N.: Combinatorial Algorithms, Theory and practice. Prentice-Hall, New Jersey (1977)

    MATH  Google Scholar 

  7. Ruskey, F.: Combinatorial generation: working version (1j-CSC 425/520) (2003). http://page.math.tu-berlin.de/~felsner/SemWS17-18/Ruskey-Comb-Gen.pdf

  8. Sloane, N.J., et al.: The on-line encyclopedia of integer sequences. https://oeis.org

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Valentin Bakoev .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2022 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Bakoev, V. (2022). Ordering the Boolean Cube Vectors by Their Weights and with Minimal Change. In: Poulakis, D., Rahonis, G. (eds) Algebraic Informatics. CAI 2022. Lecture Notes in Computer Science, vol 13706. Springer, Cham. https://doi.org/10.1007/978-3-031-19685-0_4

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-19685-0_4

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-19684-3

  • Online ISBN: 978-3-031-19685-0

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics