Re: node deletion in B.S.T



On Sun, 11 May 2008 02:18:55 -0700, sophia wrote:

Dear all,

is node deletion in BST commutative?,commutative in the sense, deletion
of a node x and then y leave the tree same as that of deleting y first
and then x?

Why would you want to know ?
As long as the resulting trees still represent the right ordering af,
they can be _considered_ equal.

(re-)Balancing is another aspect, which may need to be taken care of.
Do you consider the trees before and after balancing the same ?

Please first give your definition of "same tree"

AvK


.



Relevant Pages

  • Re: node deletion in B.S.T
    ... If by "the tree the same" you mean having the same shape and linkage ... then the answer depends upon how you implement the deletion. ... happens when you delete a node that has both left and right childre is ... X has only one non-null child: put the child in X's place ...
    (comp.programming)
  • Re: proper deletion algorithm for Patricia trie
    ... some node further down the tree must have an up pointer to it. ... Patricia tree afterwards. ... node which has more than one link pointing up the tree to it, ... effectively makes deletion impossible to implement in a sane fashion. ...
    (comp.theory)
  • Re: Composite hash table/linked list
    ... > table combined with a balanced or self-adjusting tree. ... insertion makes it more than tolerable, ... frequent that deletion. ... searching provided by the hash table. ...
    (comp.theory)
  • Re: node deletion in B.S.T
    ... is node deletion in BST commutative?,commutative in the sense, ... If by "the tree the same" you mean having the same shape and ... node by its immediate successor. ...
    (comp.programming)
  • Re: looking for name for data structure
    ... except that it supports insertion and deletion in the middle ... and it also handles contiguous ranges of identical ... tree), except that I don't have a concise, accurate name for it. ... then putting "tree" in the name exposes an implementation detail ...
    (comp.programming)

Loading