Professional Documents
Culture Documents
3
4
Complete Graphs Kn
5
Cycles Cn
• A cycle Cn, n ≥ 3, consists of n vertices v1, v2,..., vn
and edges {v1, v2}, {v2, v3}, ..., {vn−1, vn}, and {vn , v1}.
7
• After Eid 2A
8
Bipartite Graphs
• A simple graph G=(V,E) is bipartite (or bigraph) iff
where and
10
EXAMPLE 11 at Page# 656
• Is this Bipartite graph?
• Yes!
V={a, b, c, d, e, f, g}
V1 ={a, b, d}
V2 ={c, e, f, g}
11
EXAMPLE 11 at Page# 656
• Is this Bipartite graph?
• No!
V={a, b, c, d, e, f}
V1 ={a, f, e, d}
V2 ={b, e, f, g}
12
• See Ex. 5, 6, 7, 9, 10, 12. p-655
• Exercise Q. 4, 5, 7, 9, 21-25, 29 p-665
How about these?
14
Complete Bipartite Graphs
• A complete bipartite graph Km,n is a graph that
has its vertex set partitioned into two subsets of
m and n vertices, respectively with an edge
between two vertices iff one vertex is in the first
subset and the other vertex is in the second
subset.
15
Some Applications
• Star, Ring, and Hybrid Topologies for Local Area
Networks
16
New Graphs from Old
17
EXAMPLE 18 at Page# 663
Subgraphs
• A subgraph of a graph G = (V ,E) is a graph H =
(W, F), where W ⊆ V and F ⊆ E.
• A subgraphH of G is a proper subgraphof G if .
18
Another Example
19
EXAMPLE 19 at Page# 664
20
Spanning Subgraphs
• A subgraph S of a graph G is
a graph such that
– The edges of S are a
subset of the edges of G Subgraph
• A spanning subgraph of G is
a subgraph that contains all
the vertices of G
Spanning subgraph
21
10.3 Representing Graphs
22
Adjacency List
23
Adjacency List Cont.
• A table with 1 row per vertex, listing its
connected vertices.
• How many entries?
• What if it is directed?
24
EXAMPLE 1 at Page# 668
Adjacency List Cont.
• Use adjacency lists to describe the simple graph
given in Figure.
25
EXAMPLE 2 at Page# 669
Adjacency List Cont.
• Represent the directed graph shown in Figure by listing all the
vertices that are the terminal vertices of edges starting at each
vertex of the graph.
26
Adjacency Matrix
• For Simple Graph G
• Matrix A=[aij], where aij is:
1 if {vi, vj} is an edge of G
0 otherwise
27
Example 3 at Page# 669
Use an adjacency matrix to represent the graph shown in Figure.
a b c d
a 0 1 1 1
b 1 0 1 0
c 1 1 0 0
d 1 0 0 0
28
Example 4 at Page# 669
• Draw a graph with the adjacency matrix.
What if it is directed?
30
Directed Graphs
a b c d e
a 0 1 1 1 1
b 0 1 0 1 0
c 1 0 1 0 1
d 0 0 0 0 0
e 0 1 1 1 0
31
Incidence Matrices
• Let G = (V ,E) be an undirected graph.
Suppose that v1, v2, . . . , vn are the vertices and e1,
e2, . . . , em are the edges of G.
• Then the incidence matrix with respect to this
ordering of V and E is the n × m matrix
M = [mij ], where
32
Example 6 at Page# 671
Incidence Matrix
• Represent the graph shown in Figure with an
incidence matrix.
34
Do
• Ex. 1, 2, 3, 4, 5, 6, 7. p-668
• Questions 1, 3, 5, 7, 11, 17, 19, 23, 27. p-675
END
35