OSCamp Kubernetes 2024 | Zero-Touch OS-Infrastruktur für Container und Kubern...
Graph theory.pptx
1. Discrete Mathematics
GRAPH THEORY
Presented by- Aditya Sawant (220105011120)
Shriram Mange(220105011028)
Krishna Mali (220105011102)
Naman Shetty(220105011051)
Guidance by-
Associate prof. Mr. Tushar Kaloge
FY BCA Div:A
2. Introduction
Agraph G consists of two things:
unordered pairs of distinct vertices called edges
1. Aset V = V whose elements are called vertices, points or nodes of G.
2. Aset E = E of of G.
We denote such a graph by G(V,E) when we want to emphasize the two parts of
G.
Vertices u and u are said to be adjacent if there is an edge e={u,u}.
In such case u and u are called endpoints of e and e is said to connect u and u.
Also, the edge e is said to be incident on each of its endpoints u and u.
3. • Graphs are pictured by diagrams in the
plane in a natural way.
• Specifically, each vertex u in V is
represented by dot (or small circle), and
each edge e={u1,u2}
represented by a curve
• It is which connects
its endpoints u1 and u2.
I. V consists of vertices A,B,C,D,E.
II. E consists of edges e1= {A,B}, e2={B,C},
e3={C,D}, e4={D,E}, e5={E,A}, e6={A,C},
e7={A,D}, e8={B,D}, e9={B,E}, e10={C,E},
e11={D,B}, e12={D,A}, e13={E,C},
e14={E,B}.
4. Types of Graphs
• Subgraphs
1. A subgraph H(V’,E’) of G(V,E) is called
a subgraph of G if the vertices and
edges of E’ contains all edges in G
whose endpoints belong to vertices in H.
2. If u is a vertex in G, then G – u is the
subgraph of G obtained by deleting u
from G and deleting all edges in G
which contain u.
3. If e is an edges in G, then G – e is the
subgraph of G obtained by simply
deleting the edges e from G.
5. • Isomorphic graphs
1. Graphs G(V,E) and G*(V*E*)
are said to be isomorphic if there
exists a one to one
correspondence f:V→V* such
that {u,u} is an edges of G if and
only if {f(u),f(u)} is an edges of
G*.
2. Normally, we do not distinguish
between isomorphic graphs even
though their diagrams may “look
different”.
6. • Homeomorphic Graphs
1. Given any graph G, we can
obtain a new graph by dividing
an edges of G with additional
vertices.
2. Two graphs G and G* are said to
homeomorphic if they can be
obtained from the same graph or
isomorphic graphs by this
method.
3. The graphs (a) and (b) in are not
isomorphic, but they are
homeomorphic since they can
obtained from the graph (c) by
adding appropriate vertices.
7. Representation of Graphs in Memory
There are two standard ways of maintaining a graph G in the
memory of a computer.
One way, called the sequential representation of G, is by means of
adjacency matrix
its A.
linked representation
The other way, called the of graphs G is
dense and linked list are usually used when G is sparse.
Regardless of the way one maintain a graph G in memory, the
graph G is normally input into the computer by its formal
collection of vertices
definition, that is, as a and a collection of
pairs of vertices .
8. • Adjacency Matrix
1. The adjacency matrix a of a graph G
does depend on the ordering of the
vertices of G, the is a different
ordering of the vertices yields a
different adjacency matrix.
2. However, any two such adjacency
closely related
matrices are to that
one can be obtained from the other
by simply interchanging rows and
columns.
3. On the other hand, the adjacency
matrix does not depend upon order
in which the edges are input into the
computer.
9. • Linked Representation of a Graph
The linked
representation of a
graph G, which
maintains G in a
memory by using its
adjacency lists, will
normally contain two
files one called vertex
file and other called
edge file.
10. Traversable Graphs, Euler and Hamiltonian
Circuits
• Traversable Graphs
1. Traversable, since there are two odd
vertices.
2. The traversable path must begin at
one of the odd vertices and will end
at the other.
3. Traversable, since all vertices are
even.
4. Thus, G has an Euler circuit.
5. Since, six vertices have odd degree,
G is not traversable.
11. • Euler circuits
1. If a graph has more than 2
vertices of odd degree then it
has no Euler paths.
2. If a graph is connected and has
0 or exactly 2 vertices of odd
degree, then it has at least one
Euler path
3. If a graph is connected and has
0 vertices of odd degree, then it
has at least one Euler circuit.
12. • Hamiltonian circuits
1. AHamilton circuit is one that passes
through each point exactly once but
does not, in general, cover all the
edges.
2. Actually, it covers only two of the
three edges that intersect at each
vertex.
3. The route shown in heavy lines is
one of several possible.