fbpx
Wikipedia

Iverson bracket

In mathematics, the Iverson bracket, named after Kenneth E. Iverson, is a notation that generalises the Kronecker delta, which is the Iverson bracket of the statement x = y. It maps any statement to a function of the free variables in that statement. This function is defined to take the value 1 for the values of the variables for which the statement is true, and takes the value 0 otherwise. It is generally denoted by putting the statement inside square brackets:

In other words, the Iverson bracket of a statement is the indicator function of the set of values for which the statement is true.

The Iverson bracket allows using capital-sigma notation without restriction on the summation index. That is, for any property of the integer , one can rewrite the restricted sum in the unrestricted form . With this convention, does not need to be defined for the values of k for which the Iverson bracket equals 0; that is, a summand must evaluate to 0 regardless of whether is defined.

The notation was originally introduced by Kenneth E. Iverson in his programming language APL,[1][2] though restricted to single relational operators enclosed in parentheses, while the generalisation to arbitrary statements, notational restriction to square brackets, and applications to summation, was advocated by Donald Knuth to avoid ambiguity in parenthesized logical expressions.[3]

Properties edit

There is a direct correspondence between arithmetic on Iverson brackets, logic, and set operations. For instance, let A and B be sets and   any property of integers; then we have

 

Examples edit

The notation allows moving boundary conditions of summations (or integrals) as a separate factor into the summand, freeing up space around the summation operator, but more importantly allowing it to be manipulated algebraically.

Double-counting rule edit

We mechanically derive a well-known sum manipulation rule using Iverson brackets:

 

Summation interchange edit

The well-known rule   is likewise easily derived:

 

Counting edit

For instance, Euler's totient function that counts the number of positive integers up to n which are coprime to n can be expressed by

 

Simplification of special cases edit

Another use of the Iverson bracket is to simplify equations with special cases. For example, the formula

 

is valid for n > 1 but is off by 1/2 for n = 1. To get an identity valid for all positive integers n (i.e., all values for which   is defined), a correction term involving the Iverson bracket may be added:

 

Common functions edit

Many common functions, especially those with a natural piecewise definition, may be expressed in terms of the Iverson bracket. The Kronecker delta notation is a specific case of Iverson notation when the condition is equality. That is,

 

The indicator function, often denoted  ,   or  , is an Iverson bracket with set membership as its condition:

 

The Heaviside step function, sign function,[1] and absolute value function are also easily expressed in this notation:

 

and

 

The comparison functions max and min (returning the larger or smaller of two arguments) may be written as

 
and
 

The floor and ceiling functions can be expressed as

 
and
 
where the index   of summation is understood to range over all the integers.

The ramp function can be expressed

 

The trichotomy of the reals is equivalent to the following identity:

 

The Möbius function has the property (and can be defined by recurrence as[4])

 

Formulation in terms of usual functions edit

In the 1830s, Guglielmo dalla Sommaja used the expression   to represent what now would be written  ; he also used variants, such as   for  .[3] Following one common convention, those quantities are equal where defined:   is 1 if x > 0, is 0 if x = 0, and is undefined otherwise.

Notational variations edit

In addition to the now-standard square brackets [ · ] , and the original parentheses ( · ) , blackboard bold brackets have also been used, e.g. ⟦ · ⟧ , as well as other unusual forms of bracketing marks available in the publisher's typeface, accompanied by a marginal note.

See also edit

References edit

  1. ^ a b Kenneth E. Iverson (1962). A Programming Language. Wiley. p. 11. Retrieved 7 April 2016.
  2. ^ Ronald Graham, Donald Knuth, and Oren Patashnik. Concrete Mathematics, Section 2.2: Sums and Recurrences.
  3. ^ a b Donald Knuth, "Two Notes on Notation", American Mathematical Monthly, Volume 99, Number 5, May 1992, pp. 403–422. (TeX, arXiv:math/9205211).
  4. ^ Ronald Graham, Donald Knuth, and Oren Patashnik. Concrete Mathematics, Section 4.9: Phi and Mu.

iverson, bracket, mathematics, named, after, kenneth, iverson, notation, that, generalises, kronecker, delta, which, statement, maps, statement, function, free, variables, that, statement, this, function, defined, take, value, values, variables, which, stateme. In mathematics the Iverson bracket named after Kenneth E Iverson is a notation that generalises the Kronecker delta which is the Iverson bracket of the statement x y It maps any statement to a function of the free variables in that statement This function is defined to take the value 1 for the values of the variables for which the statement is true and takes the value 0 otherwise It is generally denoted by putting the statement inside square brackets P 1if P is true 0otherwise displaystyle P begin cases 1 amp text if P text is true 0 amp text otherwise end cases In other words the Iverson bracket of a statement is the indicator function of the set of values for which the statement is true The Iverson bracket allows using capital sigma notation without restriction on the summation index That is for any property P k displaystyle P k of the integer k displaystyle k one can rewrite the restricted sum k P k f k displaystyle sum k P k f k in the unrestricted form kf k P k displaystyle sum k f k cdot P k With this convention f k displaystyle f k does not need to be defined for the values of k for which the Iverson bracket equals 0 that is a summand f k false displaystyle f k textbf false must evaluate to 0 regardless of whether f k displaystyle f k is defined The notation was originally introduced by Kenneth E Iverson in his programming language APL 1 2 though restricted to single relational operators enclosed in parentheses while the generalisation to arbitrary statements notational restriction to square brackets and applications to summation was advocated by Donald Knuth to avoid ambiguity in parenthesized logical expressions 3 Contents 1 Properties 2 Examples 2 1 Double counting rule 2 2 Summation interchange 2 3 Counting 2 4 Simplification of special cases 2 5 Common functions 3 Formulation in terms of usual functions 4 Notational variations 5 See also 6 ReferencesProperties editThere is a direct correspondence between arithmetic on Iverson brackets logic and set operations For instance let A and B be sets and P k1 displaystyle P k 1 dots nbsp any property of integers then we have P Q P Q P Q P Q P Q P 1 P P XOR Q P Q k A k B k A B k A B x A B x A x B m P k m m P k m m P k m min 1 m P k m 1 m P k m m P k m m P k m displaystyle begin aligned P land Q amp P Q 1em P lor Q amp P Q P Q 1em neg P amp 1 P 1em P scriptstyle mathsf text XOR Q amp Bigl P Q Bigr 1em k in A k in B amp k in A cup B k in A cap B 1em x in A cap B amp x in A x in B 1em forall m P k m amp prod m P k m 1em exists m P k m amp min Bigl 1 sum m P k m Bigr 1 prod m neg P k m 1em Bigl m Big P k m Bigr amp sum m P k m end aligned nbsp Examples editThe notation allows moving boundary conditions of summations or integrals as a separate factor into the summand freeing up space around the summation operator but more importantly allowing it to be manipulated algebraically Double counting rule edit We mechanically derive a well known sum manipulation rule using Iverson brackets k Af k k Bf k kf k k A kf k k B kf k k A k B kf k k A B k A B k A Bf k k A Bf k displaystyle begin aligned sum k in A f k sum k in B f k amp sum k f k k in A sum k f k k in B amp sum k f k k in A k in B amp sum k f k k in A cup B k in A cap B amp sum k in A cup B f k sum k in A cap B f k end aligned nbsp Summation interchange edit The well known rule j 1n k 1jf j k k 1n j knf j k textstyle sum j 1 n sum k 1 j f j k sum k 1 n sum j k n f j k nbsp is likewise easily derived j 1n k 1jf j k j kf j k 1 j n 1 k j j kf j k 1 k j n j kf j k 1 k n k j n k 1n j knf j k displaystyle begin aligned sum j 1 n sum k 1 j f j k amp sum j k f j k 1 leq j leq n 1 leq k leq j amp sum j k f j k 1 leq k leq j leq n amp sum j k f j k 1 leq k leq n k leq j leq n amp sum k 1 n sum j k n f j k end aligned nbsp Counting edit For instance Euler s totient function that counts the number of positive integers up to n which are coprime to n can be expressed byf n i 1n gcd i n 1 for n N displaystyle varphi n sum i 1 n gcd i n 1 qquad text for n in mathbb N nbsp Simplification of special cases edit Another use of the Iverson bracket is to simplify equations with special cases For example the formula 1 k ngcd k n 1k 12nf n displaystyle sum 1 leq k leq n atop gcd k n 1 k frac 1 2 n varphi n nbsp is valid for n gt 1 but is off by 1 2 for n 1 To get an identity valid for all positive integers n i e all values for which ϕ n displaystyle phi n nbsp is defined a correction term involving the Iverson bracket may be added 1 k ngcd k n 1k 12n f n n 1 displaystyle sum 1 leq k leq n atop gcd k n 1 k frac 1 2 n Big varphi n n 1 Big nbsp Common functions edit Many common functions especially those with a natural piecewise definition may be expressed in terms of the Iverson bracket The Kronecker delta notation is a specific case of Iverson notation when the condition is equality That is dij i j displaystyle delta ij i j nbsp The indicator function often denoted 1A x displaystyle mathbf 1 A x nbsp IA x displaystyle mathbf I A x nbsp or xA x displaystyle chi A x nbsp is an Iverson bracket with set membership as its condition IA x x A displaystyle mathbf I A x x in A nbsp The Heaviside step function sign function 1 and absolute value function are also easily expressed in this notation H x x gt 0 sgn x x gt 0 x lt 0 displaystyle begin aligned H x amp x gt 0 operatorname sgn x amp x gt 0 x lt 0 end aligned nbsp and x x x gt 0 x x lt 0 x x gt 0 x lt 0 x sgn x displaystyle begin aligned x amp x x gt 0 x x lt 0 amp x x gt 0 x lt 0 amp x cdot operatorname sgn x end aligned nbsp The comparison functions max and min returning the larger or smaller of two arguments may be written asmax x y x x gt y y x y displaystyle max x y x x gt y y x leq y nbsp and min x y x x y y x gt y displaystyle min x y x x leq y y x gt y nbsp The floor and ceiling functions can be expressed as x nn n x lt n 1 displaystyle lfloor x rfloor sum n n cdot n leq x lt n 1 nbsp and x nn n 1 lt x n displaystyle lceil x rceil sum n n cdot n 1 lt x leq n nbsp where the index n displaystyle n nbsp of summation is understood to range over all the integers The ramp function can be expressedR x x x 0 displaystyle R x x cdot x geq 0 nbsp The trichotomy of the reals is equivalent to the following identity a lt b a b a gt b 1 displaystyle a lt b a b a gt b 1 nbsp The Mobius function has the property and can be defined by recurrence as 4 d nm d n 1 displaystyle sum d n mu d n 1 nbsp Formulation in terms of usual functions editIn the 1830s Guglielmo dalla Sommaja used the expression 00x displaystyle 0 0 x nbsp to represent what now would be written x gt 0 displaystyle x gt 0 nbsp he also used variants such as 1 00 x 1 00x a displaystyle left 1 0 0 x right left 1 0 0 x a right nbsp for 0 x a displaystyle 0 leq x leq a nbsp 3 Following one common convention those quantities are equal where defined 00x displaystyle 0 0 x nbsp is 1 if x gt 0 is 0 if x 0 and is undefined otherwise Notational variations editIn addition to the now standard square brackets and the original parentheses blackboard bold brackets have also been used e g as well as other unusual forms of bracketing marks available in the publisher s typeface accompanied by a marginal note See also editBoolean function Type conversion in computer programming many languages allow numeric or pointer quantities to be used as boolean quantities Indicator functionReferences edit a b Kenneth E Iverson 1962 A Programming Language Wiley p 11 Retrieved 7 April 2016 Ronald Graham Donald Knuth and Oren Patashnik Concrete Mathematics Section 2 2 Sums and Recurrences a b Donald Knuth Two Notes on Notation American Mathematical Monthly Volume 99 Number 5 May 1992 pp 403 422 TeX arXiv math 9205211 Ronald Graham Donald Knuth and Oren Patashnik Concrete Mathematics Section 4 9 Phi and Mu Retrieved from https en wikipedia org w index php title Iverson bracket amp oldid 1217430639, wikipedia, wiki, book, books, library,

article

, read, download, free, free download, mp3, video, mp4, 3gp, jpg, jpeg, gif, png, picture, music, song, movie, book, game, games.