Chap. 1 - Sun Yat

advertisement
Chapter 1. Fundamentals
Weiqi Luo (骆伟祺)
School of Software
Sun Yat-Sen University
Email:weiqi.luo@yahoo.com Office:A309
 Textbook:
B. Kolman, R.C. Busby & S.C. Ross, Discrete Mathematical Structures
(Sixth Edition), Higher Education Press, 2010.11.
 References:
1. 屈婉玲,耿素云,张立昂, 离散数学, 清华大学出版社
2 K.H. Rosen, 离散数学及其应用(英文版)(第6版)机械工业出版社
2
School of Software
Chapter one: Fundamentals






1.1. Sets and Subsets
1.2. Operations on Sets
1.3. Sequences
1.4. Properties of Integers
1.5. Matrices
1.6. Mathematical Structures
3
School of Software
1.1. Sets and Subset
 What is a set?
A Set is any well-defined collection of objects called the elements or members
of the set.
Well-defined means that it is possible to describe if a given object belongs to
the collection or not.
 Describing a Set
Way one: List the elements of the set between braces (finite elements)
e.g. the set of all positive integers that are less than 4 : {1, 2, 3}
Way two: Specify a property that the elements of the set have in common
e.g. R={x | x is a real number }
Property of the elements
4
School of Software
1.1. Sets and Subset
 The order of the Set
{1, 2, 3}={1, 3, 2}={2, 3, 1}={2, 1,3 }={3, 1, 2}={3, 2, 1}
 Repeated elements can be ignored
{1, 2, 3, 1} = {1, 2, 3}
 Several commonly used sets
Please refer to Example 3 in Page 2.
5
School of Software
1.1. Sets and Subset
 The relationships between Element & Set
Usually, we use uppercase letters such as A, B and C to denote
sets, and lowercase letters such as a, b, c, x, y and z to denote the
elements of sets
Binary cases: for a given element x and set A
1: x belongs to A
denoted by x ∈A
2: x does not belong to A denoted by x ∉ A
Fuzzy Sets
The collections of rich people, young girls, so on and so forth
Note: The words rich, young, beautiful, cool, hot, fat, thin etc. are
fuzzy (not well defined). Refer to Wikipedia for more details about
Fuzzy mathematics: http://en.wikipedia.org/wiki/Fuzzy_mathematics
6
School of Software
1.1. Sets and Subset
 Subset
If every element of A is also an element of B, namely, if whether x ∈A then x
∈B, we say that A is a subset of B, denoted by A ⊆ B . Otherwise,
.
 Venn diagrams
B
A
A
B
A
A⊆B
7
School of Software
B
1.1. Sets and Subset
A
B
U
A
A=B: A ⊆ B & B ⊆ A
An universal set (U) is a set containing all objects for
which the discussion is meaningful.
8
School of Software
1.1. Sets and Subset
 Example 10
Let A be a set and let B = {A, {A}}, then, since A and {A} are
elements of B, we have A ∈ B and {A} ∈B. It follows that
{A} ⊆ B and {{A}} ⊆ B. However, it is not true that A ⊆ B
Why?
9
School of Software
1.1. Sets and Subset
 The cardinality of a finite set
A set A is called finite if it has n distinct elements, where n∈N. In
this case, n is the cardinality of A and is denoted by |A|.
e.g.
A={1,2,3,1} |A| = 3
B={a, b, c, d, e, a}, |B| = 5
|A| < |B|
A set that is not finite is called infinite, for instances, N, Z, Q, R
as mentioned in Example 3. the cardinality of infinite?
Continuum hypothesis (the 1st Hilbert's Problems):
http://en.wikipedia.org/wiki/Continuum_hypothesis
10
School of Software
1.1. Sets and Subset
 Power set of a set A
If A is a set, then the set of all subsets of A is called the power
set of A and is denoted by P(A).
e.g. A={1,2,3}
Then P(A) consists of the following subsets of A: {}, {1}, {2},
{3}, {1,2}, {1,3}, {2,3}, and {1,2,3}
|P(A)| = 2^n, why? Assuming n = |A| ∈N
11
School of Software
1.1. Sets and Subset
 Homework
ex.5, ex.13, ex.14, ex.23
12
School of Software
1.2. Operations on Sets
 Union
If A and B are sets, we define their union as the set consisting of
all elements that belong to A or B and denote it by A U B.
AUB=
{ x | x ∈ A or x ∈ B }
U
A
B
13
School of Software
1.2. Operations on Sets
 Intersection
If A and B are sets, we define their intersection as the set
consisting of all elements that belong to both A and B and
denoted it by A ∩ B.
A∩B=
{ x | x ∈ A and x ∈ B }
U
A
B
14
School of Software
1.2. Operations on Sets
 Complement of B with respect to A
If A and B are two sets, we define the complement of B with
respect to A as the set of all elements that belong to A but not to
B, and we denote it by A - B
A-B=
{ x | x ∈ A and x ∉ B }
U
A
B
15
School of Software
1.2. Operations on Sets
 Complement
If U is a universal set containing A, then U-A is called the
complement of A and is denoted by
= {x | x ∉ A}
U
A
16
School of Software
1.2. Operations on Sets
 Symmetric difference
If A and B are two sets, we define their symmetric difference as
the set of all elements that belong to A or to B, but not to both A
and B, and we denote it by A B
A B = {x | (x ∈A and x ∉ B) or (x ∈B and x ∉ A) }
U
A
B
17
School of Software
1.2. Operations on Sets
 Commutative Properties
AUB= BUA ; A∩B=B∩A
 Associative Properties
A U (B U C) = ( A U B ) U C
A ∩ (B ∩ C) = ( A ∩ B ) ∩ C
 Distribution Properties
A ∩ (B U C) = ( A ∩ B ) U ( A ∩ C )
A U (B ∩ C) = ( A U B ) ∩ ( A U C )
18
School of Software
1.2. Operations on Sets
 Idempotent Properties
A U A =A ; A ∩ A = A
 Properties of the complement
De Morgan’s Law
19
School of Software
1.2. Operations on Sets
 Properties of a Universal set
AUU = U
A∩U = A
 Properties of the empty set
AU
= A
A∩
=
20
School of Software
1.2. Operations on Sets
 How to proof above properties?
e.g. Proof:
Proof: suppose x ∈
, then we have x ∉ A∩B, so
x ∈ or x ∈ , which means that x ∈
. Thus,
⊆
Conversely, suppose x ∈
, then we have x ∉ A or x ∉ B , so
x ∉ A ∩ B, which means that x ∈
.Thus
⊆
Therefore,
A common style of proof for statements about sets is to choose an
element in one of the sets and see what we know about it.
21
School of Software
1.2. Operations on Sets
 Addition Principle
Theorem 2: If A and B are finite sets, then
|A U B| = |A| + |B| - |A ∩ B |
A∩B
U
A
B
22
School of Software
1.2. Operations on Sets
 Example 9
A computer company wants to hire 25 programmers to handle
systems programming jobs and 40 programmers for applications
programming. Of those hired, 10 will be expected to perform
jobs of both types. How many programmers must be hired? (at
least? )
Solution:
A: the set of system programmers hired
B: the set of applications programmers hired, then
|A| = 25, |B| = 40, |A ∩ B| =10
|A U B| = |A| + |B| - |A ∩ B |
= 25 + 40 -10 =55
23
School of Software
1.2. Operations on Sets
 Generalized case for three sets
Theorem 3: Let A, B and C be finite sets. Then
|A U B U C| = |A| + |B| + |C| - |A∩B| - |B∩C|-|A∩C| + |A∩B∩C|
A∩B
A∩B∩C
B
A
A∩C
C
24
B∩C
School of Software
1.2. Operations on Sets
 Homework
ex. 4, ex. 10, ex. 12, ex. 35
ex. 46, ex. 47
25
School of Software
 1.3. Sequences
 1.4. Properties of Integers
 1.5. Matrices
26
School of Software
1.6. Mathematical Structures
 Mathematical structure (system)
Such a collection of objects with operations defined on them and
the accompanying properties form a mathematical structure or
system, for instance,
Example 1: The collection of sets with the operations of union,
intersection and complement and their accompanying properties
is a mathematical structure. Denoted by
(sets, U, ∩ , -)
27
School of Software
1.6. Mathematical Structures
 Binary operation
An operation that combines two objects
 Unary operation
An operation that requires only one object
Example: the structure (5x5 matrices, +, *, T)
the operations + and * are binary operations
the operation T is a unary operation
28
School of Software
1.6. Mathematical Structures
 Closure
A structure is closed with respect to an operation if that
operation always produces another/same member of the
collection of objects.
Example 3: The structure (5x5 matrices, +, *, T) is closed with
respect to +, * and T. (why?)
Example 4: The structure (odd integers, +, *) is closed with
respected to *, while it is not closed with respected to +. (why?)
29
School of Software
1.6. Mathematical Structures
 Commutative property
If the order of the objects does not affect the outcome of a binary
operation, we say that the operation is commutative , namely
if x □ y = y □ x, where □ is some binary operation with
commutative property.
Example 6
(a) Join and meet for Boolean matrices are commutative operations
A V B =B V A and A ^ B = B ^ A
(b) Ordinary matrix multiplication is not a commutative operation.
AB ≠ BA
30
School of Software
1.6. Mathematical Structures
 Associative property
if □ is a binary operation, then □ is associative or has
associative property if
(x □ y) □ z = x □ (y □ z)
Example 7
Set union is an associative operation, since
(A U B) U C = A U (B U C) is always true
31
School of Software
1.6. Mathematical Structures
 Distributive property
If a mathematical structure has tow binary operations, say □ and
∇, a distributive property has the following pattern:
x □ (y ∇ z) = (x □ y) ∇ ( x □ z )
we say that □ distributes over ∇
Example 8 (b)
the structure (sets, U, ∩, -) has two distributive properties:
A U (B ∩ C) =(A U B) ∩ (A U C)
A ∩ (B U C) =(A ∩ B) U (A ∩ C)
32
School of Software
1.6. Mathematical Structures
 De Morgan’s law
If the unary operation is ○ and the binary operation □ and ∇,
then De Morgan’s law are
(x □ y) ○ =x ○ ∇ y ○ , (x ∇ y) = x ○ □ y ○
Example 9
(a) Union, intersection and complement
(b) The structure (real numbers, +, *, sqrt) does not satisfy De
Morgan’s law (why?)
33
School of Software
1.6. Mathematical Structures
 Identify
If a structure with a binary operation □ contain an element e,
satisfying that
x□e=e□x=x
for all x in the collection
we call e an identify for the operation □
Example 10:
For (n-by-n matrices, +,*, T), In is the identify for matrix
multiplication and the n-by-n zero matrix is the identify matrix
addition.
34
School of Software
1.6. Mathematical Structures
 Theorem 1: If e is an identify for a binary
operation □, then e is unique.
Proof:
Assume i is another object with identify property, then we have i
□ e = e □ i = e; since e is also an identify for □, then we have i
□ e = e □ i = i, therefore e = i, which means that there is at most
one object with the identify property for □.
35
School of Software
1.6. Mathematical Structures
 Inverse
If a binary operation □ has an identity e, we say y is a □inverse of x if x □y=y □x=e
Example 11:
(a) In the structure (3-by-3 matrices, +, *, T), each matrix A=[aij]
has +-inverse(additive inverse), -A=[-aij]. (why ?)
(b) In the structure (integers, +, *), only the integers 1 and -1
have multiplicative inverses. (why?)
36
School of Software
1.6. Mathematical Structures
 Theorem 2: If □ is an associative operation and
x has a □-inverse y, then y is unique.
Proof:
Assume there is another □-inverse for x, say z, then
(z □ x) □ y = e □ y = y, and z □ (x □ y) =z □ e =z
since □ us associative, (z □ x) □ y = z □ (x □ y) and so
y=z, which means that y is unique.
37
School of Software
1.6. Mathematical Structures
 Homework
ex. 4, ex. 8, ex. 13, ex. 21, ex. 32
38
School of Software
Download