• 沒有找到結果。

Discrete Mathematics

N/A
N/A
Protected

Academic year: 2022

Share "Discrete Mathematics"

Copied!
39
0
0

加載中.... (立即查看全文)

全文

(1)

Discrete Mathematics

WEN-CHING LIEN Department of Mathematics National Cheng Kung University

2008

(2)

7.2: Zero-One Matrices and Directed Graphs

Definition (7.8)

If A, B, and C are sets with R1A×B and R2B×C, then the composite relation R1R2is a relation from A to C defined by R1R2= {(x,z)|xA,zC,and there exists yB 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

R1R2= {(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 R1R2= ∅

(3)

7.2: Zero-One Matrices and Directed Graphs

Definition (7.8)

If A, B, and C are sets with R1A×B and R2B×C, then the composite relation R1R2is a relation from A to C defined by R1R2= {(x,z)|xA,zC,and there exists yB 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

R1R2= {(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 R1R2= ∅

(4)

7.2: Zero-One Matrices and Directed Graphs

Definition (7.8)

If A, B, and C are sets with R1A×B and R2B×C, then the composite relation R1R2is a relation from A to C defined by R1R2= {(x,z)|xA,zC,and there exists yB 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

R1R2= {(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 R1R2= ∅

(5)

7.2: Zero-One Matrices and Directed Graphs

Definition (7.8)

If A, B, and C are sets with R1A×B and R2B×C, then the composite relation R1R2is a relation from A to C defined by R1R2= {(x,z)|xA,zC,and there exists yB 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

R1R2= {(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 R1R2= ∅

(6)

7.2: Zero-One Matrices and Directed Graphs

Definition (7.8)

If A, B, and C are sets with R1A×B and R2B×C, then the composite relation R1R2is a relation from A to C defined by R1R2= {(x,z)|xA,zC,and there exists yB 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

R1R2= {(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 R1R2= ∅

(7)

Theorem (7.1)

Let A, B, C and D be sets with R1A×B , R2B×C, R3C×D. Then R1◦ (R2R3) = (R1R2) ◦R3.

(8)

Given a set A and a relation R on A, we define the powers of R recursively by

(a) R1=R;and

(b) for nZ+,Rn+1=RRn.

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≤im and 1jn,denotes the entry in the ith row and jth column of E, and such entry is 0 or 1.

(9)

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 nZ+,Rn+1=RRn.

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≤im and 1jn,denotes the entry in the ith row and jth column of E, and such entry is 0 or 1.

(10)

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(R1R2).

(11)

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(R1R2).

(12)

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(R1R2).

(13)

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(R1R2).

(14)

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

(15)

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

(16)

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

(17)

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

(18)

(M(R))4=

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

(19)

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 mZ+

(20)

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 mZ+

(21)

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 mZ+

(22)

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 mZ+

(23)

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 EF , if eijfij,for all 1≤im,1≤jn.

Definition (7.12)

For nZ+,In= (δij)n×nis the n×n(0,1)−matrix where δij =

 1, if i =j;

0, if i 6=j.

(24)

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 EF , if eijfij,for all 1≤im,1≤jn.

Definition (7.12)

For nZ+,In= (δij)n×nis the n×n(0,1)−matrix where δij =

 1, if i =j;

0, if i 6=j.

(25)

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 EF , if eijfij,for all 1≤im,1≤jn.

Definition (7.12)

For nZ+,In= (δij)n×nis the n×n(0,1)−matrix where

δij =

 1, if i =j;

0, if i 6=j.

(26)

Let A= (aij)m×n be a(0,1)−matrix.

The transpose of A, written Atr, is the matrix(aji)n×mwhere aji =aij,for all 1≤im,1≤jn.

(27)

Definition (7.13)

Let A= (aij)m×n be a(0,1)−matrix.

The transpose of A, written Atr, is the matrix(aji)n×mwhere aji =aij,for all 1≤im,1≤jn.

(28)

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,bV 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).

(29)

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,bV 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).

(30)

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,bV 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).

(31)

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,bV 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).

(32)

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,bV 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).

(33)

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,bV 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).

(34)

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,bV 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).

(35)

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.

(36)

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.

(37)

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.

(38)

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.

(39)

Thank you.

參考文獻

相關文件

Department of Mathematics National Cheng Kung

Department of Mathematics National Cheng Kung

Department of Mathematics National Cheng Kung

Department of Mathematics National Cheng Kung

Department of Mathematics National Cheng Kung

Department of Mathematics National Cheng Kung

Department of Mathematics National Cheng Kung

Department of Mathematics National Cheng Kung