This site is supported by donations to The OEIS Foundation.
Iverson bracket
From OeisWiki
(Redirected from Iverson notation)
The Iverson bracket, named after Kenneth E. Iverson, is a notation that denotes a number that is 1 if the condition in square brackets is satisfied, and 0 otherwise. More exactly,
P |
Uses
The notation is useful in expressing sums or integrals without boundary conditions. For example
-
∑ 1 ≤ i ≤ 10∑ i
i |
i |
Another use of the Iverson bracket is to simplify equations with special cases. For example, the formula
-
∑ 1 ≤ k ≤ n
(k, n) = 1
,n φ (n) 2
n > 1 |
-
∑ 1 ≤ k ≤ n
(k, n) = 1
,n (φ (n) + [n = 1] ) 2
n |
Special cases
The Kronecker delta notation is a specific case of Iverson notation when the condition is equality
-
δi j = [i = j ] .
IA (x) |
χA (x) |
A |
-
IA (x) = χA (x) = [x ∈ A] .
The sign function and Heaviside step function are also easily expressed in this notation
-
sgn (x) = [x > 0] − [x < 0] ,
-
H (x) = [x > 0] +
[x = 0] .1 2
And the trichotomy of the reals can be expressed
-
[a < b] + [a = b] + [a > b] = 1.
See also
Notes
- ↑ Ronald Graham, Donald Knuth, and Oren Patashnik. Concrete Mathematics, Section 2.2: Sums and Recurrences.
- ↑ Graham, Ronald L.; Knuth, Donald E.; Patashnik, Oren (1994). Concrete Mathematics (2nd ed.). Reading, MA: Addison-Wesley Publishing Company. pp. xiii+657. ISBN 0-201-55802-5 .
- ↑ Iverson, Kenneth E. (1962). A Programming Language. Wiley. ISBN 0-471-43014-5 .
- ↑ Graham, Knuth, and Patashnik (1994).
- ↑ To do: add an example of such a manipulation.
References
- Donald Knuth, “Two Notes on Notation,” American Mathematical Monthly, Volume 99, Number 5, May 1992, pp. 403–422. (TeX, arXiv:math/9205211)
- Kenneth E. Iverson, "A Programming Language", New York: Wiley, p. 11, 1962.