Presentation is loading. Please wait.

Presentation is loading. Please wait.

Discrete Mathematics Lecture 12: Graph Theory

Similar presentations


Presentation on theme: "Discrete Mathematics Lecture 12: Graph Theory"— Presentation transcript:

1 Discrete Mathematics Lecture 12: Graph Theory
By: Nur Uddin, Ph.D

2 Introduction Graph theory are not graphs drawn with x and y axes.
In this topic, the word ‘graph’ refers to a structure consisting of points (called ‘vertices’), some of which may be joined to other vertices by lines (called ‘edges’) to form a network.

3 Definition A graph consists of a non-empty set of points, called vertices (singular: vertex), and a set of lines or curves, called edges, such that every edge is attached at each end to a vertex.

4 Definition An edge is said to be incident to the vertices to which it is attached. For example, the edge e1 is incident to the vertices v1 and v2 in the graph. Two vertices that are joined by an edge are said to be adjacent. In the graph in Figure 10.1, v1 and v2 are adjacent, while v1 and v3 are not adjacent.

5 Graph representation (Examples)
A graph could represent a road system, in which the edges are the roads and the vertices are the towns and road junctions. A graph could represent computer laboratories in a local area network (LAN), with the edges representing the links in the network. More abstract interpretations are also possible.

6 Definition If a graph is in one piece, it is said to be connected.
It is permissible for a graph to have no edges; such graphs are called null graphs. A graph may have loops (an edge from one vertex to the same vertex). A graph may also have parallel edges (two or more edges linking the same pair of vertices) A graph with directed edges is called a directed graph. A graph is said to be simple if it has no loops and no parallel edges.

7 Drawing a graph all that matters is which vertices are adjacent (joined by an edge) and which are not; the precise location of the vertices and the lengths and shapes of the edges are irrelevant. make the relationship between these two graphs clearer, corresponding vertices are labelled with the same letter. Graphs that are essentially the same are called isomorphic.

8 Simple graph A graph is said to be simple if it has no loops and no parallel edges. If a simple graph has one vertex, then it must have no edges. If a simple graph has two vertices, then either there is an edge joining the vertices or there is not. With three vertices, things start to get more complicated.

9 Degree of a vertex The degree of a vertex v in a graph is the number of edges incident to v, with a loop counting 2 towards the degree of the vertex to which it is incident. The degree of v is denoted by deg(v). A vertex with degree 0 is said to be isolated.

10 Exercise 1

11 Degree of a vertex

12 Complete graph A simple graph is complete if each vertex of the graph is adjacent to every other vertex. There is essentially only one complete graph with any given number of vertices. The complete graph with five vertices is shown as follows:

13 Number Complete graph We can obtain a formula for the number of edges in the complete graph with n vertices, using the following reasoning. Each edge in the graph corresponds to a selection of two distinct vertices from the set of n vertices, without taking order into account. This selection can be carried out in [n(n – 1)]/2 ways.

14 Matrix representation of a graph

15 Example 1 Construct the adjacency matrix of the following graph
Adjacency matrix of any graph is symmetric.

16 Draw the graph of the following adjacency matrix

17


Download ppt "Discrete Mathematics Lecture 12: Graph Theory"

Similar presentations


Ads by Google