##
###
An Arithmetic for Rooted Trees * 1 Basic properties and notation

Fabrizio Luccio

2016
*
14 Leibniz International Proceedings in Informatics Schloss Dagstuhl-Leibniz-Zentrum für Informatik
*
unpublished

We propose a new arithmetic for non-empty rooted unordered trees simply called trees. After discussing tree representation and enumeration, we define the operations of tree addition, multiplication , and stretch, prove their properties, and show that all trees can be generated from a starting tree of one vertex. We then show how a given tree can be obtained as the sum or product of two trees, thus defining prime trees with respect to addition and multiplication. In both cases we show how
## more »

... we show how primality can be decided in time polynomial in the number of vertices and prove that factorization is unique. We then define negative trees and suggest dealing with tree equations, giving some preliminary examples. Finally we comment on how our arithmetic might be useful, and discuss preceding studies that have some relations with ours. The parts of this work that do not concur to an immediate illustration of our proposal, including formal proofs, are reported in the Appendix. To the best of our knowledge our proposal is completely new and can be largely modified in cooperation with the readers. To the ones of his age the author suggests that "many roads must be walked down before we call it a theory". We refer to rooted unordered trees simply called trees. Our trees are non empty. 1 denotes the tree containing exactly one vertex, and is the basic element of our theory. In a tree T , r (T) denotes the root of T ; x ∈ T denotes any of its vertices; n T and e T respectively denote the numbers of vertices and leaves. A subtree is the tree composed of a vertex x and all its descendants in T. The subtrees routed at the children of x are called subtrees of x. s T denotes the number of subtrees of r (T). A tree T can be represented as a binary sequences S T (the original reference for ordered trees is [11]). In our scheme T is traversed in left to right preorder inserting 1 in the sequence for each vertex encountered, and inserting 0 for each move backwards. Then S T is composed of 2n bits as shown in Figure 1, and has a balanced parenthesis recursive structure 1 S 1. .. S k 0 where the S i are the sequences representing the subtrees of r (T). The sequences for tree 1 is 10. Note that all the prefixes of S T have more 1's than 0's except for the whole sequence that has as many 1's as 0's. Since T is unordered, the order in which the subsequences S i appear in S T is immaterial (i.e., in general many different sequences represent T). However a canonical form for trees is *

fatcat:mvd4iqxafzci5f2spfhxzo7y44