SOME REMARKS ON THE CANTOR PAIRING FUNCTION

Similar documents
An Elegant Pairing Function

On the Sequence A and Its Combinatorial Interpretations

Undecidability. Andreas Klappenecker. [based on slides by Prof. Welch]

Automaten und Formale Sprachen Automata and Formal Languages

Incompleteness Theorems, Large Cardinals, and Automata ov

CS 275 Automata and Formal Language Theory

An Optimal Lower Bound for Nonregular Languages

On the non-existence of maximal inference degrees for language identification

Handbook of Logic and Proof Techniques for Computer Science

CS 275 Automata and Formal Language Theory

DO FIVE OUT OF SIX ON EACH SET PROBLEM SET

258 Handbook of Discrete and Combinatorial Mathematics

Noncommutative Abel-like identities

Hilbert s problems, Gödel, and the limits of computation

Primitive recursive functions

α-recursion Theory and Ordinal Computability

CS 208: Automata Theory and Logic

Cantor and Infinite Sets

A Nonlinear Lower Bound on Linear Search Tree Programs for Solving Knapsack Problems*

#A9 INTEGERS 12 (2012) PRIMITIVE PRIME DIVISORS IN ZERO ORBITS OF POLYNOMIALS

Exercises for Unit VI (Infinite constructions in set theory)

PARTITIONS WITH FIXED DIFFERENCES BETWEEN LARGEST AND SMALLEST PARTS

MATH 3300 Test 1. Name: Student Id:

Mathematics Review for Business PhD Students Lecture Notes

Commutative Locative Quantifiers for Multiplicative Linear Logic

11 Three problems on the decidability and complexity of stability

Chapter 1 : The language of mathematics.

Definability in fields Lecture 1: Undecidabile arithmetic, decidable geometry

Axiomatic set theory. Chapter Why axiomatic set theory?

Cellular Automata. and beyond. The World of Simple Programs. Christian Jacob

06 Recursive Definition and Inductive Proof

Math 455 Some notes on Cardinality and Transfinite Induction

Cantor s 1874 Proof of Non- Denumerability - English Translation

Basic set-theoretic techniques in logic Part III, Transfinite recursion and induction

The Upper Bound Conjecture for Arrangements of Halfspaces

Combinatorial Interpretations of a Generalization of the Genocchi Numbers

Theory of Languages and Automata

The exact complexity of the infinite Post Correspondence Problem

A Super Introduction to Reverse Mathematics

COMBINATORIAL COUNTING

On linear morphisms of product spaces

Hilbert s problems, Gödel, and the limits of computation

On Cantor s Normal Form Theorem and Algebraic Number Theory

Propositional Logic, Predicates, and Equivalence

23.1 Gödel Numberings and Diagonalization

On NP-Completeness for Linear Machines

An Application of Catalan Numbers on Cayley Tree of Order 2: Single Polygon Counting

Pascal s Triangle, Normal Rational Curves, and their Invariant Subspaces

The Church-Turing Thesis and Relative Recursion

FREE STEINER LOOPS. Smile Markovski, Ana Sokolova Faculty of Sciences and Mathematics, Republic of Macedonia

On Rice s theorem. Hans Hüttel. October 2001

Obsevations, Truth and Logic

Packing polynomials on multidimensional integer sectors

The Parameterized Complexity of Intersection and Composition Operations on Sets of Finite-State Automata

Chapter-2 SETS In Mathematics, Set theory was developed by George Cantor ( ).

ECS 120 Lesson 18 Decidable Problems, the Halting Problem

Discrete Structures for Computer Science

A representation of context-free grammars with the help of finite digraphs

Acceptance of!-languages by Communicating Deterministic Turing Machines

Cellular Automata. ,C ) (t ) ,..., C i +[ K / 2] Cellular Automata. x > N : C x ! N. = C x. x < 1: C x. = C N+ x.

From Constructibility and Absoluteness to Computability and Domain Independence

Fast Reduction of Ternary Quadratic Forms

O1 History of Mathematics Lecture XII 19th-century rigour in real analysis, part 2: real numbers and sets. Monday 14th November 2016 (Week 6)

Pythagorean Triples and SAT Solving

CSCE 551: Chin-Tser Huang. University of South Carolina

F = k Z +F k T = k Z +T k. ν(x) :=0 (x N) By the successor function one means the function σ in T 1 defined as follows: σ(x) :=x +1 (x N)

THE LENGTH OF THE FULL HIERARCHY OF NORMS

Functions. Definition 1 Let A and B be sets. A relation between A and B is any subset of A B.

O1 History of Mathematics Lecture XII 19th-century rigour in real analysis, part 2: real numbers and sets. Monday 13th November 2017 (Week 6)

Blocking sets in chain geometries

Most Merry and Illustrated Proof of Cantor's Theorem on the Countability of Integers (Concise Version)

On Recognizable Languages of Infinite Pictures

Nonmonotone Inductive Definitions

A Primer on the Functional Equation

Ordinal Computability

A Geometric Proof that e is Irrational and a New Measure of its Irrationality

Noncommutative Abel-like identities

HAMBURGER BEITRÄGE ZUR MATHEMATIK

About the relationship between formal logic and complexity classes

Non-reactive strategies in decision-form games

Arithmetic and Incompleteness. Will Gunther. Goals. Coding with Naturals. Logic and Incompleteness. Will Gunther. February 6, 2013

Recap (1) 1. Automata, grammars and other formalisms can be considered as mechanical devices to solve mathematical problems

Formal Models in NLP

Exploring the infinite : an introduction to proof and analysis / Jennifer Brooks. Boca Raton [etc.], cop Spis treści

The Fixed String of Elementary Cellular Automata

Subsumption of concepts in FL 0 for (cyclic) terminologies with respect to descriptive semantics is PSPACE-complete.

Monadic Second Order Logic and Automata on Infinite Words: Büchi s Theorem

RON M. ROTH * GADIEL SEROUSSI **

König s Lemma and Kleene Tree

Recursive Function Theory and Computability

Chapter One. The Real Number System

Contents Propositional Logic: Proofs from Axioms and Inference Rules

The natural numbers. The natural numbers come with an addition +, a multiplication and an order < p < q, q < p, p = q.

Algebra II. A2.1.1 Recognize and graph various types of functions, including polynomial, rational, and algebraic functions.

Parallel Turing Machines on a Two-Dimensional Tape

Mathematical Structures Combinations and Permutations

MATH 310 Course Objectives

There are two main techniques for showing that problems are undecidable: diagonalization and reduction

Research Article New Partition Theoretic Interpretations of Rogers-Ramanujan Identities

Decidability of Existence and Construction of a Complement of a given function

Transcription:

SOME REMARKS ON THE CANTOR PAIRING FUNCTION 55 LE MATEMATICHE Vol. LXII (007) - Fasc. I, pp. 55-65 SOME REMARKS ON THE CANTOR PAIRING FUNCTION MERI LISI In this paper, some results and generalizations about the Cantor pairing function are given. In particular, it is investigated a very compact expression for the n-degree generalized Cantor pairing function (g.c.p.f., for short), that permits to obtain n tupling functions which have the characteristics to be n-degree polynomials with rational coefficients. A recursive formula for the n-degree g.c.p.f. is also provided. 1. Introduction. 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, pairing functions are used to encode a function defined on a vector of natural numbers f : N k N into a new function, [6], [9], [1], [13]. Definition 1.1. The function, : N N, such that (1) x 1, x = (x 1 + x ) + 3x 1 + x, (x 1, x ) N, is called the Cantor pairing function. Entrato in redazione il 8 Novembre 006.

56 MERI LISI The fundamental property of the Cantor pairing function is given by the following theorem. Theorem 1.1. N. The Cantor pairing function is a bijection from N onto Proof. In order to prove the theorem, consider the straight lines x 1 + x = k, with k N. It is clear that the point ( x 1, x ) belongs to x 1 +x = x 1 + x, or, more precisely, to the intersection of x 1 +x = x 1 + x with the first quadrant of the euclidean plane. Hence, for any ( x 1 + x ) fixed, moving along the line x 1 + x = k towards increasing ordinates (k = 0,..., x 1 + x ), let us list all the couples of natural numbers we meet and associate to each one of these an increasing natural number, starting from zero. Thanks to a simple (pascal) algorithm, we have a bijective correspondence between N and N. The variable output represents the natural number associated to (x 1, x ): program pairing var i, j, k, x 1, x, output: 0..maxint; begin output := 0 for k = 0to(x 1 + x ) do begin for (i = 0tok) and ( j = k to 0) do begin if (x 1 = i) and (x = j) then write (output); else begin i := i + 1; j := j 1; output := output + 1; end; end; k := k + 1; end. end. By using the previous algorithm, we can build Table 1, where we list the couples of natural numbers (x 1, x ). We stop at (3, 0).

SOME REMARKS ON THE CANTOR PAIRING FUNCTION 57 Remark 1.1. In what follows we shall use the following notation: N n (k) n indicates the number of n-tuples satisfying condition x i = k. For the pairing function, we have: () N (k) = k + 1. (x 1,x ) (0,0) (0,1) (1,0) (0,) (1,1) (,0) (0,3) (1,) (,1) (3,0) output 0 1 3 4 5 6 7 8 9 k 0 1 3 N (k) 1 3 4 Table 1 The Cantor pairing function is a second degree polynomial, with rational coefficients, [1], [], [3], [7]. Rudolph Fueter proposed in 193 four conjectures about the set of polynomial pairing functions, [11]. By composition, we can obtain tripling functions, quadrupling functions and so on. By using (1), a possible tripling function is given by,, : N 3 N, such that: (3) x 1, x, x 3 = x 1, x, x 3 = { x 1 + [(x + x 3 ) } + 3x + x 3 ] + 3x 1 + [(x + x 3 ) + 3x + x 3 ]. However, note that, listing the terns of natural numbers (x 1, x, x 3 ) in a way similar to that used for the pairing function (in this case, we consider the planes x 1 + x + x 3 = k, with k N), we are not able to identify a generalized rule of order. In fact, by means of an analogous algorithm, we can build Table (we stop at (, 0, 0)): (x 1,x,x 3 ) (0,0,0) (0,0,1) (1,0,0) (0,1,0) (1,0,1) (,0,0) (0,0,) (1,1,0) (,0,1) (3,0,0) output 0 1 3 4 5 6 7 8 9 Table Note also that the tripling function (3), obtained by means of a composition, is a fourth degree polynomial. Spontaneous questions arise:

58 MERI LISI is it possible to have tripling functions which are third degree polynomials, quadrupling functions which are fourth degree polynomials and so on? And moreover: does a generalized formula exist, that permits to obtain these polynomials in a simple way?. The n-degree generalized Cantor pairing function. Theorem.1. For any n N, the so-called n-tupling function,,..., : N n N, such that n { h 1 [( h ) ]} (4) x 1,..., x n = x i + j, (x 1,..., x n ) N n, is an n-degree polynomial, with rational coefficients. Moreover it is a one-to-one correspondence from N n onto N. Proof. We can prove the theorem by induction on the degree n. In order to do this, before studying the inductive case, we analyze some particular cases. Case n = 1 From definition (4), we have x 1 =x 1. In this case, is trivially a bijection from N to N. Case n = From definition (4), we have: { h 1 [( h ) ]} x 1, x = x i + j = x 1 + (x 1 + x )(x 1 + x + 1) = (x 1 + x ) + 3x 1 + x. This is the Cantor pairing function, we have just proved in Theorem 1.1 to be a bijection from N to N. Case n = 3 Let us build a bijection from N 3 to N, bydefining a way of ordering terns similar to that followed for couples of the pairing function, at the

SOME REMARKS ON THE CANTOR PAIRING FUNCTION 59 previous step: first organize terns of natural numbers (x 1, x, x 3 ) according to their plane of belongings 3 x i = k, with increasing k 0(k N). Then, for any plane, put the points in order as follows: (x 1, x, x 3 )<(y 1, y, y 3 ) if x 3 > y 3 or if x 3 = y 3 and < x 1, x > is smaller than < y 1, y >, where the way of organizing < x 1, x > is that defined for the pairing function < y 1, y >. This permits to build Table 3. We stop at (, 0, 0). (x 1,x,x 3 ) (0,0,0) (0,0,1) (0,1,0) (1,0,0) (0,0,) (0,1,1) (1,0,1) (0,,0) (1,1,0) (,0,0) <x 1,x,x 3 > 0 1 3 4 5 6 7 8 9 k 0 1 N 3 (k) 1 3 6 Note that Table 3 (5) N 3 (k) = k (h + 1) = 1! (k + j) indicates the number of terns satisfying (), we have: 3 x i = k. In particular, from k (6) N 3 (k) = N (h). 3 Hence, to identify a given z 3 = ( x 1, x, x 3 ), with x i = m ( x i, m N), we have to take into account all those points coming before it. 3 First, we have to consider all those points such that x i = g, for any x i, g N, with g < m. They are:

60 MERI LISI N 3 (l) = = l N (h) = 1! l (h + 1) (l + j) = 1 3! (m + j), where we used (5), (6) and relation (10) proved in Appendix. 3 Then, we have to consider all those terns satisfying x i = m but smaller than z 3. Since the rule of ordering the first two terms of (x 1, x, x 3 ) is that used for the Cantor pairing, we have that, starting from 0, the natural number associated to ( x 1, x, x 3 ) is: 1 3! [( 3 Since ) ] x i + j + 1! 1 [( ) ] x i + j + x 1 = ( x 1 + x + x 3 )( x 1 + x + x 3 + 1)( x 1 + x + x 3 + ) + 3! + ( x 1 + x )( x 1 + x + 1) + x 1! = ( x 1 + x + x 3 ) 3 + 3( x 1 + x + x 3 ) + ( x 1 + x + x 3 ) + 6 + ( x 1 + x ) + ( x 1 + x ) + x 1. (7) x 1, x, x 3 = 3 { 1 h 1 [( h ) ]} x i + j, we proved that the tripling function given by relation (7) represents a third degree polynomial with rational coefficients and it turns out to be a bijection from N 3 to N. Consider the inductive case: assume < x 1,...,x n > to be a bijection

SOME REMARKS ON THE CANTOR PAIRING FUNCTION 61 from N n to N, for any n 1 and that the n-tuples of natural numbers n satisfying x i = k are: (8) N n (k) = = k N (h) = k (k + j). Now, we want to prove that n+1 { h 1 [( h x 1,...,x n+1 = n (h + j) (n )! ) ]} x i + j is a polynomial of degree (n +1), with rational coefficients and a bijection from N n+1 to N. By using a rule of ordering the (n + 1) tuples similar to that followed for the n tupling function, we build a bijection from N n+1 to N. In particular, ordinate the (n + 1)-tuples of natural numbers according n+1 to relation = k, with increasing k 0, k N. Organize the x i points satisfying n+1 x i = k as follows: (x 1,..., x n+1 )<(y 1,..., y n+1 ) if x n+1 > y n+1 or if x n+1 = y n+1 and < x 1,..., x n > is smaller than < y 1,...,y n >. Hence: (9) N n+1 (k) = k N n (h) = k = 1 (k + j + 1) = 1 (h + j) n (k + j), where we used the inductive assumption (8) and relation (10) of Appendix. n+1 To identify z n+1 = ( x 1,..., x n+1 ), with x i = m, wehaveto

6 MERI LISI count all those (n +1) tuples of natural numbers, satisfying the condition n+1 x i = k, with k = 0,...,m 1: N n+1 (l) = l N n (h) = 1 n (l + j) = 1 (n + 1)! n (m + j), where we used (9) and relation (10) proved in Appendix. n+1 Then, we have to add all those (n + 1) tuples satisfying x i = k, but smaller than z n+1. However, since the rule of ordering the first n terms of (x 1,...x n+1 ) is that followed for the n-tupling function, we have that, starting to count from 0, the natural number associated to ( x 1,..., x n+1 ), x i N, is given by: Since 1 (n + 1)! n [( n+1 ) ] x i + j + n { 1 h 1 [( h n+1 { h 1 [( h x 1,..., x n+1 = ) ]} x i + j, ) ]} x i + j. we have that it represents a polynomial of degree (n + 1), with rational coefficients and which is a one-to-one correspondence from N n+1 onto N. The theorem is so proved. Remark.1. The Cantor pairing function is based on the idea of counting anti-diagonals x + y = k and then of counting within a given diagonal by increasing ordinates. This geometrical device has been generalized to Cantor n-tupling function which is a bijection from N n onto N. At first, we used the level k of the hyperplane H k of the equation x 1 + x +...+ x n = k and then the level h in the hyperplane H k, having in turn for equation x 1 +...+ x = h, and so and up to obtaining the line x 1 + x = constant. Hence, Cantor n-tupling function can also be expressed via binomial coefficients as follows, [4]: x 1,..., x n = ( x1 +... + x n + n 1 n ) + ( x1 +... + x + n n 1 )

SOME REMARKS ON THE CANTOR PAIRING FUNCTION 63 ( ) ( ) x1 + x +... + + 1 x1 +. 1 Finally, the Cantor pairing function can be considered a primitive recursive function, [5], [8], [10]. For the n-degree generalized Cantor pairing function (4) (indicated as,,..., n ) a possible recursive formula could be given by the following: n 0, if x i = 0 x 1, x,...,x n n = n. x i 1, 0,..., 0 n + x 1, x,..., x + 1, otherwise 3. Appendix. We can prove by induction on the index m, that, for any n, m 1: (10) k=0 (k + j) = 1 (m + j). In fact, if m = 1, relation (10) is verified because, if n : 1... (n 1) j = = 1... n = 1 ( j + 1). Assume condition (10) to be satisfied for m 1, for any n, i.e.: (11) k=0 k=0 (k + j) = 1 (m + j). Then, it is verified also for the index m + 1. In fact, if n : m (k + j) = (k + j) + (m + j). k=0 By using the inductive assumption (11), we get: (m + j) + (m + j) = (m + n) (m + j),

64 MERI LISI and so, for any n : m k=0 (k + j) = 1 (m + j + 1). Acknowledgments. The author would like to express her gratitude to Prof. A. Sorbi for his suggestions and to the referee who contributed to make the paper more readable. This work was partially supported by Par 004 - Research Project of the University of Siena funds as well as by G.M.F.M. and M.U.R.S.T. research funds. REFERENCES [1] G. Cantor, Contributions to the Founding of the Theory of Transfinite Numbers, Dover, New York, 1955 [] G. Cantor, Ein beitrag zur mannigfaltigkeitslehre, Journal für die reine und angewandte Mathematik, 84, (1878), pp. 4 58 [3] P. Cegielski - D. Richard, Decidability of the theory of the natural integers with the Cantor pairing function and the successor, Theor. Comput. Sci., 57, (001), pp. 51 77 [4] P. Cegielski - D. Richard, On arithmetical first-order theories allowing encoding and decoding of lists, Theor. Comput. Sci.,, (1999) pp. 55 75 [5] N. J. Cutland, Computability: An Introduction to Recursive Function Theory, Cambridge University Press, Cambridge, 1986 [6] M. D. Davis - R. Sigal - E. J. Wyuker, Computability, Complexity and Languages, Academic Press, Sudkamp, T. A., 1994 [7] R. Dedekind, The nature and meaning of numbers, in: R. Dedekind, Essays in the Theory of Numbers, Dover, New York, 1954 [8] J. E. Hopcroft - R. Motwani - J. D. Ullman, Introduction to Automata Theory, Languages, and Computation, Addison-Wesley, Boston, 001 [9] N. D. Jones, Computability and Complexity from a Programming Perspective, Foundations of Computing, MIT Press, Boston, 1997 [10] H. Rogers, Theory of Recursive Functions and Effective Computability, Cambridge, MA, MIT Press, 1987 [11] C. Smoryński, Logical Number Theory I - An Introduction Springer Verlag, Berlin, 1991

SOME REMARKS ON THE CANTOR PAIRING FUNCTION 65 [1] T. A. Sudkamp, Languages and Machines: An Introduction to the Theory of Computer Science, Addison-Wesley, Longman, 006 [13] S. Wolfram, A New Kind of Science, Wolfram Media, Chamaign, IL, 00 Dipartimento di Scienze Matematiche ed Informatiche Roberto Magari, Pian dei Mantellini 44, 53100 - Siena, Italy, email: lisi7@unisi.it