- Learning how to build a tree
- Learning how to searh a tree
- Learning how to add nodes
- Learning how to delete a node
- Learning how to optimize the tree
- Learning how to add a node optimally
- Learning how to remove a node optimally (including root)
- Learning how to change the root node
Current Tree for these learning steps
graph TD;
20-->10;
20-->35;
10-->5;
10-->13;
5-->7;
This equation originally stumped me. Trying to figure out what it broke out to took a lot of research and a couple youtube videos
-
$p$ = Permutations -
$n_t$ = Total Number of Nodes -
$n$ = Nodes (Before I knew it was all nodes)
I eventually figured out that the equation above equals the one below.
Use the hight of the search tree
This equation I came up with on my own.. if it exists I havent really seen it anywhere
It is the sum of all the depths of the nodes devided by the total number of nodes + 1
-
$w$ = Weight -
$n_d$ = Node Depth -
$n_f$ = First Node -
$n_l$ = Last Node -
$n_t$ = Total Number of Nodes
I have calculated the depths of each of the nodes in order to start preparing for the calculation of weight.
I will next focus on being able to count all the nodes in the current tree.
You will use the node depth and the search frequency of the node to calculate the optimal weight