data structures - Why are Binary Trees Important? -


Why do we study binary trees in particular? As is not given in the form of the importance of binary trees in the drafts structure textbooks in the General M-Search Tree.

Is the use of binary trees more than M-trees?

Binary trees are the simplest forms of multi-dimensional trees, so they become easier to study in that sense.

There are nodes in multi-vey trees, which include N key and N + 1 points:

  | + ----- + ----- + ----- + ----- + | KF | K 01 02 | K03 | + ----- + ----- + ----- + ----- + / | | | \ P00 p01 p00 p03 p04  

To find out which indicators follow in the search, you compare the key that you are searching against the key in the node. The above example is an order -2 multi-way tree (I define the order n as the 2n key and 2n + 1 pointers I am doing) .

When you make this structure "the slim node", you end with a key and two pointers, your classical binary tree:

  | + ----- + | KF | When I went to university (and I freely acknowledge that it was sometime ago), we studied the binary tree <++++++ \ / p00 p01  

Em> first , because the algorithms were elegant. Search was a simple comparison node and select one of two sub-trees. Combination and extinction was also relatively easy.

Then we went to the Balanced binary tree, where the search was exactly the same, but the insertion and removal was a bit more complicated, in which 'the sub-tree through the rotating sub-tree Where it is necessary to keep it balanced through roots.

After this, after the correct node after acquiring the concept of searching within your node once non-balanced multi-route trees, in the end, the balanced multi-path tree which is the basic form Were similar to binary trees, but with the same complexity of sequential discovery, combination and spitting of the insert or extinction and nodes inside the node.

In each of those steps, you add a little more complexity to the algorithm. I feel that many people who are troubled with this progress do not remember, so perhaps you mention all the textbooks at the starter level.

I have never found multi-route trees to be more useful than binary. Tree except a very specific situation happens when you are reading the nodes of the tree at a slow speed of the disk. And you have optimized for area / cluster / block sizes.

We developed a multi-tree tree implementation under OS / 2, here my age is), which was similar to the size of the underlying disk blocks by ensuring the nodes. Although it can be in some vain place, the speed improvement is worth it.

For in-store items, binary trees have all the advantages of multi-modes, of which none of the additional complications sequential search of a node with sub-tree selection).

Binary Tree "Should We Move Left or Right?" To boil, multilevel "Where are the keys in this node so that we can choose sub-trees?"


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

php - Multiple Select with Explode: only returns the word "Array" -

php - jQuery AJAX Post not working -