Abstract

AbstractThe 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].Keywordsn-dimensional Boolean cubeBinary vectorWeight ordering relationMinimal changeGenerating all subsetsGray codeRevolving door algorithm

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call