0% found this document useful (0 votes)
73 views24 pages

6 Graphs and Planner Graphs

This document provides an introduction to graphs and discusses various graph terminology and concepts. It defines graphs as a collection of nodes and edges representing relationships. It describes different types of graphs such as undirected graphs with bidirectional edges, directed graphs with unidirectional edges, simple graphs without loops or multiple edges, and weighted graphs with edge weights. It also discusses graph representations using incidence and adjacency matrices and covers graph concepts like paths, circuits, subgraphs, isomorphic graphs, and complete graphs.

Uploaded by

lms vb
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)
73 views24 pages

6 Graphs and Planner Graphs

This document provides an introduction to graphs and discusses various graph terminology and concepts. It defines graphs as a collection of nodes and edges representing relationships. It describes different types of graphs such as undirected graphs with bidirectional edges, directed graphs with unidirectional edges, simple graphs without loops or multiple edges, and weighted graphs with edge weights. It also discusses graph representations using incidence and adjacency matrices and covers graph concepts like paths, circuits, subgraphs, isomorphic graphs, and complete graphs.

Uploaded by

lms vb
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/ 24

Graphs and Planner Graphs

Outline
• Introduction
• Basic terminology
• Multigraphs and Weighted Graphs
• Representation of Graphs
• Paths and Circuits
• Graph Traversal
• Eulerian Paths and Circuits
• Hamiltonian Paths and Circuits
Motivation for learning graph
• Graph : Visual representation of relation.
• Many real life problems can be effectively
represented via the concept of relations.
• When the number of objects participating in the
relation are more, it is convenient to visualize it in
the graphical format.
• Ex : Consider a number of cities connected by
highways, given a map of highways, we might
want to determine whether there is a highway
route between two cities of the map.
Introduction
• A graph is a collection of nodes and edges that
represents relationships:
– Nodes are vertices that correspond to objects.
– Edges are the connections between objects.
• For instance, you can model the friendships in
a social network using a graph. The graph
nodes are people, and the edges represent
friendships.
Undirected graphs
• Undirected graphs have edges that do not
have a direction. The edges indicate a two-
way relationship, in that each edge can be
traversed in both directions.
Directed graphs
• Directed graphs have edges with direction.
The edges indicate a one-way relationship, in
that each edge can only be traversed in a
single direction.
Directed graphs
• Directed graph is defined as pair (V,E) where V
is set of vertices .and E is a binary relation on
V.

• In undirected graph, E is a set of multisets of


the elements from V.
Simple Graph
• Simple Graph : A simple graph is a graph that
does not have more than one edge between
any two vertices and no edge starts and ends
at the same vertex. In other words a simple
graph is a graph without loops and multiple
edges.
Asymmetric diagraph
• Digraphs that have at most one directed edge
between a pair of vertices, but are allowed to
have self-loops are called asymmetric or anti-
symmetric.
Symmetric diagraph
• Diagraphs in which for every edge (a,b), there
is also an edge (b,a).
Isomorphic
• A graph can exist in different forms having the
same number of vertices, edges, and also the
same edge connectivity. Such graphs are
called isomorphic graphs.
• Two graphs G1 and G2 are said to be
isomorphic if −
– Their number of components (vertices and edges)
are same.
– Their edge connectivity is retained.
Isomorphic - Example
Subgraph
• Definition: A graph whose vertices and edges
are subsets of another graph.

• Formal Definition: A graph G'=(V', E') is a


subgraph of another graph G=(V, E) iff
– V'⊆ V
– E'⊆ E
Subgraph Example
Spanning subgraph
• A subgraph of G is said to be a spanning
subgraph if it contains all the vertices of G.
Complement of subgraph
Complete Graph
• Undirected complete graph : Graph of n
vertices denoted by Kn is a graph with n
vertices in which there is an edge between
each pair of vertices.

• Directed Complete Graph : It is a graph with n


vertices in which there is exactly one arrow
between each pair of distinct vertices.
Multigraph
• A multigraph is a graph which is permitted to
have multiple edges (also called parallel
edges), that is, edges that have the same end
nodes. Thus two vertices may be connected by
more than one edge.
• Let G (V,E), where V is a set and E is a multiset
of ordered pairs from V✕V. G is called a
directed multigraph.
Multigraph
Weighted Graph
• A graph whose edges have weights
Representation of Graph
(Incidence Matrix)
Rows = Vertices
Columns = Edges
Do it yourself : Represent below graph
using incidence matrix and adjacency
matrix
Representation of Graph
(Adjecancy Matrix)

You might also like