ITS 116 DATA STRUCTURES

TTH 4:00-:530 p.m. ITS 116 DATA STRUCTURES Teacher: Francis Rey Bracamonte

E-PYLON





DATA processing (tree structure)

How data is being process in tree structure? Maybe you have question with this kind of topic, let us limit our data to be store in 5, all this data is organized into a tree - like structure. The structure allows repeating information using parent/child relationships: each parent can have many children but each child can only have one parent (of course).
We use Binary tree to be a structure of this five data, a Binary tree has two children every node or no child at all each of its node may have an empty node waiting a data to be store. We are using now “full tree structure” which every height of the rightmost and leftmost node is the exactly the same, we are only limited to 5 data’s to be store and there will be two nodes that are null or empty.

HOW DATA IS BEING STORED into its STRUCTURE…..
1. First: the “DATA 1” which we specify as a data will be stored at the first node or the root node because it is the first data in its structure.
2. Second: “DATA2” will be stored under “DATA 1” which is called child node, the first child of the root.
3. Third: “DATA3” will be stored on the 2nd child of the root node. (Note: “all first three nodes are having a data that being stored”)
4. Fourth: “DATA4” will be stored at the 1st child of child of the root node which is become the parent node. (Note: “child node can have only become parent node if and only if it has a child node”)
5. Fifth: the last data to be store which is “DATA5” is going to be store at 1st child of the 2nd child of the root node and which also parent nodes become.

These nodes may contain a value or condition or represent a separate data structure of its own.
All nodes that is found in the bottommost part of a tree is called a leaf node because they have no children, since they are a leaf node there is a possibility that this node will be null or empty. This all five data use to represent us being linked to each other by means of linked – nodes. These nodes may contain a value or condition or represent a separate data structure of its own.


Deleting a whole section of a tree is called pruning.

Pruning is carried out as a step by step process. In general, it is performed as

1. Remove the interior node in the tree, a non-leaf node.
2. Evaluate the performance without the pruned part.
3. Repeat until no improvement is obtained from pruning
4. Retain the best performed tree as the decision tree.


When a decision process is related to the selection of a flower, then the branch with the shape is irrelevant and not related to the flower branch. Hence that particular branch can be pruned to improve performance.

0 comments: