In order to make
compositions of ndiagrams and count the number of components we use the
complete set of chord diagrams and closures of ntangles.
For example, the basic chord diagrams 3.13.5 have, respectively, 1,3,2,3,6 possible positions. Among all basic chord diagrams for n=3,4, only one diagram, 4.17, has the left and right form and the maximal number of 16 possible positions. The set of ndiagrams is closed with regard to ntangle compositions modulo internal closed components. For example, the composition of the chord diagram 3.3 with itself gives the same chord diagram with one additional closed internal component, so can be denoted by 3.3_{1}. Hence, we can work in the complete set of ndiagrams and their compositions, and keep the record of the internal closed components by adding subscripts. The complete set of ndiagrams with the operation of ntangle composition is the noncommutative monoid  a noncommutative semigroup with the neutral element. The neutral element is the ndiagram with horizontal parallel chords (e.g., 3.4, 4.9). This set has (2n1)!! elements, where (2n1)!! is the odd factorial number (2n1)!!=1·3·¼(2n1). The number of ndiagrams is given by the sequence A001147 from the Encyclopedia of Integer Sequences by N. Sloane: 1,3,15,105,945,10395,¼ and can be easily computed from this general formula. For n=3 the minimal set of generators of the complete set of 3diagrams consists from three diagrams without connected adjacent vertices (e.g., the diagram 3.1, and two positions of the diagram 3.2). For n > 3 we start from the basic ndiagrams without connected adjacent vertices (e.g., the diagrams 4.14.7 for n=4, etc.) From this set we can choose different minimal sets of generators, each consisting from appropriately chosen positions of three different basic diagrams. For example, we can use the diagrams for n=4, or the diagrams for n=5. Lj. Radovic proved that for every n (n ³ 2) the minimal set of generators consists from three diagrams (Radovic, 2006). For n=2,3,4,5,6,7,8,9¼ the number of basic ndiagrams is 1,2,7,36,300,3218,42335,644808,¼, given by the sequence A007474 from the Encyclopedia of Integer Sequences by N. Sloane (BarNatan, 1995). The LinKnot function ListOfOneFactors (webMathematica ListOfOneFactors) written by T. Bertok and corrected by the authors gives, as the result, all basic ndiagrams without connected adjacent vertices. The function fMulTan (webMathematica fMulTan) multiplies ndiagrams, and the function fMulTanTab (webMathematica fMulTanTab) gives their multiplication table. The function fGenSet (webMathematica fGenSet) checks if a given set of diagrams is a generator set of the complete set of ndiagrams. If the elements of the complete set of 3diagrams are denoted by 115, the following multiplication table is obtained (subscripts denote internal closed components):
