What is Discrete Math ?
"Discrete Math" is not the name of a branch of mathematics, like number theory, algebra, calculus, etc. Rather, it's a description of a set of branches of math that all have in common the feature that they are "discrete" rather than "continuous".
What is tree?
An undirected graph is a tree if and only if there is a unique simple path between any two of its vertices.
Every tree is a Graph, but every Graph is not a tree.
4. What is Discrete Math ?
"Discrete Math" is not the name of a branch of
mathematics, like number theory, algebra, calculus, etc.
Rather, it's a description of a set of branches of math
that all have in common the feature that they are
"discrete" rather than "continuous".
Discrete Math
What is tree?
An undirected graph is a tree if and only if there is a unique simple path
between any two of its vertices.
Every tree is a Graph, but every Graph is not a tree.
4
6. Basic of Tree
○ Node: A node is a fundamental part of a
tree. Each letter represents one node.
Node often represent entities(complex
objects) such as people,car parts etc.
○ Edge: The arrows from one node to
another are called edge. Edge betweer the
nodes represent the way the nodes are
related.
6
7. Basic of Tree
○ Root: The root of the tree is the only node
in the tree that has no incoming edges.
Here, a is the root.
7
○ Leaf Node: A leaf node is a node that has no children.The
bottom nodes (with no outgoing edges) are the leaves .
○ Here, c , i , j , k , l , m are leaves Node.
8. Basic of Tree
○ Depth: Depth tells the number of steps
(nodes) to get from a node back to the
root.
8
○ Height: The height of a tree is equal to the
maximum level of any node in the tree.
This tree has height 5, so the maximum
depth is 4 (height - 1).
9. Basic of Tree
Parent: Any node, except root has exactly
one edge running upward to another node.
The node above it is called parent.
a is the parent of b , c , d
b is the parent of e
d is the parent of f , g , h
e is the parent of i , j
f is the parent of k
h is the parent of l , m
9
10. Basic of Tree
Sibling:
10
b , c , d are siblings of each other
f , g , h are siblings of each other
i , j are siblings of each other
l , m are siblings of each other
11. Basic of Tree
Child: Any node may have one or more lines
running downward to other nodes. Nodes
below are children.
11
b , c , d are children of a
f , g , h are children of d
e is the children of b
i , j are the children of e
k is the children of f
l , m are the children of h
12. Basic of Tree
Sub-Tree: A sub-tree of a given node
includes one of its children and all of that
child's descendants.
12
13. Basic of Tree
m-ary tree : A rooted tree is called an m-ary
tree if every internal vertex has no more
than m children.
13
full m-ary tree :A tree is called
a full m-ary tree if every internal
vertex has exactly m children.
m-ary tree
full-ary tree