0% found this document useful (0 votes)
31 views6 pages

Week 6 Graphs

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views6 pages

Week 6 Graphs

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Graphs


Graphs are drawings with dots and (not necessarily
straight) lines arrows
or

→ dots are vertices/ nodes

→ lines and arrows are


edges
Types of graphs

simple graph

→ multi
graph
→ directed
graph

→ undirected graph
→ etc .
Undirected graphs
→ if there is an
edge e between vertices u

and v we say
↳ u and ✓ adjacent
are
↳e is incident with u and ✓

of vertex number of edges incident with



degree
it
is


vertex of degree 0 is isolated

vertex of degree 1 is a
pendant
Handshaking theorem

number of
edges =

sumofdegoezesofvertices
Directed Graphs

if there is edge an
going from u to v
,
we
say
↳ u is
adjacent to v
↳ u is the initial start vertex of e
or

↳ v is the terminal or end vertex of e

→ The in -

degree of v is the number of edges with


V its terminal
as

The out degree of v is the number
-

of edges with ✓ as its


initial
Representing Graphs Adjacency : Matrix

→ list vertices in some order horizontally from


left to right

→ Then
using
same order list them
-

vertically top to bottom

→ The entry in the ith row and jth column is the


number of edges going from vertex i b- vertex j

→ if graph is undirected then i


, j =
j ,
i

Paths in simple Graphs



A path is a
sequence of vertices travelling along
edges

length of a
path is the number of edges in it


A path is called simple if it does not contain the
Saine edge twice

→ A hamiltonian path is a
simple path passing
through every vertex exactly once
Cycles in
simple graphs
path beginning and with
→ A cycle is a
ending
the same vertex


length of a
cycle is number of edges in it

if it does
→ A cycletwiceis simple not contain the same

edge
→ Hamiltonian
vertex
cycle is a
simple cycle passing through every
exactly once .

special simple Graphs


→ The
complete graph on n vertices ( or n -

cliques) denoted
by Kn is the simple graph that contains an
edge
between each pair of distinct vertices

is denoted by Cn for n≥4


→ n
cycle
Subgraphs

When edges and vertices are from graph
removed a

with removing end points of any remaining edges ,


a

smaller subgraph is obtained


Connected Graph
simple graph called connected if there
→ a is a
graph
is a
path between every pair of distinct vertices .

Connected components of a
graphs
→ a connected component of a
graph is a maximal connected
subgraph
then it has
→ if it is a connected graph only I connected
component C itself )
Isomorphism of graphs
→ Gra H G and H are isomorphic if there is an isomorphism
between them .

↳ A function 1- from the vertices of G to the vertices

of H such that
↳ f is a bijection
↳ 1- takes
edges to edges
↳ 7- takes non
edges to edges
non

7 of called an invariant if it
→ A
property graphs is is

preserved under isomorphisms .

if G and H isomorphic graphs and G has


are
property
H
7 ,
then has
property 7 as well .

You might also like