Discrete Structures Chapter 7A - PowerPoint PPT Presentation

1 / 18
About This Presentation
Title:

Discrete Structures Chapter 7A

Description:

Discrete Structures Chapter 7A Graphs Nurul Amelina Nasharuddin Multimedia Department * Objectives On completion of this topic, student should be able to: Explain ... – PowerPoint PPT presentation

Number of Views:49
Avg rating:3.0/5.0
Slides: 19
Provided by: Unkn217
Category:

less

Transcript and Presenter's Notes

Title: Discrete Structures Chapter 7A


1
Discrete StructuresChapter 7A Graphs
Nurul Amelina Nasharuddin Multimedia Department
2
Objectives
  • On completion of this topic, student should be
    able to
  • Explain basic terminology of a graph
  • Identify Euler and Hamiltonian cycle
  • Represent graphs using adjacency matrices

3
Introduction to Graphs
  • A graph G, consists of
  • V, a nonempty set of vertices (or nodes) and
  • E, a set of edges
  • G (V, E)
  • Each edge has either one or two vertices
    associated with it, called its endpoints. An edge
    is said to connect its endpoints
  • Edge-endpoint function is the correspondence from
    edges to endpoints

4
Terminology
  • Loop, parallel edges, isolated, adjacent,
    incident
  • Loop - An edge connects a vertex to itself
  • Two edges connect the same pair of vertices are
    said to be parallel
  • Isolated vertex - Unconnected vertex
  • Two vertices that are connected by an edge are
    called adjacent
  • An edge is said to be incident on each of its end
    points

5
Example
  • Vertex set u1, u2, u3
  • Edge set e1, e2, e3, e4
  • e1, e2, e3 are incident on u1
  • u2 and u3 are adjacent to u1
  • e4 is a loop
  • e2 and e3 are parallel

6
Types of Graph
  • Directed order counts when discussing edges
  • Undirected (bidirectional)
  • Weighted each edge has a value associated with
    it
  • Unweighted

7
Examples of Graphs
8
Special Graphs
  • Simple does not have any loops or parallel
    edges
  • Complete graphs there is an edge between
    every possible tuple of vertices
  • Bipartite graph V can be partitioned into V1
    and V2, such that
  • (x,y)?E ? (x?V1 ? y?V2) ? (x?V2 ? y?V1)
  • Sub graphs - G1 is a subset of G2 iff
  • Every vertex in G1 is in G2
  • Every edge in G1 is in G2
  • Connected graph can get from any vertex to
    another via edges in the graph

9
Simple Graph
  • Eg Draw all simple graphs with 4 vertices u, v,
    w, x and two edges, one of which is u, v

10
Complete Graph
  • There is an edge between every possible tuple
    of vertices. e C(n,2) n.(n-1)/2

11
Bipartite Graph
  • A graph is bipartite if its vertices can be
    partitioned into two disjoint subsets U and V
    such that each edge connects a vertex from U to
    one from V.

12
Complete Bipartite
  • A bipartite graph is a complete bipartite graph
    if every vertex in U is connected to every vertex
    in V
  • If U has m elements and V has n, then we denote
    the resulting complete bipartite graph by Km,n.
    The illustration shows K3,2

13
Degree of Vertex
  • Defined as the number of edges attached
    (incident) to the vertex
  • A loop is counted twice

14
Example
  • Find the degree of each vertex and the total
    degree of graph G where the graph
  • Contains 3 vertex v1, v2, v3
  • Contains 3 edges e1, e2, e3
  • Endpoints of e1 are v2 and v3
  • Endpoints of e2 are v2 and v3
  • e3 is a loop at v3
  • v1 is an isolated vertex
  • Ans Total degree 6

15
Handshake Theorem
  • If G is ANY graph, then the sum of the degrees of
    all the vertices of G equals twice the number of
    edges of G
  • Specifically, if the vertices of G are v1, v2, ,
    vn, where n is a nonnegative integer, then
  • The total degree of G
  • deg(v1)deg(v2)deg(vn)
  • 2 ? (the number of edges of G)

16
Total Degree of a Graph is Even
  • Prove that the total of the degrees of all
    vertices in a graph is even
  • Since the total degree equals 2 times of edges,
    which is an integer, the sum of all degree is
    even.

17
Whether Certain Graphs Exist
  • Draw a graph with the specified properties or
    show that no such graph exists
  • (a) A graph with four vertices of degrees 1,1,2,
    and 3
  • No such graph is possible. By Handshake Theorem
    the total degree is even. 1 1 2 3 7 not
    even
  • (b) A graph with four vertices of degrees 1, 1,
    3 and 3
  • (c) A simple graph with four vertices of degrees
    1, 1, 3 and 3

18
Even No. of Vertices with Odd Degree
  • In any graph, there are an even number of
    vertices with odd degree
  • Is there a graph with ten vertices of degrees
    1,1,2,2,2,3,4,4,4, and 6?
  • Ans No. such a graph will have 3 vertices of
    odd degree (1,1,3) which is impossible.
Write a Comment
User Comments (0)
About PowerShow.com