Radical initiator

From formulasearchengine
Revision as of 16:44, 20 January 2014 by en>Smokefoot (mention ATRP, reference March which discusses this area extensively)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

In mathematics a pairing function is a process to uniquely encode two natural numbers into a single natural number.

Any pairing function can be used in set theory to prove that integers and rational numbers have the same cardinality as natural numbers. In theoretical computer science they are used to encode a function defined on a vector of natural numbers f:NkN into a new function g:NN.

Definition

A pairing function is a primitive recursive bijection

π:×.

Cantor pairing function

The Cantor pairing function assigns one natural number to each pair of natural numbers

The Cantor pairing function is a pairing function

π:×

defined by

π(k1,k2):=12(k1+k2)(k1+k2+1)+k2.

When we apply the pairing function to k1 and k2 we often denote the resulting number as k1,k2.

This definition can be inductively generalized to the Cantor tuple function

π(n):n

as

π(n)(k1,,kn1,kn):=π(π(n1)(k1,,kn1),kn).

Inverting the Cantor pairing function

Suppose we are given z with

z=x,y=(x+y)(x+y+1)2+y

and we want to find x and y. It is helpful to define some intermediate values in the calculation:

w=x+y
t=w(w+1)2=w2+w2
z=t+y

where t is the triangle number of w. If we solve the quadratic equation

w2+w2t=0

for w as a function of t, we get

w=8t+112

which is a strictly increasing and continuous function when t is non-negative real. Since

tz=t+y<t+(w+1)=(w+1)2+(w+1)2

we get that

w8z+112<w+1

and thus

w=8z+112.

where is the floor function. So to calculate x and y from z, we do:

w=8z+112
t=w2+w2
y=zt
x=wy.

Since the Cantor pairing function is invertible, it must be one-to-one and onto.

References

  • 22 year-old Systems Analyst Rave from Merrickville-Wolford, has lots of hobbies and interests including quick cars, property developers in singapore and baking. Always loves visiting spots like Historic Monuments Zone of Querétaro.

    Here is my web site - cottagehillchurch.com