Next Article in Journal
Discrete-Time Semi-Markov Random Evolutions in Asymptotic Reduced Random Media with Applications
Next Article in Special Issue
Optimization Methodologies and Testing on Standard Benchmark Functions of Load Frequency Control for Interconnected Multi Area Power System in Smart Grids
Previous Article in Journal
On the Effect of the Absorption Coefficient in a Differential Game of Pollution Control
Previous Article in Special Issue
Join Products K2,3 + Cn
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Method for Developing Combinatorial Generation Algorithms Based on AND/OR Trees and Its Application

1
Department of Complex Information Security of Computer Systems, Tomsk State University of Control Systems and Radioelectronics, Tomsk 634050, Russia
2
Institute of Innovation, Tomsk State University of Control Systems and Radioelectronics, Tomsk 634050, Russia
*
Author to whom correspondence should be addressed.
Mathematics 2020, 8(6), 962; https://doi.org/10.3390/math8060962
Submission received: 6 May 2020 / Revised: 1 June 2020 / Accepted: 9 June 2020 / Published: 12 June 2020
(This article belongs to the Special Issue Advances and Novel Approaches in Discrete Optimization)

Abstract

:
In this paper, we study the problem of developing new combinatorial generation algorithms. The main purpose of our research is to derive and improve general methods for developing combinatorial generation algorithms. We present basic general methods for solving this task and consider one of these methods, which is based on AND/OR trees. This method is extended by using the mathematical apparatus of the theory of generating functions since it is one of the basic approaches in combinatorics (we propose to use the method of compositae for obtaining explicit expression of the coefficients of generating functions). As a result, we also apply this method and develop new ranking and unranking algorithms for the following combinatorial sets: permutations, permutations with ascents, combinations, Dyck paths with return steps, labeled Dyck paths with ascents on return steps. For each of them, we construct an AND/OR tree structure, find a bijection between the elements of the combinatorial set and the set of variants of the AND/OR tree, and develop algorithms for ranking and unranking the variants of the AND/OR tree.

1. Introduction

Many information objects have a hierarchical or recursive structure. In this case, a tree structure is a convenient form of representing such information objects. This allows us to describe an information object by a combinatorial set and apply combinatorial generation algorithms for it. A combinatorial set is a finite set whose elements have some structure and there is an algorithm for constructing the elements of this set. The elements of combinatorial sets (combinatorial objects) like combinations, permutations, partitions, compositions, paths, graphs, trees, etc. play an important role in mathematics and computer science.
Knuth [1] gives a detailed overview of the formation and development of the direction related to designing combinatorial algorithms. In this overview, special attention is paid to the procedure for traversing all possible elements of a given combinatorial set. This problem can be studied as enumerating, listing, and generating elements of a given combinatorial set. On the other hand, Ruskey [2] introduces the concept of combinatorial generation and distinguishes the following four tasks in this area:
  • Listing: generating elements of a given combinatorial set sequentially;
  • Ranking: ranking (numbering) elements of a given combinatorial set;
  • Unranking: generating elements of a given combinatorial set in accordance with their ranks;
  • Random selection: generating elements of a given combinatorial set in random order.
Before applying combinatorial generation algorithms, it is necessary to develop them. General methods for developing combinatorial generation algorithms were studied by such researches as E.M. Reingold [3], D.L. Kreher [4], E. Barcucci [5,6], S. Bacchelli [7,8], A. Del Lungo [9,10], V. Vajnovszki [11,12,13], P. Flajolet [14,15], C. Martinez and X. Molinero [16,17,18,19,20], B.Y. Ryabko and Y.S. Medvedeva [21,22,23], and V.V. Kruchinin [24].
There are several basic general methods for developing combinatorial generation algorithms:
  • backtracking [3,4]: this method is used for exhaustive generation and based on constructing a state space tree for a combinatorial set and obtaining feasible solutions on level l of the tree that are built up from partial solutions on level l 1 ;
  • ECO-method [5,6,7,8,9,10,11,12,13]: this method is used for exhaustive generation and based on producing a set of new objects of size n + 1 , using a succession rule and starting from an object of size n;
  • Flajolet’s method [14,15,16,17,18,19,20]: this method can be applied for listing, ranking, and unranking a large family of unlabeled and labeled admissible combinatorial classes that can be obtained by using admissible combinatorial operators (disjoint union, Cartesian unlabeled product, labeled product, sequence, set, cycle, powerset, substitution, etc.);
  • Ryabko’s method [21,22,23]: this method can be applied for ranking and unranking combinatorial objects presented in the form of a word, this method operates with word prefixes and uses the divide-and-conquer paradigm;
  • Kruchinin’s method [24]: this method can be applied for listing, ranking, and unranking a combinatorial set represented in the form of an AND/OR tree structure for which the total number of its variants is equal to the value of the cardinality function of the combinatorial set.
Each of these methods claims the universality of its application in the development of new combinatorial generation algorithms. The study of these methods have shown the following results connected with their limitations and requirements [25]:
  • the main characteristic, which is necessary for developing combinatorial generation algorithms, is the cardinality function of a combinatorial set;
  • some methods (backtracking and ECO-method) are aimed only at the development of listing algorithms;
  • there are restrictions on applying some methods (ECO-method and Flajolet’s method) for combinatorial sets that are described by more than one parameter;
  • most methods require the representation of a combinatorial object in a special form (for example, as a word, a sequence, a specification, or an AND/OR tree), but this is not always a trivial task and requires additional research;
  • there are requirements for additional information describing a combinatorial set.
Also, there are many combinatorial generation algorithms that are based on features of the applied combinatorial set or that are based on simple counting techniques (for example, see [26,27,28]). Therefore, the methods used for developing such algorithms cannot be universal (they cannot be applied to develop new combinatorial generation algorithms for other combinatorial sets).
Thus, there is no universal general method that can be applied for developing new combinatorial generation algorithms. The main purpose of our research is to derive and improve general methods for developing combinatorial generation algorithms. In this paper, we consider and extend Kruchinin’s method for developing combinatorial generation algorithms, which is based on the use of AND/OR trees. This method:
  • allows us to develop all types of combinatorial generation algorithms (listing, ranking, and unranking algorithms);
  • has no restrictions on the number of parameters that describe combinatorial sets (this allows us to consider complex discrete structures);
  • requires only an expression of the cardinality function as additional information describing a combinatorial set.
However, to apply this method, it is necessary to know an expression of the cardinality function of a combinatorial set that must satisfy the following conditions:
  • the expression of the cardinality function can contain only positive integers (let N denotes the set of natural numbers);
  • the expression of the cardinality function can contain only such algebraic operations as addition (which is denoted by +) and multiplication (which is denoted by ×);
  • the cardinality function may be recursively defined in terms of itself (let R denotes a primitive recursive function).
If an expression of the cardinality function f of a combinatorial set A satisfies the conditions presented above, then we will say that f belongs to the algebra { N , + , × , R } . The requirement of the cardinality function that belongs to the algebra { N , + , × , R } is the main restriction of Kruchinin’s method. If the required form of the cardinality function is unknown for a given combinatorial set, then this method cannot be applied to develop combinatorial generation algorithms.
The organization of this paper is as follows. Section 2 of this paper is devoted to a brief description of the main theoretical points of the used method for developing combinatorial generation algorithms. In Section 3, our modification of the original method is presented. The modification is based on applying the method of compositae from the theory of generating functions. To confirm the effectiveness of using the proposed modification of the original method, we develop new ranking and unranking algorithms for the following combinatorial sets: permutations, permutations with ascents, combinations, Dyck paths with return steps, labeled Dyck paths with ascents on return steps. The obtained results are shown in Section 4.

2. Method for Developing Combinatorial Generation Algorithms Based on AND/OR Trees

Kruchinin [24] introduces a method for developing combinatorial generation algorithms, which is based on the use of AND/OR trees. This method is based on representing a combinatorial set in the form of an AND/OR tree structure for which the total number of its variants is equal to the value of the cardinality function of the combinatorial set. Using an AND/OR tree structure, it is possible to develop listing, ranking, and unranking algorithms for a given combinatorial set. The effectiveness of this method is shown in the development of combinatorial generation algorithms for a large number of combinatorial sets (for example, permutations, combinations, partitions, compositions, the Fibonacci numbers, the Catalan numbers, the Stirling numbers, tree structures, and formal languages).
An AND/OR tree is a tree structure that contains nodes of two types: AND nodes and OR nodes. Figure 1 shows a way for representing nodes in an AND/OR tree.
A variant of an AND/OR tree is a tree structure obtained by removing all edges except one for each OR node. Figure 2 shows an example of an AND/OR tree and all its variants.
If we know the cardinality function f of a combinatorial set A that belongs to the algebra { N , + , × , R } , then we can construct an AND/OR tree structure for which the total number of its variants is equal to the value of the cardinality function (Theorems 1–3 and Corollaries 1–2 in [24]. To do this, it is necessary to perform the following steps for the cardinality function f:
  • each addition + from f must be represented as an OR node of the AND/OR tree where all terms are represented as sons of the OR node;
  • each multiplication × from f must be represented as an AND node of the AND/OR tree where all factors are represented as sons of the AND node;
  • each coefficient k N from f must be represented as an OR node of the AND/OR where all sons are leaves and their number is equal to k;
  • each recursive operation from f must be represented as recursion in the AND/OR tree (it will be denoted by a node with a triangle).
Thus, the method for developing combinatorial generation algorithms based on AND/OR trees can be written in the following form:
Input: The cardinality function f of a combinatorial set A that belongs to the algebra { N , + , × , R } .
Output: The combinatorial generation algorithms
RankVariant ( v ) : W ( D ) N | W ( D ) |
and
UnrankVariant ( r ) : N | W ( D ) | W ( D ) ,
where each variant v of an AND/OR tree D constructed for the combinatorial set A must correspond to a specific combinatorial object a A . That is, the bijection A W ( D ) must be defined, where W ( D ) is the set of all the variants v of the AND/OR tree D. The combination of this bijection with the algorithms RankVariant ( v ) and UnrankVariant ( r ) represents the desired combinatorial generation algorithms Rank ( a ) : A N and Unrank ( r ) : N A (for ranking and unranking elements of the combinatorial set A).
The ranking algorithm RankVariant ( v ) allows us to associate each variant v W ( D ) of the AND/OR tree D with a unique number r N | W ( D ) | = { 0 , 1 , , | W ( D ) | 1 } called the rank. The rank r of a combinatorial object a represented as a variant v of the corresponding AND/OR tree D is determined by the value of l ( z ) for the node z of the variant v that is the root of the AND/OR tree D.
The value of l ( z ) corresponds to a number for the node z that satisfies the condition
0 l ( z ) < w ( z ) ,
where w ( z ) shows the number of variants in the subtree of the node z.
The value of l ( z ) is calculated according to the following rules:
  • If a node z of the variant v is a leaf of the AND/OR tree D, then
    l ( z ) = 0 ;
  • If a node z of the variant v is an AND node of the AND/OR tree D, then
    l ( z ) = l ( s 1 ( z ) ) + w ( s 1 ( z ) ) l ( s 2 ( z ) ) + w ( s 2 ( z ) ) l ( s n 1 ( z ) ) + w ( s n 1 ( z ) ) l ( s n ( z ) ) ,
    where n is equal to the number of sons for the node z and s i ( z ) is the i-th son of the node z;
  • If a node z of the variant v is an OR node of the AND/OR tree D, then
    l ( z ) = l ( s k ( z ) ) + i = 1 k 1 w ( s i ( z ) ) ,
    where k is the position of the son s k ( z ) of the node z chosen in the variant v among all its sons in the AND/OR tree D.
For the general case, the rules for ranking the variants of an AND/OR tree was formalized and presented as Algorithm 1. To run this algorithm, it is necessary to start from the command RankVariant ( r o o t , v , D ) , where r o o t is the root of an AND/OR tree D.
Algorithm 1: A general algorithm for ranking the variants of an AND/OR tree.
Mathematics 08 00962 i001
The unranking algorithm UnrankVariant ( r ) performs the inverse operation to the algorithm RankVariant ( v ) . That is, the algorithm UnrankVariant ( r ) allows us to associate each rank r N | W ( D ) | with a unique variant v of the AND/OR tree D. The algorithm UnrankVariant ( r ) is based on the inverse actions to the calculations used in the algorithm RankVariant ( v ) . For the general case, the rules for unranking the variants of an AND/OR tree were formalized and presented as Algorithm 2.
Algorithm 2: A general algorithm for unranking the variants of an AND/OR tree.
Mathematics 08 00962 i002

3. Modification of the Method for Developing Combinatorial Generation Algorithms

The use of the method for developing combinatorial generation algorithms based on AND/OR trees has the following two restrictions:
Firstly, if we do not know the cardinality function of a combinatorial set that belongs to the algebra { N , + , × , R } , then we cannot construct the corresponding AND/OR tree for the combinatorial set. Therefore, this method for developing combinatorial generation algorithms cannot be applied without an AND/OR tree structure.
If an AND/OR tree structure is constructed for a combinatorial set, then there is a new problem. This problem is associated with finding a bijection between the elements of the combinatorial set and the set of variants of the AND/OR tree (that is, each variant v of an AND/OR tree D constructed for the combinatorial set A must correspond to a specific combinatorial object a A , and vice versa). A general approach for solving this problem does not exist, since each combinatorial set has its own and completely unique characteristics. We propose to use the following recommendation: it is necessary to consider the changes that occur in the structure of combinatorial objects when moving from one node of an AND/OR tree to another (considering the type of a node, the label of a node and the selected sons) and show these changes in the bijection.
For solving the first problem, we propose to apply the theory of generating functions, since it is one of the basic approaches in modern combinatorics and generating functions are already known for many combinatorial sets. An ordinary generating function of a sequence a n n 0 is the following formal power series [29]:
A ( t ) = a 0 + a 1 t + a 2 t 2 + = n 0 a n t n .
For the coefficients of the powers of generating functions, the notion of the compositae of a generating function was introduced in [30]. The composita of an ordinary generating function
G ( t ) = n > 0 g n t n
is the following function with two variables G Δ ( n , k ) , which is a coefficients function of the k-th power of the generating function G ( t ) :
G ( t ) k = n k G Δ ( n , k ) t n .
This mathematical apparatus provides such operations on compositae as shift, addition, multiplication, composition, reciprocation, and compositional inversion of generating functions. Such operations on compositae allow us to obtain explicit expressions for the coefficients of generating functions. To obtain an explicit expression for the coefficients of a generating function using the method of compositae, it is necessary to decompose the given generating function into functions for that the compositae are known and apply the corresponding operations to them. More detailed information about the compositae can be found in [30,31,32,33,34,35].
If for a given combinatorial set A we consider its subset A n A , which contains only the combinatorial objects of size n, then the cardinality function f ( n ) = | A n | of this combinatorial set A n can be described by a generating function
F ( t ) = n 0 f n t n = n 0 f ( n ) t n = n 0 | A n | t n .
Hence, to obtain an expression for the cardinality function f ( n ) of a combinatorial set for which a generating function is known, we can apply the method of compositae for obtaining an explicit expression of the coefficients f n of the generating function [25]. Moreover, the operations on compositae can be extended to the case of multivariate generating functions. This makes it possible to obtain expressions for the cardinality functions of combinatorial sets that are described by more than one parameter.
The obtained method for developing combinatorial generation algorithms with its modification is presented as a sequence of the following steps:
  • If the cardinality function f of a combinatorial set A that belongs to the algebra { N , + , × , R } is known, then go to Step 4.
  • If the generating function F for the values of the cardinality function f of the combinatorial set A is known, then apply the method of compositae for obtaining an explicit expression of the coefficients of the generating function. Otherwise, the method for developing combinatorial generation algorithms cannot be applied.
  • If the cardinality function f of the combinatorial set A that belongs to the algebra { N , + , × , R } is obtained, then go to Step 4. Otherwise, the method for developing combinatorial generation algorithms cannot be applied.
  • Using the cardinality function f of the combinatorial set A, construct the corresponding AND/OR tree D.
  • Find a bijection A W ( D ) between the elements of the combinatorial set A and the set of variants v of the AND/OR tree D in the form of the algorithms ObjectToVariant ( a , D ) : A W ( D ) , where a A , and VariantToObject ( v , D ) : W ( D ) A , where v W ( D ) .
  • Find a bijection W ( D ) N | W ( D ) | between the elements of the set of variants v of the AND/OR tree D and the finite set of natural numbers N | W ( D ) | = { 0 , 1 , , | W ( D ) | 1 } , using the algorithms RankVariant ( r o o t , v , D ) : W ( D ) N | W ( D ) | , where r o o t is the root of an AND/OR tree D, v W ( D ) , and UnrankVariant ( r , D ) : N | W ( D ) | W ( D ) , where r N | W ( D ) | .
The combination of the algorithms defined in the last two steps of the modified method forms a bijection A N and represents the combinatorial generation algorithms Rank ( a ) : A N for ranking and Unrank ( r ) : N A for unranking elements of the combinatorial set A.

4. Application of the Modification of the Method for Developing Combinatorial Generation Algorithms

Next, we consider the process of developing ranking and unranking algorithms using the obtained method for developing combinatorial generation algorithms. We describe a combinatorial set, construct an AND/OR tree, find a bijection between the elements of the combinatorial set and the set of variants of the AND/OR tree, and develop algorithms for ranking and unranking the variants.

4.1. Combinatorial Set

Let us consider the following combinatorial object: a labeled Dyck n-path with m ascents on return steps. A Dyck n-path is a lattice path in the plane which begins at ( 0 , 0 ) , ends at ( 2 n , 0 ) , and consists of steps ( 1 , 1 ) called rises or up-steps and ( 1 , 1 ) called falls or down-steps [36]. A return step is a down-step at level 1 (a return to the ground level 0) [37]. In a labeled Dyck n-path with m ascents on return steps, each down-step has its own label (a unique value from 1 to n). If we consider the sequence of labels of down-steps of a Dyck n-path starting from ( 0 , 0 ) , then it has exactly m ascents.
Figure 3 shows all possible variants of the considered labeled Dyck paths for n = 3 and m = 1 .
The total number of labeled Dyck n-paths with m ascents on return steps is defined by the elements of the Euler–Catalan number triangle (the sequence A 316773 in [38]). That is, the cardinality function of this combinatorial set is equal to the Euler–Catalan numbers, which are denoted by E C n m [39].
Applying the method of compositae for obtaining explicit expressions for the coefficients of generating functions, we have found a generating function and the following explicit formula [39]:
E C n m = 1 , for n = m = 0 ; k = m + 1 n n ! k ! C T n k E k m , otherwise , = 1 , for n = m = 0 ; k = m + 1 n C T n k C n k E k m P n k , otherwise ,
where C T n m is the transposed Catalan triangle, C n m is the number of m-combinations of n elements, E n m is the Euler triangle, and P n is the number of permutations of n elements.

4.2. AND/OR Tree

Equation (1) belongs to the algebra { N , + , × , R } , and there are the well-known formulas for the components of Equation (1), which also belong to the required algebra:
  • the elements of the transposed Catalan triangle (the sequence A 033184 in [38]) show the number of Dyck n-paths with m return steps and can be calculated using the following recurrence [37]:
    C T n m = C T n 1 m 1 + C T n m + 1 , C T n 0 = 0 , C T n n = 1 ;
  • the number of m-combinations of n elements (the sequence A 007318 in [38]) can be calculated using the following recurrence [40]:
    C n m = C n 1 m + C n 1 m 1 , C n n = C n 0 = 1 ;
  • the elements of the Euler triangle (the sequence A 173018 in [38]) show the number of permutations of n elements with m ascents and can be calculated using the following recurrence [41]:
    E n m = ( m + 1 ) E n 1 m + ( n m ) E n 1 m 1 , E n n 1 = E n 0 = 1 ;
  • the number of permutations of n elements (the sequence A 000142 in [38]) can be calculated using the following recurrence [40]:
    P n = n P n 1 , P 0 = 1 .
Since Equation (1) and all the formulas for its components belong to the algebra { N , + , × , R } , we can construct the AND/OR tree structure for E C n m , which is presented in Figure 4. A bijection between the labeled Dyck n-paths with m ascents on return steps and the variants of the AND/OR tree is defined by the following rules:
  • the number of return steps in a Dyck path is determined by the value of k (the selected son of the OR node labeled E C n m in a variant of the AND/OR tree);
  • the subtree of the node labeled C T n k determines the version of a Dyck n-path with k return steps;
  • the subtree of the node labeled C n k determines k values given from the set of n values, which are used as the labels for the return steps (the remaining n k values are used as the labels for the remaining n k down-steps);
  • the subtree of the node labeled E k m determines the version of a permutation of the labels for k return steps, which form exactly m ascents;
  • the subtree of the node labeled P n k determines the version of a permutation of the labels for the remaining n k down-steps.
Next, we need to construct AND/OR tree structures for all the subtrees of the AND/OR tree for E C n m . We also need to find bijections between the variants of these AND/OR trees and the corresponding combinatorial objects.
Since Equation (2) belongs to the algebra { N , + , × , R } , we can construct the AND/OR tree structure for C T n m , which is presented in Figure 5. A bijection between the Dyck n-paths with m return steps and the variants of the AND/OR tree is defined by the following rules:
  • if a Dyck n-path is not completely filled and it is at the ground level 0, then it is necessary to add an up-step;
  • each selected left son of the AND/OR tree (the node labeled C T n 1 m 1 ) corresponds to a down-step in a Dyck n-path;
  • each selected right son of the AND/OR tree (the node labeled C T n m + 1 ) corresponds to an up-step in a Dyck n-path;
  • if a leaf of the AND/OR tree is reached (when m = n ), then it is necessary to add n down-steps.
For a compact representation, we encode a Dyck n-path by a sequence a = ( a 1 , , a 2 n ) , where a i = ‘u’ encodes an up-step and a i = ‘d’ encodes a down-step. We also encode a variant of an AND/OR tree by a sequence v = ( v 1 , v 2 , ) of the selected sons of the OR nodes in this tree (the left son corresponds to v i = 0 and the right son corresponds to v i = 1 ). An example of applying the obtained bijection for Dyck paths with return steps is presented in Table A1.
Since Equation (3) belongs to the algebra { N , + , × , R } , we can construct the AND/OR tree structure for C n m , which is presented in Figure 6. A bijection between the m-combinations of n elements and the variants of the AND/OR tree is defined by the following rules:
  • each selected left son of the AND/OR tree (the node labeled C n 1 m ) determines that the element n is not selected in an m-combination of n elements;
  • each selected right son of the AND/OR tree (the node labeled C n 1 m 1 ) determines that the element n is selected in an m-combination of n elements;
  • if a leaf of the AND/OR tree is reached (when m = 0 ), then it is necessary to not select all n elements in an m-combination of n elements;
  • if a leaf of the AND/OR tree is reached (when m = n ), then it is necessary to select all n elements in an m-combination of n elements.
For a compact representation, we encode an m-combination of n elements by a sequence a = ( a 1 , , a n ) , where a i = 0 encodes that the i-th element is not selected and a i = 1 encodes that the i-th element is selected. We also encode a variant of an AND/OR tree by a sequence v = ( v 1 , v 2 , ) of the selected sons of the OR nodes in this tree (the left son corresponds to v i = 0 and the right son corresponds to v i = 1 ). An example of applying the obtained bijection for combinations is presented in Table A2.
Since Equation (4) belongs to the algebra { N , + , × , R } , we can construct the AND/OR tree structure for E n m , which is presented in Figure 7. A bijection between the permutations of n elements with m ascents and the variants of the AND/OR tree is defined by the following rules:
  • each selected left son of the OR node labeled E n m determines that the element n does not add an ascent in a permutation of n elements, and the selected son of the OR node labeled m + 1 determines the position of the element n in the permutation (there are exactly m + 1 possible positions);
  • each selected right son of the OR node labeled E n m determines that the element n adds an ascent in a permutation of n elements, and the selected son of the OR node labeled n m determines the position of the element n in the permutation (there are exactly n m possible positions);
  • if a leaf of the AND/OR tree is reached (when m = 0 ), then it is necessary to arrange all n elements in a permutation of n elements in decreasing order;
  • if a leaf of the AND/OR tree is reached (when m = n 1 ), then it is necessary to arrange all n elements in a permutation of n elements in increasing order.
For a compact representation, we encode a variant of an AND/OR tree by a sequence v = ( v 1 , v 2 , ) of the selected sons of the OR nodes in this tree, where each v i is represented as a pair ( v i , 1 , v i , 2 ) . In this pair: v i , 1 = 0 corresponds to the left son of the OR node labeled E n m and v i , 2 determines the selected son of the OR node labeled m + 1 ; v i , 1 = 1 corresponds to the right son of the OR node labeled E n m , v i , 2 determines the selected son of the OR node labeled n m . An example of applying the obtained bijection for permutations with ascents is presented in Table A3.
Since Equation (5) belongs to the algebra { N , + , × , R } , we can construct the AND/OR tree structure for P n , which is presented in Figure 8. A bijection between the permutations of n elements and the variants of the AND/OR tree is defined by the following rules:
  • each selected son of the OR node labeled n determines the position of the element n in a permutation of n elements;
  • if a leaf of the AND/OR tree is reached (when n = 0 ), then it is necessary to form an empty permutation.
For a compact representation, we encode a variant of an AND/OR tree by a sequence v = ( v 1 , v 2 , ) of the selected sons of the OR nodes in this tree. An example of applying the obtained bijection for permutations is presented in Table A4.
We have constructed AND/OR trees for all the combinatorial sets presented in this paper. Hence, we can develop algorithms for ranking and unranking the variants of the AND/OR trees.

4.3. Ranking and Unranking Algorithms

Based on Algorithms 1 and 2, we can develop algorithms for ranking and unranking the variants of the constructed AND/OR trees for E C n m , C T n m , C n m , E n m , and P n .
For the AND/OR tree for C T n m , which is presented in Figure 5, we develop an algorithm for ranking its variants (Algorithm 3) and an algorithm for unranking its variants (Algorithm 4). Combining the developed algorithms with the derived rules for the bijection, we get algorithms for ranking and unranking the combinatorial set of Dyck n-paths with m return steps.
Algorithm 3: An algorithm for ranking the variants of the AND/OR tree for C T n m .
Mathematics 08 00962 i003
Algorithm 4: An algorithm for unranking the variants of the AND/OR tree for C T n m .
Mathematics 08 00962 i004
In these algorithms, ( ) denotes an empty sequence and a function concat denotes merging sequences. That is, if we have a sequence a = ( a 1 , , a n ) and a sequence b = ( b 1 , , b m ) , then we can get the following sequence:
concat ( a , b ) = ( a 1 , , a n , b 1 , , b m ) .
For the AND/OR tree for C n m , which is presented in Figure 6, we develop an algorithm for ranking its variants (Algorithm 5) and an algorithm for unranking its variants (Algorithm 6). Combining the developed algorithms with the derived rules for the bijection, we get algorithms for ranking and unranking the combinatorial set of m-combinations of n elements.
Algorithm 5: An algorithm for ranking the variants of the AND/OR tree for C n m .
Mathematics 08 00962 i005
Algorithm 6: An algorithm for unranking the variants of the AND/OR tree for C n m .
Mathematics 08 00962 i006
For the AND/OR tree for E n m , which is presented in Figure 7, we develop an algorithm for ranking its variants (Algorithm 7) and an algorithm for unranking its variants (Algorithm 8). Combining the developed algorithms with the derived rules for the bijection, we get algorithms for ranking and unranking the combinatorial set of permutations of n elements with m ascents.
Algorithm 7: An algorithm for ranking the variants of the AND/OR tree for E n m .
Mathematics 08 00962 i007
Algorithm 8: An algorithm for unranking the variants of the AND/OR tree for E n m .
Mathematics 08 00962 i008
For the AND/OR tree for P n , which is presented in Figure 8, we develop an algorithm for ranking its variants (Algorithm 9) and an algorithm for unranking its variants (Algorithm 10). Combining the developed algorithms with the derived rules for the bijection, we get algorithms for ranking and unranking the combinatorial set of permutations of n elements.
Algorithm 9: An algorithm for ranking the variants of the AND/OR tree for P n .
Mathematics 08 00962 i009
Algorithm 10: An algorithm for unranking the variants of the AND/OR tree for P n .
Mathematics 08 00962 i010
For the AND/OR tree for E C n m , which is presented in Figure 4, we develop an algorithm for ranking its variants (Algorithm 11) and an algorithm for unranking its variants (Algorithm 12). Combining the developed algorithms with the derived rules for the bijection, we get algorithms for ranking and unranking the combinatorial set of labeled Dyck n-paths with m ascents on return steps.
Algorithm 11: An algorithm for ranking the variants of the AND/OR tree for E C n m .
Mathematics 08 00962 i011
Algorithm 12: An algorithm for unranking the variants of the AND/OR tree for E C n m .
Mathematics 08 00962 i012
In these algorithms, we use all the above mentioned algorithms for ranking and unranking the variants of the AND/OR trees for C T n m , C n m , E n m , and P n . For a compact representation, a variant of the AND/OR tree for E C n m is encoded by a sequence v = ( k , v 1 , v 2 , v 3 , v 4 ) , where:
  • k is the label of the selected son of the OR node labeled E C n m in a variant of the AND/OR tree;
  • v 1 corresponds to the variant of the subtree of the node labeled C T n k ;
  • v 2 corresponds to the variant of the subtree of the node labeled C n k ;
  • v 3 corresponds to the variant of the subtree of the node labeled E k m ;
  • v 4 corresponds to the variant of the subtree of the node labeled P n k .

5. Conclusions

In this paper, we study methods for developing combinatorial generation algorithms and present basic general methods for solving this task. We consider one of these methods, which is based on AND/OR trees, and extend it by using the mathematical apparatus of the theory of generating functions.
Using an AND/OR tree structure, it is possible to develop listing, ranking, and unranking algorithms for a given combinatorial set. However, the use of the method for developing combinatorial generation algorithms based on AND/OR trees has the following restriction: the cardinality function of a combinatorial set must belong to the algebra { N , + , × , R } . For solving this problem, we propose to apply the method of compositae for obtaining explicit expression of the coefficients of generating functions, since the theory of generating functions is one of the basic approaches in combinatorics. The limitation of this method is that it can be applied only for a combinatorial set for which a generating function is known.
As a result, we formalize the proposed idea in our modification of the original method for developing combinatorial generation algorithms. In addition, one of the main contributions of the paper is the application of this method. To confirm the effectiveness of using the proposed method, we develop new ranking and unranking algorithms for the following combinatorial sets: labeled Dyck n-paths with m ascents on return steps, Dyck n-paths with m return steps, m-combinations of n elements, permutations of n elements with m ascents, permutations of n elements. For each of them, we construct an AND/OR tree, find a bijection between the elements of the combinatorial set and the set of variants of the AND/OR tree, and develop algorithms for ranking and unranking the variants of the AND/OR tree.
All the developed algorithms have been realized in the computer algebra system “Maxima” and validated by exhaustive generation for fixed values of combinatorial set parameters. It also has shown that all the developed algorithms have polynomial time complexity. Several examples of applying the obtained results can be found in Appendix A.
As further research, we will consider the development of new and effective combinatorial generation algorithms in the field of applied mathematics. For example, it can be done for combinatorial sets that represent different types of chemical compounds [42], molecular structures such as RNA and DNA [43,44,45], etc. We also plan further improvements to the presented method for developing combinatorial generation algorithms, for example, through the usage of other types of trees [46].

Author Contributions

Investigation, Y.S., V.K., and D.K.; methodology, V.K.; writing—original draft preparation, Y.S.; writing—review and editing, D.K. All authors have read and agreed to the published version of the manuscript.

Funding

The reported study was supported by the Russian Science Foundation (project no. 18-71-00059).

Acknowledgments

The authors would like to thank the referees for their helpful comments and suggestions.

Conflicts of Interest

The authors declare no conflict of interest.

Appendix A. Examples of Ranking the Elements of Combinatorial Sets

Table A1. Ranking the combinatorial set of Dyck n-paths with m return steps for n = 5 and m = 2 .
Table A1. Ranking the combinatorial set of Dyck n-paths with m return steps for n = 5 and m = 2 .
Dyck pathVariant of AND/OR TreeRank
u d u u d u d u d d ( 0 , 1 , 0 , 1 , 0 , 1 ) 0
u d u u d u u d d d ( 0 , 1 , 0 , 1 , 1 ) 1
u d u u u d d u d d ( 0 , 1 , 1 , 0 , 0 , 1 ) 2
u d u u u d u d d d ( 0 , 1 , 1 , 0 , 1 ) 3
u d u u u u d d d d ( 0 , 1 , 1 , 1 ) 4
u u d d u u d u d d ( 1 , 0 , 0 , 1 , 0 , 1 ) 5
u u d d u u u d d d ( 1 , 0 , 0 , 1 , 1 ) 6
u u d u d d u u d d ( 1 , 0 , 1 , 0 , 0 , 1 ) 7
u u d u d u d d u d ( 1 , 0 , 1 , 0 , 1 ) 8
u u d u u d d d u d ( 1 , 0 , 1 , 1 ) 9
u u u d d d u u d d ( 1 , 1 , 0 , 0 , 0 , 1 ) 10
u u u d d u d d u d ( 1 , 1 , 0 , 0 , 1 ) 11
u u u d u d d d u d ( 1 , 1 , 0 , 1 ) 12
u u u u d d d d u d ( 1 , 1 , 1 ) 13
Table A2. Ranking the combinatorial set of m-combinations of n elements for n = 5 and m = 2 .
Table A2. Ranking the combinatorial set of m-combinations of n elements for n = 5 and m = 2 .
CombinationVariant of AND/OR TreeRank
( 1 , 1 , 0 , 0 , 0 ) ( 0 , 0 , 0 ) 0
( 1 , 0 , 1 , 0 , 0 ) ( 0 , 0 , 1 , 0 ) 1
( 0 , 1 , 1 , 0 , 0 ) ( 0 , 0 , 1 , 1 ) 2
( 1 , 0 , 0 , 1 , 0 ) ( 0 , 1 , 0 , 0 ) 3
( 0 , 1 , 0 , 1 , 0 ) ( 0 , 1 , 0 , 1 ) 4
( 0 , 0 , 1 , 1 , 0 ) ( 0 , 1 , 1 ) 5
( 1 , 0 , 0 , 0 , 1 ) ( 1 , 0 , 0 , 0 ) 6
( 0 , 1 , 0 , 0 , 1 ) ( 1 , 0 , 0 , 1 ) 7
( 0 , 0 , 1 , 0 , 1 ) ( 1 , 0 , 1 ) 8
( 0 , 0 , 0 , 1 , 1 ) ( 1 , 1 ) 9
Table A3. Ranking the combinatorial set of permutations of n elements with m ascents for n = 4 and m = 2 .
Table A3. Ranking the combinatorial set of permutations of n elements with m ascents for n = 4 and m = 2 .
PermutationVariant of AND/OR TreeRank
( 4 , 1 , 2 , 3 ) ( ( 0 , 1 ) ) 0
( 1 , 4 , 2 , 3 ) ( ( 0 , 2 ) ) 1
( 1 , 2 , 4 , 3 ) ( ( 0 , 3 ) ) 2
( 3 , 4 , 1 , 2 ) ( ( 1 , 1 ) , ( 0 , 1 ) ) 3
( 3 , 1 , 2 , 4 ) ( ( 1 , 2 ) , ( 0 , 1 ) ) 4
( 1 , 3 , 4 , 2 ) ( ( 1 , 1 ) , ( 0 , 2 ) ) 5
( 1 , 3 , 2 , 4 ) ( ( 1 , 2 ) , ( 0 , 2 ) ) 6
( 2 , 3 , 4 , 1 ) ( ( 1 , 1 ) , ( 1 , 1 ) ) 7
( 2 , 3 , 1 , 4 ) ( ( 1 , 2 ) , ( 1 , 1 ) ) 8
( 2 , 4 , 1 , 3 ) ( ( 1 , 1 ) , ( 1 , 2 ) ) 9
( 2 , 1 , 3 , 4 ) ( ( 1 , 2 ) , ( 1 , 2 ) ) 10
Table A4. Ranking the combinatorial set of permutations of n elements for n = 4 .
Table A4. Ranking the combinatorial set of permutations of n elements for n = 4 .
PermutationVariant of AND/OR TreeRank
( 4 , 3 , 2 , 1 ) ( 1 , 1 , 1 , 1 ) 0
( 3 , 4 , 2 , 1 ) ( 2 , 1 , 1 , 1 ) 1
( 3 , 2 , 4 , 1 ) ( 3 , 1 , 1 , 1 ) 2
( 3 , 2 , 1 , 4 ) ( 4 , 1 , 1 , 1 ) 3
( 4 , 2 , 3 , 1 ) ( 1 , 2 , 1 , 1 ) 4
( 2 , 4 , 3 , 1 ) ( 2 , 2 , 1 , 1 ) 5
( 2 , 3 , 4 , 1 ) ( 3 , 2 , 1 , 1 ) 6
( 2 , 3 , 1 , 4 ) ( 4 , 2 , 1 , 1 ) 7
( 4 , 2 , 1 , 3 ) ( 1 , 3 , 1 , 1 ) 8
( 2 , 4 , 1 , 3 ) ( 2 , 3 , 1 , 1 ) 9
( 2 , 1 , 4 , 3 ) ( 3 , 3 , 1 , 1 ) 10
( 2 , 1 , 3 , 4 ) ( 4 , 3 , 1 , 1 ) 11
( 4 , 3 , 1 , 2 ) ( 1 , 1 , 2 , 1 ) 12
( 3 , 4 , 1 , 2 ) ( 2 , 1 , 2 , 1 ) 13
( 3 , 1 , 4 , 2 ) ( 3 , 1 , 2 , 1 ) 14
( 3 , 1 , 2 , 4 ) ( 4 , 1 , 2 , 1 ) 15
( 4 , 1 , 3 , 2 ) ( 1 , 2 , 2 , 1 ) 16
( 1 , 4 , 3 , 2 ) ( 2 , 2 , 2 , 1 ) 17
( 1 , 3 , 4 , 2 ) ( 3 , 2 , 2 , 1 ) 18
( 1 , 3 , 2 , 4 ) ( 4 , 2 , 2 , 1 ) 19
( 4 , 1 , 2 , 3 ) ( 1 , 3 , 2 , 1 ) 20
( 1 , 4 , 2 , 3 ) ( 2 , 3 , 2 , 1 ) 21
( 1 , 2 , 4 , 3 ) ( 3 , 3 , 2 , 1 ) 22
( 1 , 2 , 3 , 4 ) ( 4 , 3 , 2 , 1 ) 23

References

  1. Knuth, D.E. The Art of Computer Programming, Volume 4A: Combinatorial Algorithms, Part 1; Addison-Wesley Professional: Boston, MA, USA, 2011. [Google Scholar]
  2. Ruskey, F. Combinatorial Generation. Working Version (1j-CSC 425/520). Available online: http://page.math.tu-berlin.de/~felsner/SemWS17-18/Ruskey-Comb-Gen.pdf (accessed on 1 May 2020).
  3. Reingold, E.M.; Nievergelt, J.; Deo, N. Combinatorial Algorithms: Theory and Practice; Prentice-Hall: Upper Saddle River, NJ, USA, 1977. [Google Scholar]
  4. Kreher, D.L.; Stinson, D.R. Combinatorial Algorithms: Generation, Enumeration, and Search; CRC Press: Boca Raton, FL, USA, 1999. [Google Scholar]
  5. Barcucci, E.; Del Lungo, A.; Pergola, E.; Pinzani, R. ECO: A methodology for the enumeration of combinatorial objects. J. Differ. Equ. Appl. 1999, 5, 435–490. [Google Scholar] [CrossRef]
  6. Barcucci, E.; Del Lungo, A.; Pergola, E. Random generation of trees and other combinatorial objects. Theoret. Comput. Sci. 1999, 218, 219–232. [Google Scholar] [CrossRef] [Green Version]
  7. Bacchelli, S.; Barcucci, E.; Grazzini, E.; Pergola, E. Exhaustive generation of combinatorial objects by ECO. Acta Inform. 2004, 40, 585–602. [Google Scholar] [CrossRef]
  8. Bacchelli, S.; Ferrari, L.; Pinzani, R.; Sprugnoli, R. Mixed succession rules: The commutative case. J. Combin. Theory Ser. A 2010, 117, 568–582. [Google Scholar]
  9. Del Lungo, A.; Frosini, A.; Rinaldi, S. ECO method and the exhaustive generation of convex polyominoes. Lect. Notes Comput. Sci. Discret. Math. Theor. Comput. Sci. 2003, 2731, 129–140. [Google Scholar]
  10. Del Lungo, A.; Duchi, E.; Frosini, A.; Rinaldi, S. On the generation and enumeration of some classes of convex polyominoes. Electron. J. Combin. 2004, 11, 1–46. [Google Scholar] [CrossRef] [Green Version]
  11. Vajnovszki, V. Generating involutions, derangements, and relatives by ECO. Discrete Math. Theor. Comput. Sci. 2010, 12, 109–122. [Google Scholar]
  12. Vajnovszki, V. An efficient Gray code algorithm for generating all permutations with a given major index. J. Discret. Algorithms 2014, 26, 77–88. [Google Scholar] [CrossRef]
  13. Do, P.T.; Tran, T.T.H.; Vajnovszki, V. Exhaustive generation for permutations avoiding (colored) regular sets of patterns. Discret. Appl. Math. 2019, 268, 44–53. [Google Scholar] [CrossRef] [Green Version]
  14. Flajolet, P.; Zimmerman, P.; Cutsem, B. A calculus for the random generation of combinatorial structures. Theoret. Comput. Sci. 1994, 132, 1–35. [Google Scholar] [CrossRef]
  15. Sedgewick, R.; Flajolet, P. An Introduction to the Analysis of Algorithms, 2nd ed.; Addison-Wesley: Boston, MA, USA, 2013. [Google Scholar]
  16. Martinez, C.; Molinero, X. A generic approach for the unranking of labeled combinatorial classes. Random Struct. Algorithms 2001, 19, 472–497. [Google Scholar] [CrossRef] [Green Version]
  17. Martinez, C.; Molinero, X. Generic algorithms for the generation of combinatorial objects. Lect. Notes Comput. Sci. Math. Found. Comput. Sci. 2003, 2747, 572–581. [Google Scholar]
  18. Martinez, C.; Molinero, X. An experimental study of unranking algorithms. Lect. Notes Comput. Sci. Exp. Effic. Algorithms 2004, 3059, 326–340. [Google Scholar]
  19. Martinez, C.; Molinero, X. Efficient iteration in admissible combinatorial classes. Theoret. Comput. Sci. 2005, 346, 388–417. [Google Scholar] [CrossRef] [Green Version]
  20. Molinero, X.; Vives, J. Unranking algorithms for combinatorial structures. Int. J. Appl. Math. Inf. 2015, 9, 110–115. [Google Scholar]
  21. Ryabko, B.Y. Fast enumeration of combinatorial objects. Discret. Math. Appl. 1998, 8, 163–182. [Google Scholar] [CrossRef] [Green Version]
  22. Medvedeva, Y.S.; Ryabko, B.Y. Fast enumeration algorithm for words with given constraints on run lengths of ones. Probl. Inf. Transm. 2010, 46, 390–399. [Google Scholar] [CrossRef]
  23. Medvedeva, Y. Fast enumeration of words generated by Dyck grammars. Math. Notes 2014, 96, 68–83. [Google Scholar] [CrossRef]
  24. Kruchinin, V.V. Methods for Developing Algorithms for Ranking and Unranking Combinatorial Objects Based on AND/OR Trees; V-Spektr: Tomsk, Russia, 2007. (In Russian) [Google Scholar]
  25. Shablya, Y.; Kruchinin, D.; Kruchinin, V. Application of the method of compositae in combinatorial generation. In Proceedings of the Book of the 2nd Mediterranean International Conference of Pure and Applied Mathematics and Related Areas (MICOPAM2019), Paris, France, 28–31 August 2019; pp. 91–94. [Google Scholar]
  26. Hartman, P.; Sawada, J. Ranking and unranking fixed-density necklaces and Lyndon words. Theoret. Comput. Sci. 2019, 791, 36–47. [Google Scholar] [CrossRef]
  27. Pai, K.J.; Chang, J.M.; Wu, R.Y.; Chang, S.C. Amortized efficiency of generation, ranking and unranking left-child sequences in lexicographic order. Discrete Appl. Math. 2019, 268, 223–236. [Google Scholar] [CrossRef]
  28. Amani, M.; Nowzari-Dalini, A. Efficient generation, ranking, and unranking of (k,m)-ary trees in B-order. Bull. Iranian Math. Soc. 2019, 45, 1145–1158. [Google Scholar] [CrossRef]
  29. Stanley, R.P. Enumerative Combinatorics, 2nd ed.; Cambridge University Press: Cambridge, MA, USA, 2011; Volume 1. [Google Scholar]
  30. Kruchinin, D.V.; Kruchinin, V.V. A method for obtaining generating functions for central coefficients of triangles. J. Integer Seq. 2012, 15, 12.9.3. [Google Scholar]
  31. Kruchinin, D.V.; Kruchinin, V.V. Explicit formulas for some generalized polynomials. Appl. Math. Inf. Sci. 2013, 7, 2083–2088. [Google Scholar] [CrossRef] [Green Version]
  32. Kruchinin, V.V.; Kruchinin, D.V. Composita and its properties. J. Anal. Number Theory 2014, 2, 37–44. [Google Scholar]
  33. Kruchinin, D.V.; Shablya, Y.V. Explicit formulas for Meixner polynomials. Int. J. Math. Math. Sci. 2015, 2015, 620569. [Google Scholar] [CrossRef] [Green Version]
  34. Kruchinin, D.V.; Shablya, Y.V.; Kruchinin, V.V.; Shelupanov, A.A. A method for obtaining coefficients of compositional inverse generating functions. In Proceedings of the International Conference of Numerical Analysis and Applied Mathematics (ICNAAM 2015), Rhodes, Greece, 22–28 September 2015; Volume 1738, p. 130003. [Google Scholar]
  35. Kruchinin, D.V.; Kruchinin, V.V. Explicit formula for reciprocal generating function and its application. Adv. Stud. Contemp. Math. Kyungshang 2019, 29, 365–372. [Google Scholar]
  36. Banderier, C.; Krattenthaler, C.; Krinik, A.; Kruchinin, D.; Kruchinin, V.; Nguyen, D.; Wallner, M. Explicit formulas for enumeration of lattice paths: Basketball and the kernel method. In Lattice Path Combinatorics and Applications; Springer: Cham, Switzerland, 2019; pp. 78–118. [Google Scholar]
  37. Deutsch, E. Dyck path enumeration. Discret. Math. 1999, 204, 167–202. [Google Scholar] [CrossRef] [Green Version]
  38. Sloane, N.J.A. The On-Line Encyclopedia of Integer Sequences. Available online: https://oeis.org (accessed on 1 May 2020).
  39. Shablya, Y.; Kruchinin, D. Euler–Catalan’s number triangle and its application. Symmetry 2020, 12, 600. [Google Scholar] [CrossRef]
  40. Graham, R.L.; Knuth, D.E.; Patashnik, O. Concrete Mathematics, 2nd ed.; Addison-Wesley: Boston, MA, USA, 1994. [Google Scholar]
  41. Petersen, T.K. Eulerian Numbers; Birkhauser Advanced Texts; Basler Lehrbucher, Birkhauser/Springer: New York, NY, USA, 2015. [Google Scholar]
  42. Shimizu, T.; Fukunaga, T.; Nagamochi, H. Unranking of small combinations from large sets. J. Discret. Algorithms 2014, 29, 8–20. [Google Scholar] [CrossRef]
  43. Seyedi-Tabari, E.; Ahrabian, H.; Nowzari-Dalini, A. A new algorithm for generation of different types of RNA. Int. J. Comput. Math. 2010, 87, 1197–1207. [Google Scholar] [CrossRef]
  44. Nebel, M.E.; Scheid, A.; Weinberg, F. Random generation of RNA secondary structures according to native distributions. Algorithms Mol. Biol. 2011, 6, 24. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  45. Chee, Y.M.; Chrisnata, J.; Kiah, H.M.; Nguyen, T.T. Efficient encoding/decoding of irreducible words for codes correcting tandem duplications. In Proceedings of the 2018 IEEE International Symposium on Information Theory (ISIT), Vail, CO, USA, 17–22 June 2018. [Google Scholar]
  46. Pop, P.C. The generalized minimum spanning tree problem: An overview of formulations, solution procedures and latest advances. Eur. J. Oper. Res. 2020, 283, 1–15. [Google Scholar] [CrossRef]
Figure 1. The representation of nodes in an AND/OR tree.
Figure 1. The representation of nodes in an AND/OR tree.
Mathematics 08 00962 g001
Figure 2. An AND/OR tree and all its variants.
Figure 2. An AND/OR tree and all its variants.
Mathematics 08 00962 g002
Figure 3. All labeled Dyck paths of size 3 with 1 ascent on return steps.
Figure 3. All labeled Dyck paths of size 3 with 1 ascent on return steps.
Mathematics 08 00962 g003
Figure 4. An AND/OR tree for E C n m .
Figure 4. An AND/OR tree for E C n m .
Mathematics 08 00962 g004
Figure 5. An AND/OR tree for C T n m .
Figure 5. An AND/OR tree for C T n m .
Mathematics 08 00962 g005
Figure 6. An AND/OR tree for C n m .
Figure 6. An AND/OR tree for C n m .
Mathematics 08 00962 g006
Figure 7. An AND/OR tree for E n m .
Figure 7. An AND/OR tree for E n m .
Mathematics 08 00962 g007
Figure 8. An AND/OR tree for P n .
Figure 8. An AND/OR tree for P n .
Mathematics 08 00962 g008

Share and Cite

MDPI and ACS Style

Shablya, Y.; Kruchinin, D.; Kruchinin, V. Method for Developing Combinatorial Generation Algorithms Based on AND/OR Trees and Its Application. Mathematics 2020, 8, 962. https://doi.org/10.3390/math8060962

AMA Style

Shablya Y, Kruchinin D, Kruchinin V. Method for Developing Combinatorial Generation Algorithms Based on AND/OR Trees and Its Application. Mathematics. 2020; 8(6):962. https://doi.org/10.3390/math8060962

Chicago/Turabian Style

Shablya, Yuriy, Dmitry Kruchinin, and Vladimir Kruchinin. 2020. "Method for Developing Combinatorial Generation Algorithms Based on AND/OR Trees and Its Application" Mathematics 8, no. 6: 962. https://doi.org/10.3390/math8060962

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop