Discrete Mathematics
WEN-CHING LIEN Department of Mathematics National Cheng Kung University
2008
7.2: Zero-One Matrices and Directed Graphs
Definition (7.8)
If A, B, and C are sets with R1⊆A×B and R2⊆B×C, then the composite relation R1◦R2is a relation from A to C defined by R1◦R2= {(x,z)|x ∈A,z ∈C,and there exists y ∈B with (x,y) ∈R1,(y,z) ∈R2}
Example (7.17)
Let A= {1,2,3,4},B = {w,x,y,z},and C = {5,6,7}.Consider R1= {(1,x), (2,x), (3,y), (3,z)}, a relation from A to B, and R2= {(w,5), (x,6)},a relation from B to C.Then
R1◦R2= {(1,6), (2,6)}is a relation from A to C.If R3= {(w,5), (w,6)} is another relation from B to C, then R1◦R2= ∅
7.2: Zero-One Matrices and Directed Graphs
Definition (7.8)
If A, B, and C are sets with R1⊆A×B and R2⊆B×C, then the composite relation R1◦R2is a relation from A to C defined by R1◦R2= {(x,z)|x ∈A,z ∈C,and there exists y ∈B with (x,y) ∈R1,(y,z) ∈R2}
Example (7.17)
Let A= {1,2,3,4},B = {w,x,y,z},and C = {5,6,7}.Consider R1= {(1,x), (2,x), (3,y), (3,z)}, a relation from A to B, and R2= {(w,5), (x,6)},a relation from B to C.Then
R1◦R2= {(1,6), (2,6)}is a relation from A to C.If R3= {(w,5), (w,6)} is another relation from B to C, then R1◦R2= ∅
7.2: Zero-One Matrices and Directed Graphs
Definition (7.8)
If A, B, and C are sets with R1⊆A×B and R2⊆B×C, then the composite relation R1◦R2is a relation from A to C defined by R1◦R2= {(x,z)|x ∈A,z ∈C,and there exists y ∈B with (x,y) ∈R1,(y,z) ∈R2}
Example (7.17)
Let A= {1,2,3,4},B = {w,x,y,z},and C = {5,6,7}.Consider R1= {(1,x), (2,x), (3,y), (3,z)}, a relation from A to B, and R2= {(w,5), (x,6)},a relation from B to C.Then
R1◦R2= {(1,6), (2,6)}is a relation from A to C.If R3= {(w,5), (w,6)} is another relation from B to C, then R1◦R2= ∅
7.2: Zero-One Matrices and Directed Graphs
Definition (7.8)
If A, B, and C are sets with R1⊆A×B and R2⊆B×C, then the composite relation R1◦R2is a relation from A to C defined by R1◦R2= {(x,z)|x ∈A,z ∈C,and there exists y ∈B with (x,y) ∈R1,(y,z) ∈R2}
Example (7.17)
Let A= {1,2,3,4},B = {w,x,y,z},and C = {5,6,7}.Consider R1= {(1,x), (2,x), (3,y), (3,z)}, a relation from A to B, and R2= {(w,5), (x,6)},a relation from B to C.Then
R1◦R2= {(1,6), (2,6)}is a relation from A to C.If R3= {(w,5), (w,6)} is another relation from B to C, then R1◦R2= ∅
7.2: Zero-One Matrices and Directed Graphs
Definition (7.8)
If A, B, and C are sets with R1⊆A×B and R2⊆B×C, then the composite relation R1◦R2is a relation from A to C defined by R1◦R2= {(x,z)|x ∈A,z ∈C,and there exists y ∈B with (x,y) ∈R1,(y,z) ∈R2}
Example (7.17)
Let A= {1,2,3,4},B = {w,x,y,z},and C = {5,6,7}.Consider R1= {(1,x), (2,x), (3,y), (3,z)}, a relation from A to B, and R2= {(w,5), (x,6)},a relation from B to C.Then
R1◦R2= {(1,6), (2,6)}is a relation from A to C.If R3= {(w,5), (w,6)} is another relation from B to C, then R1◦R2= ∅
Theorem (7.1)
Let A, B, C and D be sets with R1⊆A×B , R2⊆B×C, R3⊆C×D. Then R1◦ (R2◦R3) = (R1◦R2) ◦R3.
Given a set A and a relation R on A, we define the powers of R recursively by
(a) R1=R;and
(b) for n∈Z+,Rn+1=R◦Rn.
Definition (7.10)
An m×n zero-one matrix E = (eij)m×nis a rectangular array of numbers arranged in m rows and n columns, where each eij,for 1≤i ≤m and 1≤j≤n,denotes the entry in the ith row and jth column of E, and such entry is 0 or 1.
Definition (7.9)
Given a set A and a relation R on A, we define the powers of R recursively by
(a) R1=R;and
(b) for n∈Z+,Rn+1=R◦Rn.
Definition (7.10)
An m×n zero-one matrix E = (eij)m×nis a rectangular array of numbers arranged in m rows and n columns, where each eij,for 1≤i ≤m and 1≤j≤n,denotes the entry in the ith row and jth column of E, and such entry is 0 or 1.
Consider the sets A, B, and C and the relations R1,R2of Example 7,17. With the orders of the elements in A, B, and C fixed as in that example, we define the relation matrices for R1,R2as follows:
M(R1) =
0 1 0 0 0 1 0 0 0 0 1 0 0 0 0 0
M(R2) =
1 0 0 0 1 0 0 0 0 0 0 0
M(R1) ·M(R2) =
0 1 0 0 0 1 0 0 0 0 1 0 0 0 0 0
1 0 0 0 1 0 0 0 0 0 0 0
=
0 1 0 0 1 0 0 0 0 0 0 0
=M(R1◦R2).
Example (7.21)
Consider the sets A, B, and C and the relations R1,R2of Example 7,17. With the orders of the elements in A, B, and C fixed as in that example, we define the relation matrices for R1,R2as follows:
M(R1) =
0 1 0 0 0 1 0 0 0 0 1 0 0 0 0 0
M(R2) =
1 0 0 0 1 0 0 0 0 0 0 0
M(R1) ·M(R2) =
0 1 0 0 0 1 0 0 0 0 1 0 0 0 0 0
1 0 0 0 1 0 0 0 0 0 0 0
=
0 1 0 0 1 0 0 0 0 0 0 0
=M(R1◦R2).
Consider the sets A, B, and C and the relations R1,R2of Example 7,17. With the orders of the elements in A, B, and C fixed as in that example, we define the relation matrices for R1,R2as follows:
M(R1) =
0 1 0 0 0 1 0 0 0 0 1 0 0 0 0 0
M(R2) =
1 0 0 0 1 0 0 0 0 0 0 0
M(R1) ·M(R2) =
0 1 0 0 0 1 0 0 0 0 1 0 0 0 0 0
1 0 0 0 1 0 0 0 0 0 0 0
=
0 1 0 0 1 0 0 0 0 0 0 0
=M(R1◦R2).
Example (7.21)
Consider the sets A, B, and C and the relations R1,R2of Example 7,17. With the orders of the elements in A, B, and C fixed as in that example, we define the relation matrices for R1,R2as follows:
M(R1) =
0 1 0 0 0 1 0 0 0 0 1 0 0 0 0 0
M(R2) =
1 0 0 0 1 0 0 0 0 0 0 0
M(R1) ·M(R2) =
0 1 0 0 0 1 0 0 0 0 1 0 0 0 0 0
1 0 0 0 1 0 0 0 0 0 0 0
=
0 1 0 0 1 0 0 0 0 0 0 0
=M(R1◦R2).
Let A= {1,2,3,4}and R= {(1,2), (1,3), (2,4), (3,2)}.
Keeping the order of the elements in A fixed, we define the relation matrix for R as follows:
M(R)is the 4×4(0,1)−matrix whose entries mij, for 1≤i,j≤4,are given by
mij =
1, if(i,j) ∈R;
0, otherwise.
M(R) =
0 1 1 0 0 0 0 1 0 1 0 0 0 0 0 0
(M(R))2=
0 1 0 1 0 0 0 0 0 0 0 1 0 0 0 0
...continued
Example (7.22)
Let A= {1,2,3,4}and R= {(1,2), (1,3), (2,4), (3,2)}.
Keeping the order of the elements in A fixed, we define the relation matrix for R as follows:
M(R)is the 4×4(0,1)−matrix whose entries mij, for 1≤i,j≤4,are given by
mij =
1, if(i,j) ∈R;
0, otherwise.
M(R) =
0 1 1 0 0 0 0 1 0 1 0 0 0 0 0 0
(M(R))2=
0 1 0 1 0 0 0 0 0 0 0 1 0 0 0 0
...continued
Let A= {1,2,3,4}and R= {(1,2), (1,3), (2,4), (3,2)}.
Keeping the order of the elements in A fixed, we define the relation matrix for R as follows:
M(R)is the 4×4(0,1)−matrix whose entries mij, for 1≤i,j≤4,are given by
mij =
1, if(i,j) ∈R;
0, otherwise.
M(R) =
0 1 1 0 0 0 0 1 0 1 0 0 0 0 0 0
(M(R))2=
0 1 0 1 0 0 0 0 0 0 0 1 0 0 0 0
...continued
Example (7.22)
Let A= {1,2,3,4}and R= {(1,2), (1,3), (2,4), (3,2)}.
Keeping the order of the elements in A fixed, we define the relation matrix for R as follows:
M(R)is the 4×4(0,1)−matrix whose entries mij, for 1≤i,j≤4,are given by
mij =
1, if(i,j) ∈R;
0, otherwise.
M(R) =
0 1 1 0 0 0 0 1 0 1 0 0 0 0 0 0
(M(R))2=
0 1 0 1 0 0 0 0 0 0 0 1 0 0 0 0
...continued
(M(R))4=
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Rules:
Let A be a set with|A| =n and R a relation on A. If M(R)is the relation matrix for R, then
a) M(R) =0 (the matrix of all 0’s) if and only if R= ∅ b) M(R) =1 (the matrix of all 1’s) if and only if R=A×A c) [M(R)]m, for m∈Z+
Let A be a set with|A| =n and R a relation on A. If M(R)is the relation matrix for R, then
a) M(R) =0 (the matrix of all 0’s) if and only if R= ∅ b) M(R) =1 (the matrix of all 1’s) if and only if R=A×A c) [M(R)]m, for m∈Z+
Rules:
Let A be a set with|A| =n and R a relation on A. If M(R)is the relation matrix for R, then
a) M(R) =0 (the matrix of all 0’s) if and only if R= ∅ b) M(R) =1 (the matrix of all 1’s) if and only if R=A×A c) [M(R)]m, for m∈Z+
Let A be a set with|A| =n and R a relation on A. If M(R)is the relation matrix for R, then
a) M(R) =0 (the matrix of all 0’s) if and only if R= ∅ b) M(R) =1 (the matrix of all 1’s) if and only if R=A×A c) [M(R)]m, for m∈Z+
Definition (7.11)
Let E = (eij)m×n, F = (fij)m×nbe two m×n(0,1)−matrices.
We say that E precedes, or is less than, F, and we write E ≤F , if eij ≤fij,for all 1≤i ≤m,1≤j ≤n.
Definition (7.12)
For n∈Z+,In= (δij)n×nis the n×n(0,1)−matrix where δij =
1, if i =j;
0, if i 6=j.
Let E = (eij)m×n, F = (fij)m×nbe two m×n(0,1)−matrices.
We say that E precedes, or is less than, F, and we write E ≤F , if eij ≤fij,for all 1≤i ≤m,1≤j ≤n.
Definition (7.12)
For n∈Z+,In= (δij)n×nis the n×n(0,1)−matrix where δij =
1, if i =j;
0, if i 6=j.
Definition (7.11)
Let E = (eij)m×n, F = (fij)m×nbe two m×n(0,1)−matrices.
We say that E precedes, or is less than, F, and we write E ≤F , if eij ≤fij,for all 1≤i ≤m,1≤j ≤n.
Definition (7.12)
For n∈Z+,In= (δij)n×nis the n×n(0,1)−matrix where
δij =
1, if i =j;
0, if i 6=j.
Let A= (aij)m×n be a(0,1)−matrix.
The transpose of A, written Atr, is the matrix(a∗ji)n×mwhere a∗ji =aij,for all 1≤i≤m,1≤j≤n.
Definition (7.13)
Let A= (aij)m×n be a(0,1)−matrix.
The transpose of A, written Atr, is the matrix(a∗ji)n×mwhere a∗ji =aij,for all 1≤i≤m,1≤j≤n.
Let V be a finite nonempty set. A directed graph (or digraph) G on V is made up of the elements of V, called the vertices or nodes of G, and a subset E, of V ×V , that contains the
(directed) edges, or arcs, of G.The set V is called the vertex set of G, and the set E is called the edge set.
We then write G = (V,E)to denote the graph.
If a,b∈V and(a,b) ∈E , then there is an edge from a to b.Vertex a is called the origin or source of the edge, with b the terminus, or terminating vertex, and we say that b is adjacent from a and that a is adjacent to b.In addition, if a6=b,then (a,b) 6= (b,a).An edge of the form(a,a)is called a loop (at a).
Definition (7.14)
Let V be a finite nonempty set. A directed graph (or digraph) G on V is made up of the elements of V, called the vertices or nodes of G, and a subset E, of V ×V , that contains the
(directed) edges, or arcs, of G.The set V is called the vertex set of G, and the set E is called the edge set.
We then write G = (V,E)to denote the graph.
If a,b∈V and(a,b) ∈E , then there is an edge from a to b.Vertex a is called the origin or source of the edge, with b the terminus, or terminating vertex, and we say that b is adjacent from a and that a is adjacent to b.In addition, if a6=b,then (a,b) 6= (b,a).An edge of the form(a,a)is called a loop (at a).
Let V be a finite nonempty set. A directed graph (or digraph) G on V is made up of the elements of V, called the vertices or nodes of G, and a subset E, of V ×V , that contains the
(directed) edges, or arcs, of G.The set V is called the vertex set of G, and the set E is called the edge set.
We then write G = (V,E)to denote the graph.
If a,b∈V and(a,b) ∈E , then there is an edge from a to b.Vertex a is called the origin or source of the edge, with b the terminus, or terminating vertex, and we say that b is adjacent from a and that a is adjacent to b.In addition, if a6=b,then (a,b) 6= (b,a).An edge of the form(a,a)is called a loop (at a).
Definition (7.14)
Let V be a finite nonempty set. A directed graph (or digraph) G on V is made up of the elements of V, called the vertices or nodes of G, and a subset E, of V ×V , that contains the
(directed) edges, or arcs, of G.The set V is called the vertex set of G, and the set E is called the edge set.
We then write G = (V,E)to denote the graph.
If a,b∈V and(a,b) ∈E , then there is an edge from a to b.Vertex a is called the origin or source of the edge, with b the terminus, or terminating vertex, and we say that b is adjacent from a and that a is adjacent to b.In addition, if a6=b,then (a,b) 6= (b,a).An edge of the form(a,a)is called a loop (at a).
Let V be a finite nonempty set. A directed graph (or digraph) G on V is made up of the elements of V, called the vertices or nodes of G, and a subset E, of V ×V , that contains the
(directed) edges, or arcs, of G.The set V is called the vertex set of G, and the set E is called the edge set.
We then write G = (V,E)to denote the graph.
If a,b∈V and(a,b) ∈E , then there is an edge from a to b.Vertex a is called the origin or source of the edge, with b the terminus, or terminating vertex, and we say that b is adjacent from a and that a is adjacent to b.In addition, if a6=b,then (a,b) 6= (b,a).An edge of the form(a,a)is called a loop (at a).
Definition (7.14)
Let V be a finite nonempty set. A directed graph (or digraph) G on V is made up of the elements of V, called the vertices or nodes of G, and a subset E, of V ×V , that contains the
(directed) edges, or arcs, of G.The set V is called the vertex set of G, and the set E is called the edge set.
We then write G = (V,E)to denote the graph.
If a,b∈V and(a,b) ∈E , then there is an edge from a to b.Vertex a is called the origin or source of the edge, with b the terminus, or terminating vertex, and we say that b is adjacent from a and that a is adjacent to b.In addition, if a6=b,then (a,b) 6= (b,a).An edge of the form(a,a)is called a loop (at a).
Let V be a finite nonempty set. A directed graph (or digraph) G on V is made up of the elements of V, called the vertices or nodes of G, and a subset E, of V ×V , that contains the
(directed) edges, or arcs, of G.The set V is called the vertex set of G, and the set E is called the edge set.
We then write G = (V,E)to denote the graph.
If a,b∈V and(a,b) ∈E , then there is an edge from a to b.Vertex a is called the origin or source of the edge, with b the terminus, or terminating vertex, and we say that b is adjacent from a and that a is adjacent to b.In addition, if a6=b,then (a,b) 6= (b,a).An edge of the form(a,a)is called a loop (at a).
Example (7.25)
For V = {1,2,3,4,5}, the diagram in Fig. 7.1 is a digraph G on V with edge set{(1,1), (1,2), (1,4), (3,2)}.
Vertex 5 is a part of this graph even though it’s not the origin or terminus of and edge.
It is referred to as an isolated vertex.
As we see here, edges need not be straight line segments, and there is no concern about the length of an edge.
For V = {1,2,3,4,5}, the diagram in Fig. 7.1 is a digraph G on V with edge set{(1,1), (1,2), (1,4), (3,2)}.
Vertex 5 is a part of this graph even though it’s not the origin or terminus of and edge.
It is referred to as an isolated vertex.
As we see here, edges need not be straight line segments, and there is no concern about the length of an edge.
Example (7.25)
For V = {1,2,3,4,5}, the diagram in Fig. 7.1 is a digraph G on V with edge set{(1,1), (1,2), (1,4), (3,2)}.
Vertex 5 is a part of this graph even though it’s not the origin or terminus of and edge.
It is referred to as an isolated vertex.
As we see here, edges need not be straight line segments, and there is no concern about the length of an edge.
For V = {1,2,3,4,5}, the diagram in Fig. 7.1 is a digraph G on V with edge set{(1,1), (1,2), (1,4), (3,2)}.
Vertex 5 is a part of this graph even though it’s not the origin or terminus of and edge.
It is referred to as an isolated vertex.
As we see here, edges need not be straight line segments, and there is no concern about the length of an edge.