[关闭]
@TangWill 2019-05-15T17:58:34.000000Z 字数 6214 阅读 570

Theorem and Algorithm

DiscreteMathematicalStructures


Theorem


Chapter 1


Theorem 1

If A,B and C are finite sets, then

Theorem 2



Theorem 3

If A, B, and C are Boolean matrices of compatible sizes, then


Chapter 2


key word:Tautology、Contradiction、Contingency

Theorem 1




Chapter 4


Theorem 1

If both A and B are finite sets then

Theorem 2

Let R and S be relations from A to B. If R(a)=S(a) for all a in A, then R=S.

Theorem 3

A relation R is transitive if and only if it satisfies the following property: If there is a path of length greater than 1 from vertex a to vertex b, there is a path of length 1 from a to b (that is, a is related to b). Algebraically stated, R is transitive if and only if for all .

Theorem 4

Let P be a partition of a set A. Recall that the sets in P are called the blocks of P . Define the relation R on A as follows:
aRb if and only if a and b are members of the same block.
Then R is an equivalence relation on A.

Theorem 5

Let R be an equivalence relation on A, and let P be the collection of all distinct relative sets R(a) for . Then P is a partition of A, and R is the equivalence relation determined by P .

Theorem 6

Suppose R and S are relations from A to B.
If ,then
If ,then
and
and

Theorem 7

Let R and S be relations of a set A.
If R is reflexive, so is .
If R and S are reflexive, then so are and .
R is reflexive if and only if is irreflexive.

Theorem 8

Let R be a relation on a set A. Then
R is symmetric if and only if .
R is antisymmetric if and only if .
R is asymmetric if and only if Ø.

Theorem 9

R is reflexive if and only if .
R is irreflexive if and only if Ø.
R is transitive if and only if .
R is transitive if and only if , for any .

Theorem 10

Let R and S be relations on A.
If R is symmetric, so are and R.
If R and S are symmetric, so are and .

Theorem 11

Let R and S be relations on A.

If R and S are transitive, so are .
If R and S are equivalence relations, so are .

If R and S have the properties S◦R
Reflexive Irreflexive 1 1 1 1
Irreflexive Reflexive 1 1 1 0
Symmetric 1 1 1 1 0
Antisymmetric 1 1 1 1 0
Transitive 0 1 1 0 0
Equivalence 0 1 1 0 0

Theorem 12

Let R be a relation from A to B, and let S is a relation from B to C. Then if is any subset of A, we have

Theorem 13

Suppose that A, B, C, and D are sets, R is a relation from A to B, S is a relation from B to C ,and T is a relation from C to D. Then

Theorem 14

Suppose that A, B and C are sets, R is a relation from A to B, and S is a relation from B to C. Then

Theorem 15

If R and S are equivalence relations on a set A, then the smallest equivalence relation containing both R and S is


Chapter 5


Theorem 1

Let f : be a function.
Then is a function from B to A if and only if f is one to one.
Let f : be a function. If is a function, then
the function f -1 is also one-to-one.
is everywhere defined if and only if f is onto.
is onto if and only if f is everywhere defined .

Theorem 2

Let f : be a function.

Theorem 3

If f : is a one-to-one correspondence between A and B, then

Theorem 4

Let f : and g : be functions such that g◦f =1_A$ and f◦g=1B. Then f is a one-to-one correspondence between A and B, g is a one-to-one correspondence between B and A, and each is the inverse of the other.

Let f : and g : be invertible. Then g◦f is invertible, and .


Chapter 6


Theorem 1

If and are posets, then is a poset, with the partial order defined by


if in A and in B

Theorem 2

Let A be a finite nonempty poset with partial order . Then A has at least one maximal element and at least one minimal element

Theorem 3

A poset has at most one greatest element and at most one least element.

Theorem 4

Let be a poset. Then a subset B of A has at most one LUB and at most one GLB.


Chapter 7


Theorem 1

Let be a rooted tree. Then
There are no cycles in T .
is the only root of T.

Theorem 2

Let R be a symmetric relation.
The following statements are equivalent.
(a) R is an undirected tree.
(b) R is connected and acyclic.
(c) R is acyclic, and if any undirected edge is added to R, the new relation will not be acyclic.
(d) R is connected, and if any undirected edge is removed from R, the new relation will not be connected.

Theorem 3

Let R be a symmetric relation on a set A, |A|=n is finite.
The following statements are equivalent.
(a) R is an undirected tree.
(b) R is connected and has n-1 edges.
(c) R is acyclic and has n-1 edges.


Chapter 8


Theorem 1

(a) A graph G has an Eulerian circuit if and only if G is connected and every vertex has even degree.
(b) A graph G has an Eulerian path if and only if either all, or all but two vertices, the two endpoints, have an even degree.

Theorem 2

simple graph with n vertices is Hamiltonian if each vertex has degree n/2 or greater

Theorem 3

A graph with n vertices is Hamiltonian if, for each pair of non-adjacent vertices, the sum of their degrees is n or greater .

Theorem 4

Let the number of edges of G be m. then G has a Hamiltonian circuit if .


Algorithm


Warshall's Algorithm

1.CLOSURE MAT
2.FOR K=1 THRU N
a. FOR I = 1 THRU N
1. FOR J = 1 THRU N
a. CLOSURE[I,J]CLOSURE[I,J] (CLOSURE[I,K] CLOSURE[K,J])

Warsheall算法直观应用

topology ordering Algorithm

For finding a topological sorting of a finite poset

Step 1 Choose a minimal element a of A
Step 2 Make a the next entry of SORT and replace A with A-{a}.
Step 3 Repeat steps 1 and 2 until A ={}

Prim’s Algorithm

image_1datc85f41o5t13jaqqv12jd1b6d16.png-222.6kB

Kruskal’s Algorithm

image_1datc9k581up31gd0vi5l7a1odm23.png-215.1kB

Dijkstra’s Algorithm

T(v) = min{ T(u)+|uv| } for all and u is adjacent to v.

image_1date3qdi7iont84k911pe1taa9.png-73.1kB

Fleury's Algorithm

We start with a vertex of odd degree—if the graph has none, then start with any vertex.

At each step we move across an edge which is not a bridge, unless we have no choice, then we delete that edge.

At the end of the algorithm there are no edges left, and the sequence of edges we moved across forms an Eulerian circuit if the graph has no vertices of odd degree or an Eulerian path if there are two vertices of odd degree.

Welsh–Powell algorithm

order the vertices according to their degrees as and assigns to the smallest available color not used by neighbours among , adding a fresh color if needed.

添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注