Biteranta John Vincent - 2nd Year Bsit

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 29

MATH TREE GRAPH

THEORIES
Tree Diagram
• Tree diagrams can represent a series of independent events (such as a
series of coin flips) or conditional probabilities (such as drawing cards
from a deck without replacing the cards).[1] Each node on the diagram
represents an event and is associated with the probability of that event.
The root node represents the specific event and thus has probability 1.
Each set of sibling nodes represents an exclusive and exhaustive partition
of the parent event.
Tree diagram
Root
• The root node is the highest node in the tree structure, and has no parent.
This node is a global element and represents the entire message. It may
have one or more child nodes, but can never have sibling nodes or be
repeating. The name of the root node can be edited.
Root
Siblings
• Children of the same parent node are called siblings.
• Two nodes are said to be siblings if they are present at the same level, and
their parents are same.
Siblings
Leaf
• Nodes with no children are called leaf, or external nodes. Nodes which are
not leaf are called internal nodes. Nodes with the same parent are called
siblings.
• One of the spots upon a stem where buds and intercalary meristems occur,
usually marking the end of a season’s growth.
Leaf
Branch
• The tree elements are called “nodes”. The lines connecting elements are
called “branches”. Nodes without children are called leaf nodes, “end-
nodes”, or “leaves”. Every finite tree structure has a member that has no
superior.
• Whereas the branches represent relationships between those entities (e.g.,
ancestor-descendant relationships).
Branch
Internal Node
In a tree data structure, the node which has atleast one child is called as
Internal Node. An internal node is a node that has at least one child.
• Internal Nodes are nodes in a tree data structure that are not leaf nodes.
The root node is also said to be Internal Node if the tree has more than one
node. Internal nodes are also referred to as’Non-Terminal’ nodes.
Internal node
Degree
• The total number of children a node has is referred to as that node’s
degree in a tree data structure. The Degree of a node is, to put it simply,
the total number of children it has. The term “Degree of Tree” refers to a
node’s highest degree out of all the nodes in a tree.
Degree
Edge
• The connecting line between any two nodes in a tree data structure is
referred to as the edge. There can only be a maximum of ‘N-1’ edges in a
tree with ‘N’ nodes.
Edge
Path
• The series of Nodes and Edges that connect two Nodes in a tree data
structure is referred to as the PATH between those two Nodes. The total
number of nodes in a path is its length.
Path
Level
• In tree data structures, the root node is referred to as being at level 0, the
root node’s offspring are at level 1, and so on.
Level
Depth
The number of edges in a tree from the root node to a certain node is
referred to as the tree’s depth.
The “Depth of Tree” of a tree refers to the total number of edges along the
longest path from the root node to the leaf node.
• The root node’s depth in tree data structures is 0.
Depth
Forest
• A forest is an undirected graph in which any two vertices are connected by
at most one path. Equivalently, a forest is an undirected acyclic graph, all
of whose connected components are trees; in other words, the graph
consists of a disjoint union of trees.
Forest
Height of Tree
• Height. In a tree data structure, the number of edges from the leaf node to
the particular node in the longest path is known as the height of that node.
In the tree, the height of the root node is called “Height of Tree”. The tree
height of all leaf nodes is 0.
Height of the tree
Height of Node
• The length of the longest path from a node to a leaf node determines that
node’s height. As a result, the tree’s root node’s height would be its height.
The leaf nodes, meanwhile, are 0 in height. Let’s examine the tree below,
which displays the height of each node.
Height of node

You might also like