# A novel software implementation of set theoretic relations and operations.

Original Publication Date: 2002-Jan-30

Included in the Prior Art Database: 2003-Jun-21

## Publishing Venue

IBM

## Abstract

Introduction A novel software implementation of set theoretic relations and operations is presented. The novelty lies in assigning to each element in a finite set a unique prime number, calculating a set coefficient for the set, and using the set coefficient and the assigned prime numbers in arithmetic operations to implement set theoretic operations and relations on the set. The main advantage with the method is that the entire set is captured in an encoded form in a single number, the set coefficient. Let x 1 , x 2 , . . ., x n represent the n elements of a finite set A . This is usually stated as A x 1 , x 2 , . . ., x n }. It is assumed that no two elements in the set are identical. Therefore the cardinal number for the set A is n . The ordering of the elements inside the curly brackets has no significance. When we write s • S it means that the element s belongs to the set S .

**This text was extracted from a PDF file.**

**This is the abbreviated version, containing approximately 33% of the total text.**

__Page 1 of 4__**A novel software implementation of set theoretic relations and operations.**

Introduction

A novel software implementation of set theoretic relations and operations is presented. The novelty lies in assigning to each element in a finite set a unique prime number, calculating a set coefficient for the set, and using the set coefficient and the assigned prime numbers in arithmetic operations to implement set theoretic operations and relations on the set. The main advantage with the method is that the entire set is captured in an encoded form in a single number, the set coefficient.

Let *x*_{1}, *x*_{2 }, . . ., *x*_{n} represent the *n *elements of a finite set *A*. This is usually stated as *A* = {* x *_{1}, *x*_{2}, . .

., *x*_{n} }. It is assumed that no two elements in the set are identical. Therefore the cardinal number for the set *A* is *n* . The ordering of the elements inside the curly brackets has no significance. When we write *s** *S* it means that the element *s *belongs to the set *S*.

We now create an associated set *A' *of *A* such that *A'* = {* p*_{1}, *p*_{2 }, . . ., *p*_{n} } where *p*_{1}, *p* _{2}, . . ., *p*_{n} are *n* distinct prime numbers, and set up a one-to-one correspondence between the sets *A* and *A'* . For convenience, let the chosen correspondence be designated by the pairings (*x*_{i}, * p*_{i} ). Later, whenever necessary, we shall use the property that if there are two sets *A* and *B* such that their associated sets are identical, that is, *A'* = *B'* , then *A* = *B*.

The set coefficient, * C*_{A } , of a set * A* is the product of all the prime numbers contained in the associated set *A' *. That is, *C*_{A} = *p*_{1} ** p*_{2}* . . . ** p*_{n}. By this definition, if *x*_{i} is an element belonging to *A* (that is, *x*_{i} ** A*), then *C*_{A} will be divisible by *p*_{i} , that is, *C*_{A} / *p*_{i} will be the whole number *p*_{1} ** p*

2* . . . ** p*_{i}_{-1 }* *p*_{i}_{+1 }* . . . ** p*_{n} (that is, the remainder of *C*_{A} / *p*_{i }will be 0). Note that, by definition, the number 1 is not a prime number.

The empty set, denoted by * , is the set { } containing no elements, is assigned the set coefficient

1.

Two other things are needed to proceed further. They are:

1. The fundamental theorem of arithmetic, which says that *every whole number greater than 1 can be written as a product of prime numbers. Apart from the order in which these prime number factors are written down, there is only one such way to write each whole number as a product of prime numbers.*

2. The greatest common divisor of two whole numbers *x* and *y* , neither of which is zero, is the greatest number that is a divisor of both the numbers *x* and *y* . The greatest common divisor will be denoted by the function *gcd*(*x *, *y*).

Novel implementation of relations on sets

Equality of sets *A* = *B *. Two sets are equal if they contain exactly the same elements. In the

1

__Page 2 of 4__novel implementation, if *C*_{A} = *C*_{B}, then *A* = *B* . This follows from the fundamental theorem of arithmetic from which we conclude that the prime numbers which comprise *A'* are the same prime numbers which comprise the set *B'* . Note that the cardinal number for either set will auto...