Properties of Carry Value Transformation

The notion of Carry Value Transformation (CVT) is a model of Discrete Deterministic Dynamical System. In this paper, we have studied some interesting properties of CVT and proved that (1) the addition of any two non-negative integers is same as the sum of their CVT and XOR values. (2) While performing the repeated addition of CVT and XOR of two non-negative integers"a"and"b"(where a>= b), the number of iterations required to get either CVT=0 or XOR=0 is at most the length of"a"when both are expressed as binary strings. A similar process of addition of Modified Carry Value Transformation (MCVT) and XOR requires a maximum of two iterations for MCVT to be zero. (3) An equivalence relation is defined in the set (Z x Z) which divides the CV table into disjoint equivalence classes.


Introduction
The notion of transformation is very important in Mathematics. Accordingly, in literature, one finds many kinds of transformations with interesting properties. Carry Value Transformations (CVTs) and Modified Carry Value Transformations (MCVTs) are two challenging transformations which currently have assumed much significance because of its applications in fractal formation [1], designing new hardware circuits for arithmetic operations [2] etc. Similar kind of transformations such as Extreme Value Transformation (EVT) [3], 2-Variable Boolean Operation (2-VBO) [6], Integral Value Transformation (IVT) [7] are also applicable in pattern formations [3,6], solving Round Rabin Tournaments problem [5], Collatz like functions [7] etc. All these applications in diversified domain motivated us to study the mathematical properties of these kinds of transformations.
The hardware circuit for arithmetic operations as designed in [2] is based on a result that after finite number of iterations, either CVT of the two non-negative integers is equal to 0 or their XOR value is equal to 0. But no mathematical proof regarding this result was discussed in [2]. This important result has been proved in this paper. We have also found other interesting results of CVT and MCVT. Section 2 provides the basic concepts of CVT, MCVT and XOR earlier defined in [1,2]. In section 3, we have proved that addition of any two non-negative integers is same as addition of their CVT and their XOR values. This result is also shown to be true for any base of the number system. In section 4, we have proved that in a successive addition of CVT and XOR of any two nonnegative integers, the maximum number of iterations required to get either CVT=0 or XOR=0 is equal to the length of the bigger integer. Also in the same section we have proved that MCVT of any two non-negative integers = 0 requires a maximum of two iterations. In section 5, we have formed an equivalence relation using the concept of CVT and the equivalence classes obtained due to it.

Definitions of CVT and MCVT in binary number system
Let "a" and "b" be decimal representations of the binary strings That is to find out CVT, we perform the bit wise XOR operation of the operands to get a string of sum-bits (ignoring the carry-in) and simultaneously the bit wise ANDing of the operands to get a string of carry-bits, the latter string is padded with a '0' on the right is called the CVT of these operands as shown in fig 1.  It may be noted that in any number system, CVT is a mapping from Z Z × to Z where Z is set of non-negative integers.
From third column and seventh column, it can be verified that the total contribution of k a and k b in a+b is same as the sum of the contribution of k c and ,…,n. Therefore a +b=CVT (a, b) +( a b ⊕ ). Hence proved.    (CVT(a ,b), (a ⊕ b)) for all (a, b) ∈ Z Z × .

Convergence of CVT
Consider the iterative scheme   where B 2 = {0, 1}i.e. for any two bit n-bit numbers , CVT will be of at most (n+1) bits. In 2 nd iteration, we add this CVT with XOR obtained in 1 st iteration. Since CVT is of (n+1) bits so in 2 nd iteration, new CVT will be of at most (n+2) bits as per definition. In 3 rd iteration, CVT will be of at most (n+3) bits as per definition and so on. But it is not true which is clear from the next proof.
From equation (1) and (2), we get 2 n+ − which is absurd. Thus our assumption was wrong and hence all CVTs will be of at most (n+1) bits in every iteration. Same logic can be applied to XOR operation also, i.e. if we write CVT in place of XOR in above proof, we also get an absurd result for XOR. Therefore all XOR operations are of at most (n+1)bits in every iteration.

Lemma 2:
If there is a "0" in CVT at k th position(counted from left) in any iteration, then there must be one "0" in (k+1) th position in next iteration while forming the subsequent CVTs, but number of zeros in a CVT increases by at least one in each iteration.
Proof: Suppose a CVT contains 0 at k-th position in any iteration. In next iteration, this 0 will be added to either 0 or 1 of XOR obtained in the previous iteration. When we form CVT, (k+1) th position of CVT will be either 0 ∧ 1=0 or 0 ∧ 0=0. Thus we get a 0 in (k+1) th position of the newly formed CVT. Thus once a "0" appears in a CVT in any iteration, then a "0" appears in all subsequent CVT's in all subsequent iterations, but the position will be shifted by one in each iteration. By definition of CVT, one artificial zero is added to the rightmost position in each iteration. So number of zero increases by at least one in a CVT in each iteration.

Lemma 3: If a and b are of maximum n binary bits, then the number of iterations required to get CVT=0 is at most (n+1).
Proof: By Lemma:-1, all CVTs will be of at most (n+1) bits in all iterations. By Lemma:-2, once a "0" appears in a CVT in any iteration , then this zero will appear in all the subsequent CVT's in all subsequent iterations, but the position will be shifted by one in each iteration. Also the number of zero in CVT increases by at least one in each iteration, The (n+1) bits in CVT will be converted to (n+1) zeros in at most (n+1)-iterations.
Note: If a and b are of maximum n binary bits and Hamming distance between a and b is n , then CVT=0 in one iteration. Otherwise, if Hamming distance between two selected numbers is k for k < n, then number of iterations required to get CVT=0 is at most (k+2).
Lemma 4:If a and b are of maximum n binary bits and CVT=0 in (n+1) th iteration, then XOR=0 in n th iteration.
Proof: Let us assume that CVT=0 in the (n+1) th iteration and suppose XOR ≠ 0 in the n th iteration.
Then at least one bit of the XOR in n th iteration must be "1". In the k th iteration (where k=1 ,2 ,3,………or (n-1)), XOR bit must be 1 and the corresponding carry bit must be 1 which is impossible. So our assumption was wrong. Thus XOR=0 in the n th iteration. Hence proved.
Combining Lemma:-3 and Lemma:-4, we have proved the following theorem. x y ∈ Z Z × . Further, for any non-negative integers " 0 x " and " 0 y " (where 0 x ≥ 0 y ), the number of iterations required to get either CVT=0 or XOR=0 is at most the length of " 0 x " when expressed as a binary string.

Convergence of MCVT
The following lemma gives the number of iterations required for MCVT=0.  ) and (x ⊕ y) . We will show that MCVT (x, y)=0.
= (0, 0, 0, 0,…………………….,0 )=0. Hence proved. It can be easily verified that the relation R is reflexive, symmetric and transitive on the set A× A. Therefore R is an equivalence relation on A× A. We have calculated the number of iterations required for the set of ordered pair in A×A where A={0,1,2……..,31} and constructed table 5 using a two step procedure as follows.

An Equivalence Relation is defined using the notion of CVT
Step 1 Write all the integers 0, 1, 2, 3,………,31 in ascending order in both, uppermost row and leftmost column of the table.
Step2. Compute number of iterations required for any ordered pair (a, b) to get either CVT=0 or XOR=0 and store it in the position (a, b). From

Conclusion and Future Research Work
This paper provides some important properties of Carry Value Transformation (CVT) and Modified Carry Value Transformation (MCVT). We have proved that for any number system, the sum of any two non-negative integers is equal to the addition of their CVT and XOR values. We have also proved that in a successive addition of CVT and XOR of any two non-negative integers, the maximum number of iterations required to get either CVT=0 or XOR=0 is equal to the length of the bigger integer whereas the iterative process of the addition of MCVT and XOR requires exactly two steps for MCVT = 0. An equivalence relation is also defined in the set Z Z × which divides the CV table into disjoint equivalence classes.
In future we propose to study the following aspects 1. To investigate into the state transition diagrams (STDs) of different IVT. 2. To extend the domain of CVT from non-negative integers to real numbers and complex numbers. 3. To explore the behaviour of hybrid IVTs and their applications. 4. To explain the relationship of IVTs with Cellular Automata.