Discrete Mathematics with Applications MATH236 Dr. Hung P. - - PowerPoint PPT Presentation

discrete mathematics with applications math236
SMART_READER_LITE
LIVE PREVIEW

Discrete Mathematics with Applications MATH236 Dr. Hung P. - - PowerPoint PPT Presentation

Discrete Mathematics with Applications MATH236 Dr. Hung P. Tong-Viet School of Mathematics, Statistics and Computer Science University of KwaZulu-Natal Pietermaritzburg Campus Semester 1, 2013 Tong-Viet (UKZN) MATH236 Semester 1, 2013 1 /


slide-1
SLIDE 1

Discrete Mathematics with Applications MATH236

  • Dr. Hung P. Tong-Viet

School of Mathematics, Statistics and Computer Science University of KwaZulu-Natal Pietermaritzburg Campus

Semester 1, 2013

Tong-Viet (UKZN) MATH236 Semester 1, 2013 1 / 20

slide-2
SLIDE 2

Table of contents

1

Pigeonhole Principle

2

One-to-one functions and permutation One-to-one functions Permutations

Tong-Viet (UKZN) MATH236 Semester 1, 2013 2 / 20

slide-3
SLIDE 3

Pigeonhole Principle

Strong Pigeonhole Principle (cont.)

Theorem (Strong Pigeonhole Principle) Let n1, n2, · · · , nk be positive integers. If n1 + n2 + · · · + nk − k + 1

  • bjects are placed into k boxes, then there is an integer i ∈ {1, 2, · · · , k}

such that the ith box contains at least ni objects.

Tong-Viet (UKZN) MATH236 Semester 1, 2013 3 / 20

slide-4
SLIDE 4

Pigeonhole Principle

Strong Pigeonhole Principle (cont.)

Example Suppose that we choose n2 + 1 integers from the integers 1, 2, · · · , n. Then at least one of the integers 1, 2, · · · , n is chosen at least n + 1 times. Place n2 + 1 integers into n boxes marked from 1 to n depending on its value Since n2 + 1 = (n + 1) + (n + 1) + · · · + (n + 1)

  • n terms

−n + 1, the Strong Pigeonhole Principle implies that at least one box contains at least n + 1 objects that is, at least one of the integers 1, 2, · · · , n is chosen at least n + 1 times

Tong-Viet (UKZN) MATH236 Semester 1, 2013 4 / 20

slide-5
SLIDE 5

Pigeonhole Principle

Increasing and decreasing sequences

Definition Let a1, a2, · · · , ak be a sequence of real numbers A subsequence is a sequence of the form ai1, ai2, · · · , ait where i1 < i2 < · · · < it The sequence a1, a2, · · · , ak is increasing if a1 ≤ a2 ≤ · · · ≤ ak The sequence a1, a2, · · · , ak is decreasing if a1 ≥ a2 ≥ · · · ≥ ak

Tong-Viet (UKZN) MATH236 Semester 1, 2013 5 / 20

slide-6
SLIDE 6

Pigeonhole Principle

Example

Example Consider the sequence 7, 1, 2, 8, 4, 9, 5, 6, 3. Then 1, 2, 6, 3 is a subsequence But 1, 2, 7, 8 is NOT a subsequence The sequence 1, 2, 8, 9 is increasing The sequence 8, 4, 3 is decreasing

Tong-Viet (UKZN) MATH236 Semester 1, 2013 6 / 20

slide-7
SLIDE 7

Pigeonhole Principle

Erd¨

  • s-Szekeres Theorem

Theorem Every sequence a1, a2, · · · , an2+1 of n2 + 1 real numbers contains an increasing subsequence of length n + 1 or a decreasing subsequence of length n + 1.

Tong-Viet (UKZN) MATH236 Semester 1, 2013 7 / 20

slide-8
SLIDE 8

Pigeonhole Principle

Proof of Erd¨

  • s-Szekeres Theorem

Proof. Suppose that there is no increasing subsequence of length n + 1 We will show that there exists a subsequence of length n + 1 which is decreasing For each k ∈ {1, 2, · · · , n2 + 1}, let ℓk be the length of a longest increasing subsequence beginning with ak By our assumption, each ℓk is one of the numbers 1, 2 · · · , n.

Tong-Viet (UKZN) MATH236 Semester 1, 2013 8 / 20

slide-9
SLIDE 9

Pigeonhole Principle

Proof of Erd¨

  • s-Szekeres Theorem

Proof. By the Strong Pigeonhole Principle, we know that n + 1 of these numbers ℓk are equal Assume these numbers are ℓk1, ℓk2, · · · , ℓkn+1 We can also assume that k1 < k2 < · · · < kn+1 We now claim that ak1 ≥ ak2 ≥ · · · ≥ akn+1

Tong-Viet (UKZN) MATH236 Semester 1, 2013 9 / 20

slide-10
SLIDE 10

Pigeonhole Principle

Proof of Erd¨

  • s-Szekeres Theorem

Proof. Suppose to the contrary that, there is some integer i ∈ {1, 2, · · · , n} such that aki < aki+1 Consider a sequence beginning with aii and then taking a longest increasing subsequence starting at aki+1 we then obtain a subsequence beginning at aii of length greater than ℓki+1 this implies that ℓki > ℓki+1, a contradiction Hence, ak1 ≥ ak2 ≥ · · · ≥ akn+1 Thus ak1, ak2, · · · , akn+1 is a decreasing subsequence of length n + 1 as required.

Tong-Viet (UKZN) MATH236 Semester 1, 2013 10 / 20

slide-11
SLIDE 11

One-to-one functions and permutation One-to-one functions

One-to-one functions

Definition Recall that a function is a relation in which each element of the domain is related to exactly one element of the range A function f is called a one-to-one or an injection if no two elements

  • f its domain are related to the same element of its range,

that is, x = y implies that f (x) = f (y) If f is one-to-one, then the relation f −1 = {(b, a) : (a, b) ∈ f } is also a function Conversely, if f is not one-to-one, then f −1 is not a function If f is an injection, then f −1 is called the inverse function of f

Tong-Viet (UKZN) MATH236 Semester 1, 2013 11 / 20

slide-12
SLIDE 12

One-to-one functions and permutation One-to-one functions

Examples

Let f1 = {(1, a), (2, c), (3, b)} and f2 = {(1, a), (2, b), (3, b)} Both f1 and f2 are functions f1 is one-to-one but f2 is NOT one-to-one (b is related to both 2 and 3) f −1

1

= {(a, 1), (c, 2), (b, 3)}

Tong-Viet (UKZN) MATH236 Semester 1, 2013 12 / 20

slide-13
SLIDE 13

One-to-one functions and permutation One-to-one functions

Examples

The relation f3 = {(x, x4 + 1) : x ∈ R} is a function. However, both (1, 2) and (−1, 2) are members of f3, so f3 is not

  • ne-to-one

The relation f4 = {(x, 5x + 2) : x ∈ R} is one-to-one. f −1

4

= {(x, (x − 2)/5) : x ∈ R}

Tong-Viet (UKZN) MATH236 Semester 1, 2013 13 / 20

slide-14
SLIDE 14

One-to-one functions and permutation Permutations

Definition of permutations

Definition Let S be a nonempty set. A permutation of S is a one-to-one function whose domain and range are S. Example Let S = {1, 2, 3} Let f be a function on S with f (1) = 1, f (2) = 3 and f (3) = 2. Then f is a permutation on S since it is a one-to-one function from S to S This permutation can be written in the form f = 1 2 3 1 3 2

  • Tong-Viet (UKZN)

MATH236 Semester 1, 2013 14 / 20

slide-15
SLIDE 15

One-to-one functions and permutation Permutations

Permuations

The top row of the matrix is the domain the bottom row is the range In general, the permutation has the form: f =

  • 1

2 3 f (1) f (2) f (3)

  • Tong-Viet (UKZN)

MATH236 Semester 1, 2013 15 / 20

slide-16
SLIDE 16

One-to-one functions and permutation Permutations

Permutations

There are six permutations of a set of three elements. f1 = 1 2 3 1 2 3

  • f2 =

1 2 3 2 3 1

  • f3 =

1 2 3 3 1 2

  • f4 =

1 2 3 1 3 2

  • f5 =

1 2 3 3 2 1

  • f6 =

1 2 3 2 1 3

  • Tong-Viet (UKZN)

MATH236 Semester 1, 2013 16 / 20