CONSTRUCTING RED-BLACK TREE SHAPES

2002 ◽  
Vol 13 (06) ◽  
pp. 837-863 ◽  
Author(s):  
ANDREA MANTLER ◽  
HELEN CAMERON

Cormen et al. describe efficient algorithms for inserting nodes into and deleting nodes from red-black trees. If some binary trees satisfying the definition of red-black trees cannot be built by these algorithms, then theoretical analyses of red-black trees that consider all binary trees satisfying the definition of red-black trees may not accurately describe the behavior of red-black trees in practice. We show that any binary tree shape that satisfies the definition of red-black trees can be built using only the insertion algorithm, RB-INSERT, of Cormen et al. We first describe an algorithm, RB-SHAPE, which, given any red-black tree T, will construct an insertion sequence for T. When the constructed sequence of insertions is performed on the empty tree using RB-INSERT, the result is a red-black tree with the same shape as T. We then prove the correctness of algorithm RB-SHAPE.

10.37236/2028 ◽  
2012 ◽  
Vol 18 (2) ◽  
Author(s):  
Maria Madonia ◽  
Giuseppe Scollo

This paper addresses the problem of characterizing classes of pairs of binary trees of equal size for which a signed reassociation sequence, in the Eliahou-Kryuchkov sense, can be shown to exist, either with a size induction hypothesis (reducible pairs), or without it (solvable pairs). A few concepts proposed by Cooper, Rowland and Zeilberger, in the context of a language-theoretic approach to the problem, are here reformulated in terms of signed reassociation sequences, and some of their results are recasted and proven in this framework. A few strategies, tactics and combinations thereof for signed reassociation are introduced, which prove useful to extend the results obtained by the aforementioned authors to new classes of binary tree pairs. In particular, with reference to path trees, i.e. binary trees that have a leaf at every level, we show the reducibility of pairs where (at least) one of the two path trees has a triplication at the first turn below the top level, and we characterize a class of weakly mutually crooked path tree pairs that are neither reducible nor solvable by any previously known result, but prove solvable by appropriate reassociation strategies. This class also includes a subclass of mutually crooked path tree pairs. A summary evaluation of the achieved results, followed by an outline of open questions and future research directions conclude the paper.


1991 ◽  
Vol 34 (1) ◽  
pp. 23-30 ◽  
Author(s):  
Peter Arpin ◽  
John Ginsburg

AbstractA partially ordered set P is said to have the n-cutset property if for every element x of P, there is a subset S of P all of whose elements are noncomparable to x, with |S| ≤ n, and such that every maximal chain in P meets {x} ∪ S. It is known that if P has the n-cutset property then P has at most 2n maximal elements. Here we are concerned with the extremal case. We let Max P denote the set of maximal elements of P. We establish the following result. THEOREM: Let n be a positive integer. Suppose P has the n-cutset property and that |Max P| = 2n. Then P contains a complete binary tree T of height n with Max T = Max P and such that C ∩ T is a maximal chain in T for every maximal chain C of P. Two examples are given to show that this result does not extend to the case when n is infinite. However the following is shown. THEOREM: Suppose that P has the ω-cutset property and that |Max P| = 2ω. If P — Max P is countable then P contains a complete binary tree of height ω


2008 ◽  
Vol 190 (9) ◽  
pp. 3306-3313 ◽  
Author(s):  
Dariusz Bartosik ◽  
Mateusz Putyrski ◽  
Lukasz Dziewit ◽  
Edyta Malewska ◽  
Michal Szymanik ◽  
...  

ABSTRACT We demonstrated that a single copy of insertion sequence ISPme1 can mobilize adjacent segments of genomic DNA of Paracoccus methylutens DM12, which leads to the generation of diverse transposable elements of various size and DNA contents. All elements (named transposable modules [TMos]) contain ISPme1 (placed at the 5′ ends of the elements) and have variable 3′-end regions of between 0.5 and 5 kb. ISPme1 was shown to encode an outwardly oriented promoter, which may activate the transcription of genes transposed within TMos in evolutionarily distinct hosts. TMos may therefore be considered to be natural systems enabling gene capture, expression, and spread. However, unless these elements have been inserted into a highly conserved genetic context to enable a precise definition of their termini, it is extremely difficult or even impossible to identify them in bacterial genomes by in silico sequence analysis. We showed that TMos are present in the chromosome and plasmids of strain DM12. Sequence analysis of plasmid pMTH1 (32 kb) revealed that four TMos, previously identified with a trap vector, pMEC1, comprise 87% of its genome. Repeated TMos within pMTH1 may stimulate other structural rearrangements resulting from homologous recombination between long repeat sequences. This illustrates that TMos may play a significant role in shaping the structure of natural plasmids, which consequently may have a great impact on the evolution of plasmid genomes.


1991 ◽  
Vol 22 (13) ◽  
pp. 1-9
Author(s):  
Yumi Fukushima ◽  
Yoshihide Igarashi

Author(s):  
Xingbo Wang ◽  
Jinfeng Luo ◽  
Ying Tian ◽  
Li Ma

This paper makes an investigation on geometric relationships among nodes of the valuated binary trees, including parallelism, connection and penetration. By defining central lines and distance from a node to a line, some intrinsic connections are discovered to connect nodes between different subtrees. It is proved that a node out of a subtree can penetrate into the subtree along a parallel connection. If the connection starts downward from a node that is a multiple of the subtree’s root, then all the nodes on the connection are multiples of the root. Accordingly composite odd integers on such connections can be easily factorized. The paper proves the new results with detail mathematical reasoning and demonstrates several numerical experiments made with Maple software to factorize rapidly a kind of big odd integers that are of the length from 59 to 99 decimal digits. It is once again shown that the valuated binary tree might be a key to unlock the lock of the integer factorization problem.


10.37236/2150 ◽  
2012 ◽  
Vol 19 (3) ◽  
Author(s):  
Mireille Bousquet-Mélou ◽  
Guillaume Chapuy

Consider a rooted binary tree with $n$ nodes. Assign with the root the abscissa 0, and with the left (resp. right) child of a node of abscissa $i$ the abscissa $i-1$ (resp. $i+1$). We prove that the number of binary trees of size $n$ having exactly $n_i$ nodes at abscissa $i$, for $l \leq i \leq r$ (with $n = \sum_i n_i$), is $$ \frac{n_0}{n_l n_r} {{n_{-1}+n_1} \choose {n_0-1}} \prod_{l\le i\le r \atop i\not = 0}{{n_{i-1}+n_{i+1}-1} \choose {n_i-1}}, $$ with $n_{l-1}=n_{r+1}=0$. The sequence $(n_l, \dots, n_{-1};n_0, \dots n_r)$ is called the vertical profile of the tree. The vertical profile of a uniform random tree of size $n$ is known to converge, in a certain sense and after normalization, to a random mesure called the integrated superbrownian excursion, which motivates our interest in the profile. We prove similar looking formulas for other families of trees whose nodes are embedded in $Z$. We also refine these formulas by taking into account the number of nodes at abscissa j whose parent lies at abscissa $i$, and/or the number of vertices at abscissa i having a prescribed number of children at abscissa $j$, for all $i$ and $j$. Our proofs are bijective.


Author(s):  
Willard Stanley

A parallelization of the Day-Stout-Warren algorithm for balancing binary trees. As its input, this algorithm takes an arbitrary binary tree and returns an equivalent tree which is balanced so as to preserve the θ(log(n)) lookup time for elements of the tree. The sequential Day-Stout-Warren algorithm has a linear runtime and uses constant space. This new parallelization of the Day-Stout-Warren algorithm attempts to do the same while providing a speedup which is as near as possible to linear to the number of processing elements. Also, ideally it should do so in an online fashion, without blocking new reads, inserts, and deletes.


2018 ◽  
Author(s):  
Andysah Putera Utama Siahaan

Compression aims to reduce data before storing or moving it into storage media. Huffman and Elias Delta Code are two algorithms used for the compression process in this research. Data compression with both algorithms is used to compress text files. These two algorithms have the same way of working. It starts by sorting characters based on their frequency, binary tree formation and ends with code formation. In the Huffman algorithm, binary trees are formed from leaves to roots and are called tree-forming from the bottom up. In contrast, the Elias Delta Code method has a different technique. Text file compression is done by reading the input string in a text file and encoding the string using both algorithms. The compression results state that the Huffman algorithm is better overall than Elias Delta Code.


2019 ◽  
Vol 11 (2) ◽  
pp. 103
Author(s):  
Xingbo WANG

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.


Sign in / Sign up

Export Citation Format

Share Document