Ruler function

Last updated
A ruler, marked in centimeters (top), and inches (bottom). The rising and falling pattern of vertical lines on the inch scale resembles the ruler function. Measurement unit.jpg
A ruler, marked in centimeters (top), and inches (bottom). The rising and falling pattern of vertical lines on the inch scale resembles the ruler function.

In number theory, the ruler function of an integer can be either of two closely related functions. One of these functions counts the number of times can be evenly divided by two, which for the numbers 1, 2, 3, ... is

0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 4, ... (sequence A007814 in the OEIS).

Alternatively, the ruler function can be defined as the same numbers plus one, which for the numbers 1, 2, 3, ... produces the sequence

1, 2, 1, 3, 1, 2, 1, 4, 1, 2, 1, 3, 1, 2, 1, 5, ... (sequence A001511 in the OEIS).

As well as being related by adding one, these two sequences are related in a different way: the second one can be formed from the first one by removing all the zeros, and the first one can be formed from the second one by adding zeros at the start and between every pair of numbers. For either definition of the ruler function, the rising and falling patterns of the values of this function resemble the lengths of marks on rulers with traditional units such as inches. These functions should be distinguished from Thomae's function, a function on real numbers which behaves similarly to the ruler function when restricted to the dyadic rational numbers.

In advanced mathematics, the 0-based ruler function is the 2-adic valuation of the number, [1] and the lexicographically earliest infinite square-free word over the natural numbers. [2] It also gives the position of the bit that changes at each step of the Gray code. [3]

In the Tower of Hanoi puzzle, with the disks of the puzzle numbered in order by their size, the 1-based ruler function gives the number of the disk to move at each step in an optimal solution to the puzzle. [4] A simulation of the puzzle, in conjunction with other methods for generating its optimal sequence of moves, can be used in an algorithm for generating the sequence of values of the ruler function in constant time per value. [3]

Related Research Articles

The eight queens puzzle is the problem of placing eight chess queens on an 8×8 chessboard so that no two queens threaten each other; thus, a solution requires that no two queens share the same row, column, or diagonal. There are 92 solutions. The problem was first posed in the mid-19th century. In the modern era, it is often used as an example problem for various computer programming techniques.

<span class="mw-page-title-main">Sierpiński triangle</span> Fractal composed of triangles

The Sierpiński triangle, also called the Sierpiński gasket or Sierpiński sieve, is a fractal attractive fixed set with the overall shape of an equilateral triangle, subdivided recursively into smaller equilateral triangles. Originally constructed as a curve, this is one of the basic examples of self-similar sets—that is, it is a mathematically generated pattern that is reproducible at any magnification or reduction. It is named after the Polish mathematician Wacław Sierpiński, but appeared as a decorative pattern many centuries before the work of Sierpiński.

<span class="mw-page-title-main">Tower of Hanoi</span> Mathematical game or puzzle

The Tower of Hanoi is a mathematical game or puzzle consisting of three rods and a number of disks of various diameters, which can slide onto any rod. The puzzle begins with the disks stacked on one rod in order of decreasing size, the smallest at the top, thus approximating a conical shape. The objective of the puzzle is to move the entire stack to one of the other rods, obeying the following rules:

  1. Only one disk may be moved at a time.
  2. Each move consists of taking the upper disk from one of the stacks and placing it on top of another stack or on an empty rod.
  3. No disk may be placed on top of a disk that is smaller than it.

Graham's number is a large number that arose as an upper bound on the answer of a problem in the mathematical field of Ramsey theory. It is much larger than many other large numbers such as Skewes's number and Moser's number, both of which are in turn much larger than a googolplex. As with these, it is so large that the observable universe is far too small to contain an ordinary digital representation of Graham's number, assuming that each digit occupies one Planck volume, possibly the smallest measurable space. But even the number of digits in this digital representation of Graham's number would itself be a number so large that its digital representation cannot be represented in the observable universe. Nor even can the number of digits of that number—and so forth, for a number of times far exceeding the total number of Planck volumes in the observable universe. Thus Graham's number cannot be expressed even by physical universe-scale power towers of the form .

The On-Line Encyclopedia of Integer Sequences (OEIS) is an online database of integer sequences. It was created and maintained by Neil Sloane while researching at AT&T Labs. He transferred the intellectual property and hosting of the OEIS to the OEIS Foundation in 2009. Sloane is the chairman of the OEIS Foundation.

The Wedderburn–Etherington numbers are an integer sequence named for Ivor Malcolm Haddon Etherington and Joseph Wedderburn that can be used to count certain kinds of binary trees. The first few numbers in the sequence are

171 is the natural number following 170 and preceding 172.

God's algorithm is a notion originating in discussions of ways to solve the Rubik's Cube puzzle, but which can also be applied to other combinatorial puzzles and mathematical games. It refers to any algorithm which produces a solution having the fewest possible moves. The allusion to the deity is based on the notion that an omniscient being would know an optimal step from any given configuration.

<span class="mw-page-title-main">Prime gap</span> Difference between two successive prime numbers

A prime gap is the difference between two successive prime numbers. The n-th prime gap, denoted gn or g(pn) is the difference between the (n + 1)-st and the n-th prime numbers, i.e.

5 (five) is a number, numeral and digit. It is the natural number, and cardinal number, following 4 and preceding 6, and is a prime number. It has garnered attention throughout history in part because distal extremities in humans typically contain five digits.

<span class="mw-page-title-main">Ordered Bell number</span> Number of weak orderings

In number theory and enumerative combinatorics, the ordered Bell numbers or Fubini numbers count the number of weak orderings on a set of elements. Weak orderings arrange their elements into a sequence allowing ties, such as might arise as the outcome of a horse race). Starting from , these numbers are

<span class="mw-page-title-main">Double exponential function</span> Exponential function of an exponential function

A double exponential function is a constant raised to the power of an exponential function. The general formula is (where a>1 and b>1), which grows much more quickly than an exponential function. For example, if a = b = 10:

<span class="mw-page-title-main">Domino tiling</span> Geometric construct

In geometry, a domino tiling of a region in the Euclidean plane is a tessellation of the region by dominoes, shapes formed by the union of two unit squares meeting edge-to-edge. Equivalently, it is a perfect matching in the grid graph formed by placing a vertex at the center of each square of the region and connecting two vertices when they correspond to adjacent squares.

<span class="mw-page-title-main">Power of three</span> Three raised to an integer power

In mathematics, a power of three is a number of the form 3n where n is an integer, that is, the result of exponentiation with number three as the base and integer n as the exponent.

<span class="mw-page-title-main">Telephone number (mathematics)</span> Number of ways to pair up n objects

In mathematics, the telephone numbers or the involution numbers form a sequence of integers that count the ways n people can be connected by person-to-person telephone calls. These numbers also describe the number of matchings of a complete graph on n vertices, the number of permutations on n elements that are involutions, the sum of absolute values of coefficients of the Hermite polynomials, the number of standard Young tableaux with n cells, and the sum of the degrees of the irreducible representations of the symmetric group. Involution numbers were first studied in 1800 by Heinrich August Rothe, who gave a recurrence equation by which they may be calculated, giving the values

<span class="mw-page-title-main">Firoozbakht's conjecture</span>

In number theory, Firoozbakht's conjecture is a conjecture about the distribution of prime numbers. It is named after the Iranian mathematician Farideh Firoozbakht who stated it first in 1982.

<span class="mw-page-title-main">Magnetic Tower of Hanoi</span> Variation of the classical Tower of Hanoi puzzle

The Magnetic Tower of Hanoi (MToH) puzzle is a variation of the classical Tower of Hanoi puzzle (ToH), where each disk has two distinct sides, for example, with different colors "red" and "blue". The rules of the MToH puzzle are the same as the rules of the original puzzle, with the added constraints that each disk is flipped as it is moved, and that two disks may not be placed one on another if their touching sides have the same color. Each disk has a North and South pole, with similar poles repelling one another and opposite poles attracting one another. Magnets inside each disk physically prevent illegal moves.

In combinatorial mathematics and statistics, the Fuss–Catalan numbers are numbers of the form

<span class="mw-page-title-main">Hanoi graph</span> Pattern of states and moves in the Tower of Hanoi puzzle

In graph theory and recreational mathematics, the Hanoi graphs are undirected graphs whose vertices represent the possible states of the Tower of Hanoi puzzle, and whose edges represent allowable moves between pairs of states.

In mathematics, a Stanley sequence is an integer sequence generated by a greedy algorithm that chooses the sequence members to avoid arithmetic progressions. If is a finite set of non-negative integers on which no three elements form an arithmetic progression, then the Stanley sequence generated from starts from the elements of , in sorted order, and then repeatedly chooses each successive element of the sequence to be a number that is larger than the already-chosen numbers and does not form any three-term arithmetic progression with them. These sequences are named after Richard P. Stanley.

References

  1. Erickson, Alejandro; Isgur, Abraham; Jackson, Bradley W.; Ruskey, Frank; Tanny, Stephen M. (January 2012). "Nested Recurrence Relations with Conolly-like Solutions". SIAM Journal on Discrete Mathematics. 26 (1): 206–238. arXiv: 1509.02613 . Bibcode:2015arXiv150902613E. doi:10.1137/100795425. ISSN   0895-4801. S2CID   8116882.
  2. Guay-Paquet, Mathieu; Shallit, Jeffrey (November 2009). "Avoiding squares and overlaps over the natural numbers". Discrete Mathematics. 309 (21): 6245–6254. arXiv: 0901.1397 . doi: 10.1016/j.disc.2009.06.004 . S2CID   8646044.
  3. 1 2 Herter, Felix; Rote, Günter (November 2018). "Loopless Gray code enumeration and the Tower of Bucharest". Theoretical Computer Science. 748: 40–54. arXiv: 1604.06707 . Bibcode:2016arXiv160406707H. doi:10.1016/j.tcs.2017.11.017. S2CID   4014870.
  4. Hinz, Andreas M.; Klavžar, Sandi; Milutinović, Uroš; Petr, Ciril (2013). The Tower of Hanoi – Myths and Maths. Basel: Springer Basel. pp. 60–61. doi:10.1007/978-3-0348-0237-6. ISBN   978-3-0348-0236-9.