34
DISCRETE STRUCTURE

Graph terminologies & special type graphs

Embed Size (px)

DESCRIPTION

This is the topic of Discrete Structure.

Citation preview

Page 1: Graph terminologies & special type graphs

DISCRETE STRUCTURE

Page 2: Graph terminologies & special type graphs

GRAPH

TERMINOLOGIES

&

SPECIAL TYPE

GRAPHS

Page 3: Graph terminologies & special type graphs

TYPES OF GRAPHS

Undirected Graphs

Directed Graphs

Special Simple Graphs

Special Simple Graphs

Page 4: Graph terminologies & special type graphs

UNDIRECTED GRAPHS

The graph in which u and v(vertices)

are endpoints of an edge of graph G is

called an undirected graph G.

U V

LOOP

Page 5: Graph terminologies & special type graphs

DEGREE

The number of edges for which vertex

is an endpoint.

The degree of a vertex v is denoted by

deg(v).

Page 6: Graph terminologies & special type graphs

DEGREE

If deg(v) = 0, v is called isolated.

If deg(v) = 1, v is called pendant.

Page 7: Graph terminologies & special type graphs

THE HANDSHAKING THEOREM

Let G = (V, E) be an undirected graph

with E edges.

Then

2|E| = vV deg(v)

Note that

This applies if even multiple edges and

loops are present.

Page 8: Graph terminologies & special type graphs

EXAMPLE

How many edges are there in a graph

with 10 vertices each of degree 5?

o vV deg(v) = 6·10 = 60

o 2E= vV deg(v) =60

o E=30

Page 9: Graph terminologies & special type graphs

EXAMPLE

How many edges are there in a graph

with 9 vertices each of degree 5?

o vV deg(v) =5 · 9 = 45

o 2E= vV deg(v) =45

o 2E=45

o E=22.5

o Which is not possible.

Page 10: Graph terminologies & special type graphs

DIRCTED GRAPHS

When (u, v) is an edge of the graph G

with directed edges.

The vertex u is called the initial vertex

of (u, v), and v is called the terminal or

end vertex of (u, v).

The initial vertex and terminal vertex of

a loop are the same.

Page 11: Graph terminologies & special type graphs

DEGREE

The in degree of a vertex v, denoted

deg−(v) is the number of edges which

terminate at v.

Similarly, the out degree of v, denoted

deg+(v), is the number of edges which

initiate at v.

vV deg- (v) = vV deg+ (v)= |E|

Page 12: Graph terminologies & special type graphs

EXAMPLE• Find the in-degree and out-degree of

each vertex in the graph G with

directed edges.

The Directed Graph G. 12

Page 13: Graph terminologies & special type graphs

EXAMPLE

The in-degrees in G are

deg−(a) = 2 deg−(b) = 2

deg−(c) = 3 deg−(d) = 2

deg−(e) = 3 deg−(f ) = 0

The out-degrees in G are

deg+(a) = 4 deg+(b) = 1

deg+(c) = 2 deg+(d) = 2

deg+(e) = 3 deg+(f ) = 0

Page 14: Graph terminologies & special type graphs

SOME SPECIAL SIMPLE GRAPHS

14

There are several classes of simple graphs.

Complete graphs

Cycles

Wheels

n-Cubes

Bipartite Graphs

New Graphs from Old

Page 15: Graph terminologies & special type graphs

COMPLETE GRAPHS

The complete graph on n vertices,

denoted by Kn, is the simple graph that

contains exactly one edge between

each pair of distinct vertices.

The Graphs Kn for 1≦ n ≦6.

Page 16: Graph terminologies & special type graphs

COMPLETE GRAPHS

K5 & K6 is important because it is thesimplest non-planar graph.

It cannot be drawn in a plane withnonintersecting edges.

Page 17: Graph terminologies & special type graphs

CYCLEThe cycle Cn, n 3, consists of n

vertices v1, v2, . . ., vn and edges {v1, v2},

{v2, v3 } ,. . . , {vn-1, vn} , and {vn , v1}. The

cycles C3, C4, C5, and C6 are displayed

below.

The Cycles C3, C4, C5, and C6.

Page 18: Graph terminologies & special type graphs

WHEEL

We obtain the wheel Wn when we add

an additional vertex to the cycle Cn, for

n 3, and connect this new vertex to

each of the n vertices in Cn, by new

edges.

The Wheels W3, W4, W5, and W6. 18

Page 19: Graph terminologies & special type graphs

N-CUBES

Qn is the graph with 2n vertices

representing bit strings of length n.

An edge exists between two vertices

that differ by one bit position.

19

Page 20: Graph terminologies & special type graphs

EXAMPLE

A common way to connect processors

in parallel machines.

Intel Hypercube.

Page 21: Graph terminologies & special type graphs

EXAMPLE

The n-cube Qn for n = 1, 2, and 3.

21

Page 22: Graph terminologies & special type graphs

BIPARTITE GRAPH

A simple graph G is called bipartite if

its vertex set V and be partitioned into

two disjoint sets V1 and V2 such that

every edge in the graph connects a

vertex in V1 and a vertex in V2 .

When this condition holds, we call the

pair (V1 , V2 ) a bipartition of the vertex

set V.

Page 23: Graph terminologies & special type graphs

BIPARTITE GRAPH

A Star network is a K(1,n) bipartite

graph.

V1(n=ODD)

V2(n=EVEN)

Page 24: Graph terminologies & special type graphs

BIPARTITE GRAPH

V1={v1,v3,v5} ; V1={v2,v4,v6}

This is the graph of Hexagonal.

Page 25: Graph terminologies & special type graphs

BIPARTITE GRAPH

Page 26: Graph terminologies & special type graphs

NEW GRAPHS FROM OLD

A sub-graph of a graph G= (V, E) is a

graph H =(W, F), where W V and F E.

A sub-graph H of G is a proper sub-

graph of G if H G .

26

Page 27: Graph terminologies & special type graphs

NEW GRAPHS FROM OLD

The graph G shown below is a sub-

graph of K5.

A Sub-graph of K5. 27

Page 28: Graph terminologies & special type graphs

NEW GRAPHS FROM OLD

The union of two simple graphs

G1= (V1, E1) & G2= (V2, E2)

is the simple graph with vertex set

V1 V2 and edge set E1 E2 .

The union of G1 and G2 is denoted by

G1 G2 .

28

Page 29: Graph terminologies & special type graphs

NEW GRAPHS FROM OLD

The Simple Graphs G1 and G2

Their Union G1∪G2.

29

Page 30: Graph terminologies & special type graphs

APPLICATION OF SPYCIAL TYPES OF GRAPHS

Suppose that there are m employees ina group and j different jobs that need tobe done where m j. Each employee istrained to do one or more of these jjobs. We can use a graph to modelemployee capabilities. We representeach employee by a vertex and eachjob by a vertex. For each employee, weinclude an edge from the vertexrepresenting that employee to thevertices representing all jobs that theemployee has been trained to do.

30

Page 31: Graph terminologies & special type graphs

APPLICATION OF SPYCIAL TYPES OF GRAPHS

Note that the vertex set of this graph

can be partitioned into two disjoint sets,

the set of vertices representing

employees and the set of vertices

representing jobs, and each edge

connects a vertex representing an

employee to a vertex representing a job.

Consequently, this graph is bipartite.

Page 32: Graph terminologies & special type graphs

APPLICATION OF SPYCIAL TYPES OF GRAPHS

To complete the project, we mustassign jobs to the employees so thatevery job has an employee assigned toit and no employee is assigned morethan one job.

Modeling the Jobs for Which Employees Have Been Trained.

32

Page 33: Graph terminologies & special type graphs
Page 34: Graph terminologies & special type graphs