This site is supported by donations to The OEIS Foundation.

User:Glen Whitney/IntegerComplexityTable

From OeisWiki
Jump to: navigation, search

See the introduction to integer complexity for a discussion of the information presented in this table. All notation used here is briefly summarized below the table. Please post any comments or suggested updates to the table on the discussion page.

Numbers and operators Operand complexity Operator complexity Expression complexity Smallest number with complexity , Largest number with complexity , Number of numbers with complexity ,
Constant 1 (A000012) A263283
Constant 1 (A000012) A319975 [expression]
Constant 1 (A000012) A056792 A056791 A052955 [operator] A131577 [operator] A000045
Constant 1 (A000012) A014701 = A056792 - 1 A056792 A052955 [expression] = A000079 [operator] A000045
A005245 A213923 A005520 A000792 A005421; cumulative sum is A048249
A091333; for which this differs from is A253177 A255641 A348083
Cumulative sum is A069765
for which this differs from is A348069 No known differences from A255641
A181898(n-2)
for which this differs from is A346742 No known differences from A255641
A348262 A213924
A025280 A005208 A217250 A003037
A091334 A347983
A099053 A060274
A348089
A329526 undefined undefined
A062537 [unary] A062860 [unary operator] A061396 [unary operator]
A306560
A323727
(for all ) A117607 undefined undefined
A117632 undefined undefined
A259466
A133344
A274061
A293771 *
A003313 A003064 [operator] A003065 [operator]
A128998
A230697
A173419 A141414(n+1)
A140361 = A173419 – 1 A141414

Summary of notations (see the introduction for more detail)

is an “alphabet” of numbers together with some unary and/or binary operators. For any such alphabet, there is a collection of certain finite sequences from , the RPN expressions, each of which determines a value. Then given a number , we can define the -operand complexity as the minimum number of numbers appearing in any RPN expression with value , and similarly the -operator complexity as the minimum number of operators, and the -expression complexity as the minimum total length of an RPN expression with value . As a variant of , the -unary operator complexity of $n$ is the minimum number of unary operator symbols in an RPN expression with value ; sequences relating to in are labeled with "[unary]" in the table above.

Since it’s most commonly used in the OEIS, just “complexity” of is taken to mean the operand complexity. So for example except where otherwise noted, the sequence in the column for smallest number with complexity n is . Similarly, the largest number with complexity is and the number of numbers of a given complexity is . Note that the number of numbers of complexity at most is the cumulative sum of this quantity, i.e. .

A dash (–) in an entry in the first three columns means that the value can be computed trivially from another one of the first three columns: either all of the operators in the alphabet of that row are binary, and hence the relations hold, or all of the operators are unary, in which case we have and .

A star (*) in a table entry indicates that the complexity formulation of the sequence is conjectural.

The division operator above denotes strict integer division: is defined only if . On the other hand, is “floor division”, , defined for all pairs of numbers. (The latter notation is borrowed from the Python programming language; note the C language uses just for floor division.)

Additional symbols from the table

the unary successor operator, i.e., it adds one to its argument.
the unary operation of multiplying by . Thanks to Kate Stange for pointing out the series with operators and .
the binary operation of ordinary exponentiation .
the binary operation of tetration, i.e., is the value of an exponential tower of `’s that is high.
the unary operation that gives the th prime on argument . Thanks to Jon Awbrey for pointing out the series related to alphabet . Note that one could alternatively use the alphabet and count only the operands and unary operators, with the proviso that the value of the empty expression is 1. Note that for these alphabets, the operand-minimal, operator-minimal, and expression-minimal RPN expressions are unique modulo (thanks to unique factorization), and hence one can recover all of the operand complexity, operator complexity, unary operator complexity, and expression complexity from any two of them. However, it is unclear at the moment whether there is another sequence currently in the OEIS which together with the unary operator complexity A062537 allows a brief formula for the other complexity measures for .
the unary multiple factorial of order , i.e., .
the unary operator that gives the th triangular number on argument .
unary “b-bit complementation,” i.e., .
binary concatenation of decimal representations, i.e., ; for example, .
binary concatenation of ones, i.e., the left operand must be and the right operand must be 1 and the result is .
a unary operator that enlarges the alphabet by adding as a new allowed numeric operand the number currently on the top of the stack, whereas
means that any number which has already appeared in the stack may be used as an operand (i.e., the operation is executed “for free” whenever a number is added to the stack).

Note that and are conceptually related to the duplication operator that adds a copy of the top of the stack to the stack. For example, it may be of interest to investigate the relationship of and for various sets of operators. Of course and are related to each other as well, so we might also expect for example a connection between and above, for example.

Additional sequences related to

The alphabet is by far the most studied within the OEIS in terms of the sequences included. We summarize other entries related to -complexity measures in this section, dropping the subscript for notational convenience.

The “span” of complexity .
The second smallest number of complexity , .
The complexity “height” of is defined as the minimum such that . A117618 gives the least number of complexity height .
This sequence gives the "depth complexity" of . There is a canonical way to generate a tree from an RPN expression, and the depth complexity of is the minimum height of the tree of an RPN expression with minimal ones and value . This notion is defined in more detail, and the depth complexity values given, in A210659. The smallest number with depth complexity equal to is given by A210660.
This sequence gives a variant operand complexity if every instance of must have one operand equal to 1 and must produce a prime result. The resulting sequence A061373 is of interest partly because for small , we frequently have , and the former is much easier to compute. Presumably, though, as grows the fraction of all for which goes to zero, although that bears checking. The smallest such that is A182061.

This article originally appeared on StudioInfinity and is reproduced and updated here by the author.