GT m3
GT m3
Hence there is one and only one path between every pair
of vertices in a tree, T.
Proof: Since tree (T) is a connected graph, there
exist at least one path between every pair of7
vertices in a tree (T). Now, suppose between two
vertices a and b of the tree (T) there exist two
paths. The union of these two paths will contain a
circuit and tree (T) cannot be a tree. Hence the
above statement is proved.
Prove that ,If in a graph G there is one 8
and only one path between every pair
of vertices, G is a tree.
Proof: There is the existence of a path between every pair
of vertices so we assume that graph G is connected. A
circuit in a graph implies that there is at least one pair of
vertices a and b, such that there are two distinct paths
between a and b. Since G has one and only one path
between every pair of vertices. G cannot have any circuit.
Hence graph G is a tree.
Prove that, A tree with n vertices has
n − 1 edges.
9
Proof: We will prove this by Mathematical Induction
Step1: Result is true for n = 1,2,3 as
Step 2:
Hence G is a tree.
PENDANT VERTICES IN A TREE 14
The center of a tree is the node or nodes that minimize the maximum
distance to any other node in the tree. In other words, it is the node or
nodes that are closest to the middle of the tree.
Distance in a Tree: 21
In a tree, the distance between two nodes is the number of
edges on the path connecting them.
For example, in the tree shown below, the distance between
nodes A and E is 2, while the distance between nodes B and C
is 1.
22
23
or two centers.
Identify eccentricity,Diameter,radius
30
of the following trees
31
vertices for n = 1, 2, 3, 4,
and 5.
Draw all trees of n 37
If k = 1, G is connected
How are these three numbers of a graph related?
Since every component of a graph must have at least one vertex, n
≥ k. Moreover, the number of edges in a component can be no less
than the number of vertices in that component minus one. Therefore,
e ≥ n − k.
Apart from the constraints n − k ≥ 0 and e − n + k ≥ 0, these three
numbers n, e, and k are independent, and they are fundamental
numbers in graphs.
From these three numbers are derived two other
important numbers called rank and nullity, defined as
58
rank r = n − k,
nullity μ = e − n + k.
WEIGHTED GRAPH
a spanning tree in a graph G is a minimal subgraph
connecting all the vertices of G.
If graph G is a weighted graph (i.e., if there is a real
number associated with each edge of G), then the
weight of a spanning tree T of G is defined as the sum
of the weights of all the branches in T.
In general, different spanning trees of G will have
different weights.
Among all the spanning trees of G, one with the
smallest weight is of practical significance.
63
A spanning tree with the smallest weight in a
weighted graph is called a shortest spanning tree
or shortest-distance spanning tree or minimal
spanning tree.
Then for each successive step select (from all remaining edges of
G) another smallest edge that makes no circuit with the previously
selected edges.
Continue
until n − 1 edges have been selected, and these edges will
constitute the desired shortest spanning tree.
Another algorithm, which does not require listing all65
edges in order of nondecreasing weight or checking at
each step if a newly selected edge forms a circuit, is
due to Prim .
Proof:
Let us now consider a spanning tree T in a
connected graph G. Adding any one chord to T will
create exactly one circuit.
Such a circuit, formed by adding a chord to a
spanning tree, is called a fundamental circuit.
84