Source author record

Mahdi Amani

Mahdi Amani appears in the imported research catalog. Authorship, coauthor and topic links are available while profile ownership is still unclaimed.

ResearcherUnclaimed source record

Catalog footprint

What is connected

2works
3topics
3close collaborators

Actions

Connect this record

Log in to claim

Research graph

See the researcher in context

Open full explorer

Inspect adjacent papers, topics, institutions and collaborators without losing the researcher page.

Building this map preview

BZPEER is loading the nearby papers, people, topics and institutions for this page.

Published work

2 published item(s)

preprint2016arXiv

Generation, Ranking and Unranking of Ordered Trees with Degree Bounds

We study the problem of generating, ranking and unranking of unlabeled ordered trees whose nodes have maximum degree of $Δ$. This class of trees represents a generalization of chemical trees. A chemical tree is an unlabeled tree in which no node has degree greater than 4. By allowing up to $Δ$ children for each node of chemical tree instead of 4, we will have a generalization of chemical trees. Here, we introduce a new encoding over an alphabet of size 4 for representing unlabeled ordered trees with maximum degree of $Δ$. We use this encoding for generating these trees in A-order with constant average time and O(n) worst case time. Due to the given encoding, with a precomputation of size and time O(n^2) (assuming $Δ$ is constant), both ranking and unranking algorithms are also designed taking O(n) and O(nlogn) time complexities.

preprint2015arXiv

Amortized Rotation Cost in AVL Trees

An AVL tree is the original type of balanced binary search tree. An insertion in an $n$-node AVL tree takes at most two rotations, but a deletion in an $n$-node AVL tree can take $Θ(\log n)$. A natural question is whether deletions can take many rotations not only in the worst case but in the amortized case as well. A sequence of $n$ successive deletions in an $n$-node tree takes $O(n)$ rotations, but what happens when insertions are intermixed with deletions? Heaupler, Sen, and Tarjan conjectured that alternating insertions and deletions in an $n$-node AVL tree can cause each deletion to do $Ω(\log n)$ rotations, but they provided no construction to justify their claim. We provide such a construction: we show that, for infinitely many $n$, there is a set $E$ of {\it expensive} $n$-node AVL trees with the property that, given any tree in $E$, deleting a certain leaf and then reinserting it produces a tree in $E$, with the deletion having done $Θ(\log n)$ rotations. One can do an arbitrary number of such expensive deletion-insertion pairs. The difficulty in obtaining such a construction is that in general the tree produced by an expensive deletion-insertion pair is not the original tree. Indeed, if the trees in $E$ have even height $k$, $2^{k/2}$ deletion-insertion pairs are required to reproduce the original tree.