Interval Tree and Its Application in Integer Factorization

The paper first puts forward a way to study odd integers by placing the odd integers in a given interval on a perfect full binary tree, then makes an investigation on the odd integers by means of combining the original properties of the integers with the properties of the binary trees and obtains several new results on how an odd integer’s divisors distribute on a level of a binary tree. The newly discovered law of divisors’ distribution that includes common divisors between two symmetric nodes, genetic divisors between an ancestor node and its descendant node can provide a new and simple approach to factorize odd composite integers. Based on the mathematical deductions, numerical experiments are designed and demonstrated in the Maple software. All the results of the experiments are conformance to expectation and validate the validity of the approach.


Introduction
In 2016, WANG X in article (WANG X, 2016(IJSIMR)) put forward an approach that studies integer by putting odd integers bigger than 1 on a full perfect binary tree from the top to the bottom and from the left to right.This approach then derived out many previously-unknown properties of the odd integers, such as properties of symmetric nodes and symmetric common divisors, properties of subtrees' duplication and transition, and properties of sum by level, root division and the genetic traits, as introduced in WANG's articles (WANG X, 2017(JM), 2017(GJPAM),2019(IJAPM)).It has known that, these new properties could be helpful in solving the problem of integer factorization, as probed in FU's paper (FU D,2017(JCE)),WANG's paper (WABG X, 2017(JCE)) and LI's paper (LI J., 2018(AJCM)), and they also would be helpful for knowing of the RSA modulus, as investigated in papers (WANG X, 2018(JMR), WANG X. 2018(IJMSS)).
In applying the T 3 tree to speed-up the computation of integers in a definite big interval, another tree-approach was found to be usful in understanding more properties of odd integers.This paper introduces the new approach and its traits in factoring odd composite integers.

Preliminaries
This section introduces symbols, definitions and lemmas that are necessary in later sections.

Symbols and Notations
Throughout this paper, an odd sequence is defined to be a sequence of odd numbers, e.g., 13,15,19,23,31. An odd interval [a,b] is a set of consecutive odd numbers that take a as their lower bound and b as their upper bound.For example, [3,11] = {3, 5, 7, 9, 11}.Two odd intervals, I 1 and I 2 , are said to have intersection and denoted by I 1 ∩ I 2 ∅ if they contain some common items.For example, [3, 11] ∩ [7, 19] ∅.Symbol ⌊x⌋ is to express x's floor function defined by x − 1 < ⌊x⌋ ≤ x, where x is a real number.The terms binary tree and its root, nodes, father, left-son, right-son as well as subtrees can be seen in school-books of data structure, for example, Dinesh's handbook [?].This paper mainly concerns the perfect full binary tree that has 2 n+1 − 1 nodes with depth n ≥ 0. Symbol N (k, j) is to denote the node at position j on level k of a tree T, where k ≥ 0 and 0 ≤ j ≤ 2 k − 1.On the same level k, two nodes N (k, j) and N (k,2 k −1− j) are called co-symmetric nodes because they station at the geometric symmetric positions.Symbol T (k, j) is to denote the subtree whose root is N (k, j) .Symbol

Lemmas
Lemma 1(See in WANG X, 2016(IJSIMR)) Let p be a positive odd integer; then among p consecutive positive odd integers there exists one and only one that can be divisible by p.Let q be a positive odd number, S = {a i |i ∈ Z + } be a set that is composed of consecutive odd numbers; then S needs at least (n − 1)q + 1 elements to have n multiples of q; if a α ∈ S is a multiple of q, then so it is with a α+q .

Binary Tree Method
Let K ≥ 0 be an integer, u = 2 K+1 − 1 and a 1 , a 2 , ..., a u be 2 K+1 − 1 consecutive positive odd integers; construct a full perfect binary tree T [a 1 ,a u ] with 2 K+1 − 1 nodes by following way 1.The middle item a 2 K is set to the root 2. The item a 2 K−1 , the middle item of the 2 K − 1 items left to a 2 K , is set to the left son of N (0,0) ; the item a 2 K +2 K−1 , the middle item of the 2 K − 1 items right to a 2 K , is set to the right son of N (0,0) .3. Recursively take each son's left son and right son by the above middle item rule to finish constructing the whole tree For example, with a 1 = 13, a 2 = 15, ..., a 14 = 39 and a 15 = 41, setting K = 3, T [13,41] is constructed as figure 1.
Figure 1.Interval tree constructed from odd interval [13,41] For convenience, the tree constructed above is called an odd interval tree or simply an interval tree.An interval tree can be denoted with an abstract symbol T I , or an interval symbol T [x,y] for the case the interval [x, y] is given or a root symbol T N (0,0) for the case that N (0,0) is the root of the tree.The nonnegative integer K is the depth of the tree.A tree of depth K = 0 means it contains merely 1 node, the root.The left and the right subtrees of T I are respectively denoted by T Il and T Ir .On level l with l ≥ 0 there are 2 l nodes each of which can be a root of a subtree.Subtree T (l,s) is said left to subtree T (l,t) if s < t.

Main Results
Proposition 1 (Maximum Depth of Interval Tree) Let T I be an odd interval tree constructed from odd interval [a 1 , a u ] with a 1 > 0; if N (0,0) is the root of T I , then T I contains at most 2 ⌊log2N(0,0)⌋+1 − 1 nodes.In another word, the maximum depth K max of T I is limited to Proof.[Proof of Proposition 1] Among all the positive integers, there are , which leads to ] be an odd interval and T [a 1 ,a u ] be the interval tree constructed from I; then the odd interval I = [a 1 , a u ] can be restored by applying the in-order traversal on Proof.[Proof of Proposition 2] Referring to the definition of the in-order traversal of a binary tree, as seen in [?], and comparing it with the middle item rule to construct the tree T [a 1 ,a u ] , it immediately knows that the proposition holds.
Proposition 3 Let K ≥ 0 , u = 2 K+1 − 1 be an integer, I = [a 1 , a u ] be an odd interval and N (0,0) be the root of the odd interval tree T I that is constructed from I; then the items that satisfy x ∈ I and x < N (0,0) lie in T Il whereas the items that satisfy x ∈ I and x > N (0,0) lie in T Ir .Among a father and its two sons, the left son is the smallest, the father is the average of the two sons and the right son is the biggest.Consequently, for a node G and its two sons, S l and S r , if n ll is a node in the left subtree of S l and n lr is a node in the right subtree of S l , it holds n ll < S l < G and S l < n lr < G; whereas, if n rl is a node in the left subtree of S r and n rr is a node in the right subtree of S r , it holds G < n rl < S r and G < S r < n rr .
Proof.[Proof of Proposition 3] The stated relationships are actually from the construction of the interval tree.
Proof.[Proof of Proposition 4] By Proposition 2, an odd interval is equivalent to its odd interval tree.
By the rule of the construction, first considering the leftmost node on each level of T [a 1 ,a u ] , it holds Now consider the nodes on the same level and take level i as a general case.Note that, on level i there are 2 i nodes distributed uniformly in terms of their indices.Since , which means the difference of the indices between two adjacent nodes is Corollary 1 (Node in In-order Traversal Restoration) Let T I be an N (0,0) -rooted odd interval tree with depth K ≥ 0, and [a 1 , a u ] be its in-order traversal restoration; then Proof.[Proof of Corollary 1] By Theorem 1, it yields Referring to (1), it knows Since N (0,0) = a 2 K , it is sure that there are Corollary 2 (Root Form vs Bottom Form).Let T I be an N (0,0) -rooted odd interval tree with depth K ≥ 1 .If N (0,0) is of the form 4k + 1, then all the nodes from level 0 to level K − 1 are of the form 4k + 1, whereas every node on level K is of the form 4k − 1.If N (0,0) is of the form 4k − 1, then all the nodes from level 0 to level K − 1 are of the form 4k − 1, whereas every node on level K is of the form 4k + 1.
Corollary 3 (Subtraction of Two Nodes) Let N (i,ω) and N ( j,ϑ) be two nodes of an odd interval tree with depth K ≥ 0; then Particularly, Proof.[Proof of Corollary 3] Direct calculations immediately lead to the results.
Corollary 4 (Multiples on One Level) Let T I be an N (0,0) -rooted odd interval tree with depth K ≥ 0; if N (0,0) ≥ 2 K+2 − 3 then on the same level of an interval tree there is not a node that is a multiple of another one.
Proof.[Proof of Corollary 4] Referring to Theorem 1, taking the smallest and the biggest nodes on level i yields Obviously, when N (0,0) ≥ 2 K+2 − 3 it holds N (0,0) > 2 K+2 − 4 and N (i,2 i −1) − 3N (i,0) < 0. That is to say, there is not a node 3 times bigger than the smallest node on the same level and thus it is natural that there is not a node that is a multiple of another one because all the nodes are odd integers.
Corollary 5 (Subtraction of Two Trees) Let T M and T N be two odd interval trees of the same depth; then yields where M (i,ω) and N (i,ω) are nodes at position ω on level i of T M and T N respectively.
Proof.[Proof of Corollary 5] Assume K ≥ 0 is the depth of the two trees; then by Theorem 1 Corollary 6 (Symmetric Common Divisors).Let N (0,0) be the root of an interval tree T I ; then its two symmetric nodes,N (i,ω) and , and thus validates the theorem By the Euclid division theorem.
Corollary 7 (Sum Property) Let N (0,0) be the root of an interval tree T I of depth K ≥ 0 ; then Proof.[Proof of Corollary 7] (Omitted) Corollary 8 (Sum Subtraction of Subtrees).Let T Il and T Ir be respectively the left and right subtrees of an interval tree Proof.[Proof of Corollary 8] By Corollary 7, it yields Corollary 9 (Divisors of Root).Let N (0,0) be the root of an interval tree T I and N (0,0) = pα with p > 1 and α ≥ 1 being positive odd integers; then for arbitrary node N (i,ω) of T I , Proof.[Proof of Corollary 9] By Theorem 1, Theorem 2 (Multiples of Root) Let p be a positive odd integer, σ = ⌊ log 2 p ⌋ + 1 and N (0,0) = p be the root of an interval tree T I with depth K ≥ σ; then (1) On level upper than σ, there is not a multiple node of p except N (0,0) itself.
(2) On level σ there are exactly two multiples of p, and there are at least 2 p's multiples on each level after level σ.
Likewise, direct calculation yields This and Lemma 1 as well as the symmetric property show N (χ,l−αp) and N (χ,r+αp) are p's multiples.

Conclusions
Both theoretic deductions and experiments show that, the odd interval tree is another new approach in knowing the integers.The properties discovered in this paper can surely provide a new way to demonstrates the genetic traits of the odd integers and a practical way in exploring solution of factoring of integers.In the end, reader can see that, the approach provided and tested with Maple software can be improved a lot, especially in parallel computing.Hope more followers can show more profitable results.
∑ T means the sum of all node of T. Symbol x ∈ T means number x is a node of T. Symbol A ⊗ B means A holds and B simultaneously holds; symbol A ⊕ B means A or B holds.Symbol (a = b) > c means a takes the value of b and a > c.Symbol A ⇒ B means conclusion B can be derived from condition A, and symbol A ⇔ B means A is equivalent to B. Symbol Z + means the set of positive integers.