Snippets (math and computing): Difference between revisions

From Gnomon Chronicles
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
Things to use or delete. See [[Snippets]].
Things to use or delete. See [[Snippets]].
== Casting out nines ==
The expression "[[Casting out nines (nonfiction)|casting out nines]]" may refer to any one of three arithmetical procedures:
* Adding the decimal digits of a positive whole number, while optionally ignoring any 9s or digits which sum to a multiple of 9. The result of this procedure is a number which is smaller than the original whenever the original has more than one digit, leaves the same remainder as the original after division by nine, and may be obtained from the original by subtracting a multiple of 9 from it. The name of the procedure derives from this latter property.
* Repeated application of this procedure to the results obtained from previous applications until a single-digit number is obtained. This single-digit number is called the "digital root" of the original. If a number is divisible by 9, its digital root is 9. Otherwise, its digital root is the remainder it leaves after being divided by 9.
* A [[Sanity test (nonfiction)|sanity test]] in which the above-mentioned procedures are used to check for errors in arithmetical calculations. The test is carried out by applying the same sequence of arithmetical operations to the digital roots of the operands as are applied to the operands themselves. If no mistakes are made in the calculations, the digital roots of the two resultants should be the same. If they are different, therefore, one or more mistakes must have been made in the calculations.


== The Bottle Imp ==
== The Bottle Imp ==

Revision as of 09:29, 1 March 2019

Things to use or delete. See Snippets.

Casting out nines

The expression "casting out nines" may refer to any one of three arithmetical procedures:

  • Adding the decimal digits of a positive whole number, while optionally ignoring any 9s or digits which sum to a multiple of 9. The result of this procedure is a number which is smaller than the original whenever the original has more than one digit, leaves the same remainder as the original after division by nine, and may be obtained from the original by subtracting a multiple of 9 from it. The name of the procedure derives from this latter property.
  • Repeated application of this procedure to the results obtained from previous applications until a single-digit number is obtained. This single-digit number is called the "digital root" of the original. If a number is divisible by 9, its digital root is 9. Otherwise, its digital root is the remainder it leaves after being divided by 9.
  • A sanity test in which the above-mentioned procedures are used to check for errors in arithmetical calculations. The test is carried out by applying the same sequence of arithmetical operations to the digital roots of the operands as are applied to the operands themselves. If no mistakes are made in the calculations, the digital roots of the two resultants should be the same. If they are different, therefore, one or more mistakes must have been made in the calculations.

The Bottle Imp

https://boingboing.net/2019/02/07/the-paradox-of-the-bottle-imp.html

Particle systems

Rogue AI written in Plankalkül

"Somewhere out there is a rogue AI written in Plankalkül."

-- User FGD135 @ Boing Boing comments in response to "Trump signs ‘American AI Initiative’ executive order to prioritize federal funding for artificial intelligence research".

Baby-step giant-step

In group theory, the baby-step giant-step is a meet-in-the-middle algorithm for computing the discrete logarithm. The discrete log problem is of fundamental importance to the area of public key cryptography. Many of the most commonly used cryptography systems are based on the assumption that the discrete log is extremely difficult to compute; the more difficult it is, the more security it provides a data transfer. One way to increase the difficulty of the discrete log problem is to base the cryptosystem on a larger group.

https://en.wikipedia.org/wiki/Baby-step_giant-step

Nontransitive dice

A set of dice is nontransitive if it contains three dice, A, B, and C, with the property that A rolls higher than B more than half the time, and B rolls higher than C more than half the time, but it is not true that A rolls higher than C more than half the time. In other words, a set of dice is nontransitive if the binary relation – X rolls a higher number than Y more than half the time – on its elements is not transitive.

It is possible to find sets of dice with the even stronger property that, for each dice in the set, there is another die that rolls a higher number than it more than half the time. Using such a set of dice, one can invent games which are biased in ways that people unused to nontransitive dice might not expect.

Efron's dice are a set of four nontransitive dice invented by Bradley Efron.

https://en.wikipedia.org/wiki/Nontransitive_dice

Three-gap theorem

In mathematics, the three-gap theorem, three-distance theorem, or Steinhaus conjecture states that if one places n points on a circle, at angles of θ, 2θ, 3θ ... from the starting point, then there will be at most three distinct distances between pairs of points in adjacent positions around the circle. When there are three distances, the largest of the three always equals the sum of the other two. Unless θ is a rational multiple of π, there will also be at least two distinct distances.

This result was conjectured by Hugo Steinhaus, and proved in the 1950s by Vera T. Sós, János Surányi (hu), and Stanisław Świerczkowski. Its applications include the study of plant growth and musical tuning systems, and the theory of Sturmian words.

Lonely runner conjecture

Siemion Fajtlowicz

A mathematical conjecture is more than a formula. Usually, it is also an expression of personal opinion concerning the significance, nontriviality, and correctness of this formula. When the act of "making a conjecture" is attributed to a machine, the author of the program should be expected to clearly explain how the program, as opposed to the users, reached these conclusions.

https://www.math.uh.edu/~siemion/postscript.pdf

https://en.wikipedia.org/wiki/Siemion_Fajtlowicz

Versine

The versine or versed sine is a trigonometric function already appearing in some of the earliest trigonometric tables. The versine of an angle equals 1 minus its cosine.

There are several related functions, most notably the coversine and haversine. The latter, half a versine, is of particular importance in the haversine formula of navigation.

https://en.wikipedia.org/wiki/Versine

See also:

  • Trigonometric identities
  • Exsecant and excosecant
  • Versiera (Witch of Agnesi)
  • Exponential minus 1
  • Natural logarithm plus 1

Graph coloring game

The graph coloring game is a mathematical game related to graph theory. Coloring game problems arose as game-theoretic versions of well-known graph coloring problems. In a coloring game, two players use a given set of colors to construct a coloring of a graph, following specific rules depending on the game we consider. One player tries to successfully complete the coloring of the graph, when the other one tries to prevent him from achieving it.

https://en.wikipedia.org/wiki/Graph_coloring_game

Lotka–Volterra equations

The Lotka–Volterra equations, also known as the predator–prey equations, are a pair of first-order nonlinear differential equations, frequently used to describe the dynamics of biological systems in which two species interact, one as a predator and the other as prey. The populations change through time according to the pair of equations.

https://en.wikipedia.org/wiki/Lotka%E2%80%93Volterra_equations

Klee–Minty cube

The Klee–Minty cube or Klee–Minty polytope (named after Victor Klee and George J. Minty (de)) is a unit hypercube of variable dimension whose corners have been perturbed. Klee and Minty demonstrated that George Dantzig's simplex algorithm has poor worst-case performance when initialized at one corner of their "squashed cube".

https://en.wikipedia.org/wiki/Klee%E2%80%93Minty_cube

Browser machine learning

http://www.infoworld.com/article/3212884/machine-learning/machine-learning-comes-to-your-browser-via-javascript.html

https://tenso.rs/

http://www.infoworld.com/article/3216464/machine-learning/googles-deeplearnjs-brings-machine-learning-to-the-browser.html

Divergent series

Les séries divergentes sont en général quelque chose de bien fatal et c’est une honte qu’on ose y fonder aucune démonstration. ("Divergent series are in general something fatal, and it is a disgrace to base any proof on them." Often translated as "Divergent series are an invention of the devil …") N. H. Abel, letter to Holmboe, January 1826, reprinted in volume 2 of his collected papers.

https://en.wikipedia.org/wiki/Divergent_series

Fuzzing

Fuzzing or fuzz testing is an automated software testing technique that involves providing invalid, unexpected, or random data as inputs to a computer program.

https://en.wikipedia.org/wiki/Fuzzing

Sturmian word

In mathematics, a Sturmian word (Sturmian sequence or billiard sequence), named after Jacques Charles François Sturm, is a certain kind of infinitely long sequence of characters. Such a sequence can be generated by considering a game of English billiards on a square table. The struck ball will successively hit the vertical and horizontal edges labelled 0 and 1 generating a sequence of letters. This sequence is a Sturmian word.

Bathtub curve

The bathtub curve is widely used in reliability engineering. It describes a particular form of the hazard function which comprises three parts:

  • The first part is a decreasing failure rate, known as early failures.
  • The second part is a constant failure rate, known as random failures.
  • The third part is an increasing failure rate, known as wear-out failures.

The name is derived from the cross-sectional shape of a bathtub: steep sides and a flat bottom.

https://en.wikipedia.org/wiki/Bathtub_curve

Slack variable

Slack variable: In an optimization problem, a slack variable is a variable that is added to an inequality constraint to transform it into an equality. Introducing a slack variable replaces an inequality constraint with an equality constraint and a non-negativity constraint on the slack variable.

Impossible Puzzle

Sorting algorithms

"The Talk" (quantum computing)