Вы находитесь на странице: 1из 39

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

1

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 }

a property that the elements of the set have in common e.g. R={x | x is
a property that the elements of the set have in common e.g. R={x | x is

Property of the elements

2

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.

3

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

for a given element x and set A

Binary cases:

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

Fuzzy mathematics:

Refer to Wikipedia for more details about

http://en.wikipedia.org/wiki/Fuzzy_mathematics

4

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

.
.
A B A ⊆ B
A
B
A ⊆ B
A B
A
B
A
A
x ∈ B, we say that A is a subset of B, denoted by A ⊆
B
B

5

1.1. Sets and Subset

A B A=B: A ⊆ B & B ⊆ A
A
B
A=B:
A ⊆ B & B ⊆ A
A
A

U

An universal set (U) is a set containing all objects for which the discussion is meaningful.

6

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?

7

1.1. Sets and Subset

The cardinality of a finite set

A set A is called finite if it has n distinct elements, where nN. 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}, |A| < |B|

|B| = 5

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 1 st Hilbert's Problems):

http://en.wikipedia.org/wiki/Continuum_hypothesis

8

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

following subsets of A: {}, {1}, {2}, {3}, {1,2}, {1,3}, {2,3}, and {1,2,3} |P(A)| = 2^n,

9

1.1. Sets and Subset

Homework ex.5, ex.13, ex.14, ex.23

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.

A U B = { x | x A or x B }

A B
A
B

U

11

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 }

A B
A
B

U

12

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 }

AA B
AA
B

U

13

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 is a universal set containing A, then U-A is called the complement of A and
U is a universal set containing A, then U-A is called the complement of A and
A
A

U

14

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 or to B, but not to both A and B, and we denote it by

A

or to B, but not to both A and B, and we denote it by A

B = {x | (x A and x B) or (x B and x A) }

A B
A
B

U

15

1.2. Operations on Sets

Commutative Properties

A U B =

B U A

;

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

A

U

(B U C) =

( A

(B

C) =

( A

16

B ) U ( A

C )

U

B ) ( A U C )

1.2. Operations on Sets

Idempotent Properties

A U A =A ;

A A = A

Properties of the complement

on Sets • Idempotent Properties A U A =A ; A ∩ A = A •
on Sets • Idempotent Properties A U A =A ; A ∩ A = A •
on Sets • Idempotent Properties A U A =A ; A ∩ A = A •
on Sets • Idempotent Properties A U A =A ; A ∩ A = A •
on Sets • Idempotent Properties A U A =A ; A ∩ A = A •
on Sets • Idempotent Properties A U A =A ; A ∩ A = A •

De Morgan’s Law

17

1.2. Operations on Sets

Properties of a Universal set

A U U

A U

=

=

U

A

Properties of the empty set

A U

=

A

A

on Sets • Properties of a Universal set A U U A ∩ U = =

=

on Sets • Properties of a Universal set A U U A ∩ U = =

1.2. Operations on Sets

How to proof above properties?

e.g. Proof:

Proof: suppose x

proof above properties? e.g. Proof: Proof: suppose x ∈ , then we have x ∉ A

, then

we have x AB, so

x

or x

x ∈ , then we have x ∉ A ∩ B, so x ∈ or x

, which means that x

. Thus,

∩ B, so x ∈ or x ∈ , which means that x ∈ . Thus,

Conversely, suppose x B, which means that x

Conversely, suppose x ∈ ∩ B, which means that x ∈ ⊆ Therefore, , then we

Therefore,

x ∈ ∩ B, which means that x ∈ ⊆ Therefore, , then we have x
x ∈ ∩ B, which means that x ∈ ⊆ Therefore, , then we have x

, then we have x A or x B , so x A .Thus

, then we have x ∉ A or x ∉ B , so x ∉ A
, then we have x ∉ A or x ∉ B , so x ∉ A
, then we have x ∉ A or x ∉ B , so x ∉ A
, then we have x ∉ A or x ∉ B , so x ∉ A

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.

style of proof for statements about sets is to choose an element in one of the

19

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

Addition Principle Theorem 2: If A and B are finite sets, then |A U B| =

A

B

U

20

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

21

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| - |AB| - |BC|-|AC| + |ABC|

AB

A∩B∩C B A C A∩C B∩C
A∩B∩C
B
A
C
A∩C
B∩C

22

1.2. Operations on Sets

Homework ex. 4, ex. 10, ex. 12, ex. 35 ex. 46, ex. 47

1.3. Sequences

1.4. Properties of Integers

1.5. Matrices

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

25

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

26

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?)

27

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

28

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

29

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

A (B U C) =(A B) U (A C)

C) =(A U B) (A U C)

30

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

□ y ○ Example 9 (a) Union, intersection and complement (b) The structure (real numbers, +,

(b)

The structure (real numbers, +, *, sqrt) does not satisfy De

Morgan’s law (why?)

31

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.

32

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 .

33

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=[a ij ]

has +-inverse(additive inverse), -A=[-a ij ]. (why ?)

(b) In the structure (integers, +, *), only the integers 1 and -1

have multiplicative inverses. (why?)

34

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.

35

Chapter two: Logic

2.1. Propositions and Logical Operation

2.2. Conditional Statements

2.3. Methods of Proof

2.4. Mathematical Induction

2.5. Mathematical Statements

2.6. Logic and Problem Solving

36

2.4 Mathematical Induction

Example 5: Consider the following function given in pseudocode Function SQ(A)

1. C

<0

2. D

<0

3. WHILE (D is not A)

a. C <C+A

b. D <D+1

4. RETURN (C) End of Function SQ

37

2.4 Mathematical Induction

Strong Induction

 

Weak Induction

Strong Induction

Basis Step

P(n o ) is true (or the first several statements are true)

P(n o ) is true (or the first several statements are true)

Induction Step

P(k) P(k+1) is a tautology

P(n0) P(n1) … P(k) P(k+1) is a tautology

38

2.4 Mathematical Induction

Example 7: Prove that every positive integer n>1 can be written uniquely as p 1 a1 p 2 a2 …p s as , where p i are primes and p 1 <p 2 < P

s

Basis Step : P(2) is true, since 2 is prime and 2 = 2 1 (unique ) Induction Step: Assuming P(2), P(3), … P(k) are true

if k+1 is prime, then k+1= (k+1) 1 if k+1 is not prime, then we let k+1=Lm, where L, m are positive integers less than k+1. Using P(L) and P(m) are true, we have k+1=Lm= q 1 b1 q 2 b2 …q s bs (unique form) Why? Proof by contradiction

39