Cardinality of a Set We use three different notations for the number - - PowerPoint PPT Presentation

cardinality of a set
SMART_READER_LITE
LIVE PREVIEW

Cardinality of a Set We use three different notations for the number - - PowerPoint PPT Presentation

Cardinality of a Set We use three different notations for the number of elements in a finite set: Alan H. SteinUniversity of Connecticut Cardinality of a Set We use three different notations for the number of elements in a finite set: n (


slide-1
SLIDE 1

Cardinality of a Set

We use three different notations for the number of elements in a finite set:

Alan H. SteinUniversity of Connecticut

slide-2
SLIDE 2

Cardinality of a Set

We use three different notations for the number of elements in a finite set:

◮ n(A)

Alan H. SteinUniversity of Connecticut

slide-3
SLIDE 3

Cardinality of a Set

We use three different notations for the number of elements in a finite set:

◮ n(A) ◮ |A|

Alan H. SteinUniversity of Connecticut

slide-4
SLIDE 4

Cardinality of a Set

We use three different notations for the number of elements in a finite set:

◮ n(A) ◮ |A| ◮ #A

Alan H. SteinUniversity of Connecticut

slide-5
SLIDE 5

Inclusion-Exclusion Principle

Theorem (Inclusion-Exclusion Principle)

|A ∪ B| = |A| + |B| − |A ∩ B|

Alan H. SteinUniversity of Connecticut

slide-6
SLIDE 6

Inclusion-Exclusion Principle

Theorem (Inclusion-Exclusion Principle)

|A ∪ B| = |A| + |B| − |A ∩ B| This is almost self-evident, since if want to find the number of elements in the union and we add the number of elements in each

  • f the two sets, we will have counted the elements in the

intersection twice.

Alan H. SteinUniversity of Connecticut

slide-7
SLIDE 7

Inclusion-Exclusion Principle

Theorem (Inclusion-Exclusion Principle)

|A ∪ B| = |A| + |B| − |A ∩ B| This is almost self-evident, since if want to find the number of elements in the union and we add the number of elements in each

  • f the two sets, we will have counted the elements in the

intersection twice. This is really a special case of a more general Inclusion-Exclusion Principle which may be used to find the cardinality of the union of more than two sets.

Alan H. SteinUniversity of Connecticut

slide-8
SLIDE 8

Inclusion-Exclusion Principle

Theorem (Inclusion-Exclusion Principle)

|A ∪ B| = |A| + |B| − |A ∩ B| This is almost self-evident, since if want to find the number of elements in the union and we add the number of elements in each

  • f the two sets, we will have counted the elements in the

intersection twice.

slide-9
SLIDE 9

Fundamental Principle of Counting

Theorem (Fundamental Principle of Counting)

If we have to make a sequence of choices for which the first choice can be made in n1 ways, the second choice can be made in n2 ways, the third choice can be made in n3 ways, and so on, then the entire sequence of choices can be made in n1 · n2 · n3 · . . . ways.

Alan H. SteinUniversity of Connecticut

slide-10
SLIDE 10

Fundamental Principle of Counting

Theorem (Fundamental Principle of Counting)

If we have to make a sequence of choices for which the first choice can be made in n1 ways, the second choice can be made in n2 ways, the third choice can be made in n3 ways, and so on, then the entire sequence of choices can be made in n1 · n2 · n3 · . . . ways. Example: There are 36 ways of rolling a pair of dice, since there are 6 ways the first die can come out and 6 ways the second can come out, so there are 6 · 6 = 36 ways the two dice can come out.

Alan H. SteinUniversity of Connecticut

slide-11
SLIDE 11

Fundamental Principle of Counting

slide-12
SLIDE 12

Combinations and Permutations

Definition (Combination)

A combination is a subset.

Alan H. SteinUniversity of Connecticut

slide-13
SLIDE 13

Combinations and Permutations

Definition (Combination)

A combination is a subset.

Definition (Permutation)

A permutation is a list or arrangement of elements chosen from some set. Permutations may be either with replacement or without replacement.

Alan H. SteinUniversity of Connecticut

slide-14
SLIDE 14

Combinations and Permutations

Definition (Combination)

A combination is a subset.

Definition (Permutation)

A permutation is a list or arrangement of elements chosen from some set. Permutations may be either with replacement or without

  • replacement. In a permutation with replacement, there may be

repetitions of elements within an arrangement.

Alan H. SteinUniversity of Connecticut

slide-15
SLIDE 15

Combinations and Permutations

Definition (Combination)

A combination is a subset.

Definition (Permutation)

A permutation is a list or arrangement of elements chosen from some set. Permutations may be either with replacement or without

  • replacement. In a permutation with replacement, there may be

repetitions of elements within an arrangement. In a permutation without replacement, no such repetitions may occur.

Alan H. SteinUniversity of Connecticut

slide-16
SLIDE 16

Examples

For example, if we shuffle a deck of cards and, one at a time, choose five cards and write down the cards we have chosen, in

  • rder, we have a permutation without replacement of length five

chosen from a set of size 52.

Alan H. SteinUniversity of Connecticut

slide-17
SLIDE 17

Examples

For example, if we shuffle a deck of cards and, one at a time, choose five cards and write down the cards we have chosen, in

  • rder, we have a permutation without replacement of length five

chosen from a set of size 52. On the other hand, if we choose five cards from a deck, but each time we choose a card we then put it back into the deck, so that it can be chosen again, we get a permutation with replacement of length five chosen from a set of size 52.

Alan H. SteinUniversity of Connecticut

slide-18
SLIDE 18

Examples

For example, if we shuffle a deck of cards and, one at a time, choose five cards and write down the cards we have chosen, in

  • rder, we have a permutation without replacement of length five

chosen from a set of size 52. On the other hand, if we choose five cards from a deck, but each time we choose a card we then put it back into the deck, so that it can be chosen again, we get a permutation with replacement of length five chosen from a set of size 52. Permutations will generally be assumed to be without replacement unless either the context implies they are with replacement or it is specifically stated that they are with replacement.

Alan H. SteinUniversity of Connecticut

slide-19
SLIDE 19

Examples

For example, if we shuffle a deck of cards and, one at a time, choose five cards and write down the cards we have chosen, in

  • rder, we have a permutation without replacement of length five

chosen from a set of size 52. On the other hand, if we choose five cards from a deck, but each time we choose a card we then put it back into the deck, so that it can be chosen again, we get a permutation with replacement of length five chosen from a set of size 52. Permutations will generally be assumed to be without replacement unless either the context implies they are with replacement or it is specifically stated that they are with replacement. Many sample spaces which generate equiprobable spaces contain either combinations or permutations of elements of other sets.

Alan H. SteinUniversity of Connecticut

slide-20
SLIDE 20

Notation

The number of combinations of size k chosen from a set of size n will be denoted by C(n, k), nCk, Cn,k or n

k

  • .

Alan H. SteinUniversity of Connecticut

slide-21
SLIDE 21

Notation

The number of combinations of size k chosen from a set of size n will be denoted by C(n, k), nCk, Cn,k or n

k

  • .

The number of permutations (without replacement) of length k chosen from a set of n elements is denoted by P(n, k), nPk or Pn,k.

Alan H. SteinUniversity of Connecticut

slide-22
SLIDE 22

Notation

The number of combinations of size k chosen from a set of size n will be denoted by C(n, k), nCk, Cn,k or n

k

  • .

The number of permutations (without replacement) of length k chosen from a set of n elements is denoted by P(n, k), nPk or Pn,k. There is no special notation for the number of permutations with replacement.

Alan H. SteinUniversity of Connecticut

slide-23
SLIDE 23

Counting Permutations With Replacement

From the Fundamental Principle of Counting,

Alan H. SteinUniversity of Connecticut

slide-24
SLIDE 24

Counting Permutations With Replacement

From the Fundamental Principle of Counting, if we choose k elements from a set of size n, with replacement,

Alan H. SteinUniversity of Connecticut

slide-25
SLIDE 25

Counting Permutations With Replacement

From the Fundamental Principle of Counting, if we choose k elements from a set of size n, with replacement, each of the elements can be chosen in n ways,

Alan H. SteinUniversity of Connecticut

slide-26
SLIDE 26

Counting Permutations With Replacement

From the Fundamental Principle of Counting, if we choose k elements from a set of size n, with replacement, each of the elements can be chosen in n ways, so the sequence of elements can be chosen in n · n · n · · · · · n = nk ways.

Alan H. SteinUniversity of Connecticut

slide-27
SLIDE 27

Counting Permutations With Replacement

From the Fundamental Principle of Counting, if we choose k elements from a set of size n, with replacement, each of the elements can be chosen in n ways, so the sequence of elements can be chosen in n · n · n · · · · · n = nk ways. We thus easily see the number of permutations, with replacement,

  • f length k chosen from a set of size n is nk.

Alan H. SteinUniversity of Connecticut

slide-28
SLIDE 28

Counting Permutations Without Replacement

If we choose k elements from a set of size n, with replacement,

Alan H. SteinUniversity of Connecticut

slide-29
SLIDE 29

Counting Permutations Without Replacement

If we choose k elements from a set of size n, with replacement, the first of the elements can be chosen in n ways.

Alan H. SteinUniversity of Connecticut

slide-30
SLIDE 30

Counting Permutations Without Replacement

If we choose k elements from a set of size n, with replacement, the first of the elements can be chosen in n ways. When we go to choose the second element, there is one less item to choose from,

Alan H. SteinUniversity of Connecticut

slide-31
SLIDE 31

Counting Permutations Without Replacement

If we choose k elements from a set of size n, with replacement, the first of the elements can be chosen in n ways. When we go to choose the second element, there is one less item to choose from, so the second element can be chosen in only n − 1 ways.

Alan H. SteinUniversity of Connecticut

slide-32
SLIDE 32

Counting Permutations Without Replacement

If we choose k elements from a set of size n, with replacement, the first of the elements can be chosen in n ways. When we go to choose the second element, there is one less item to choose from, so the second element can be chosen in only n − 1 ways. Similarly, the third element can be chosen in n − 2 ways,

Alan H. SteinUniversity of Connecticut

slide-33
SLIDE 33

Counting Permutations Without Replacement

If we choose k elements from a set of size n, with replacement, the first of the elements can be chosen in n ways. When we go to choose the second element, there is one less item to choose from, so the second element can be chosen in only n − 1 ways. Similarly, the third element can be chosen in n − 2 ways, the fourth in n − 3 ways,

Alan H. SteinUniversity of Connecticut

slide-34
SLIDE 34

Counting Permutations Without Replacement

If we choose k elements from a set of size n, with replacement, the first of the elements can be chosen in n ways. When we go to choose the second element, there is one less item to choose from, so the second element can be chosen in only n − 1 ways. Similarly, the third element can be chosen in n − 2 ways, the fourth in n − 3 ways, and so on until we get to the last, or kth element,

Alan H. SteinUniversity of Connecticut

slide-35
SLIDE 35

Counting Permutations Without Replacement

If we choose k elements from a set of size n, with replacement, the first of the elements can be chosen in n ways. When we go to choose the second element, there is one less item to choose from, so the second element can be chosen in only n − 1 ways. Similarly, the third element can be chosen in n − 2 ways, the fourth in n − 3 ways, and so on until we get to the last, or kth element, which can be chosen in n − [k − 1] ways.

Alan H. SteinUniversity of Connecticut

slide-36
SLIDE 36

Counting Permutations Without Replacement

If we choose k elements from a set of size n, with replacement, the first of the elements can be chosen in n ways. When we go to choose the second element, there is one less item to choose from, so the second element can be chosen in only n − 1 ways. Similarly, the third element can be chosen in n − 2 ways, the fourth in n − 3 ways, and so on until we get to the last, or kth element, which can be chosen in n − [k − 1] ways. We thus get P(n, k) = n(n − 1)(n − 2) . . . (n − [k − 1]).

Alan H. SteinUniversity of Connecticut

slide-37
SLIDE 37

Factorial Notation

The formula for counting permutations can be rewritten without the use of ellipses through the use of factorial notation.

Alan H. SteinUniversity of Connecticut

slide-38
SLIDE 38

Factorial Notation

The formula for counting permutations can be rewritten without the use of ellipses through the use of factorial notation.

Definition (Factorial Notation)

For any positive integer n, we define n! = n(n − 1)(n − 2) . . . 3 · 2 · 1.

Alan H. SteinUniversity of Connecticut

slide-39
SLIDE 39

Factorial Notation

The formula for counting permutations can be rewritten without the use of ellipses through the use of factorial notation.

Definition (Factorial Notation)

For any positive integer n, we define n! = n(n − 1)(n − 2) . . . 3 · 2 · 1. For example, 1! = 1,

Alan H. SteinUniversity of Connecticut

slide-40
SLIDE 40

Factorial Notation

The formula for counting permutations can be rewritten without the use of ellipses through the use of factorial notation.

Definition (Factorial Notation)

For any positive integer n, we define n! = n(n − 1)(n − 2) . . . 3 · 2 · 1. For example, 1! = 1, 2! = 2 · 1,

Alan H. SteinUniversity of Connecticut

slide-41
SLIDE 41

Factorial Notation

The formula for counting permutations can be rewritten without the use of ellipses through the use of factorial notation.

Definition (Factorial Notation)

For any positive integer n, we define n! = n(n − 1)(n − 2) . . . 3 · 2 · 1. For example, 1! = 1, 2! = 2 · 1, 3! = 3 · 2 · 1,

Alan H. SteinUniversity of Connecticut

slide-42
SLIDE 42

Factorial Notation

The formula for counting permutations can be rewritten without the use of ellipses through the use of factorial notation.

Definition (Factorial Notation)

For any positive integer n, we define n! = n(n − 1)(n − 2) . . . 3 · 2 · 1. For example, 1! = 1, 2! = 2 · 1, 3! = 3 · 2 · 1, . . . 6! = 6 · 5 · 4 · 3 · 2 · 1.

Alan H. SteinUniversity of Connecticut

slide-43
SLIDE 43

Permutations

As a result of the cancellation law, if n and k are integers with 0 ≤ k < n,

Alan H. SteinUniversity of Connecticut

slide-44
SLIDE 44

Permutations

As a result of the cancellation law, if n and k are integers with 0 ≤ k < n, n! (n − k)! = n · (n − 1) · (n − 2) . . . (n − [k − 1]) (n − k)(n − k − 1) . . . 3 · 2 · 1 (n − k)(n − k − 1) . . . 3 · 2 · 1 = n · (n − 1) · (n − 2) . . . (n − [k − 1]) = P(n, k).

Alan H. SteinUniversity of Connecticut

slide-45
SLIDE 45

Permutations

As a result of the cancellation law, if n and k are integers with 0 ≤ k < n, n! (n − k)! = n · (n − 1) · (n − 2) . . . (n − [k − 1]) (n − k)(n − k − 1) . . . 3 · 2 · 1 (n − k)(n − k − 1) . . . 3 · 2 · 1 = n · (n − 1) · (n − 2) . . . (n − [k − 1]) = P(n, k). This gives the alternate formula P(n, k) = n! (n − k)! if n is a positive integer and k < n.

Alan H. SteinUniversity of Connecticut

slide-46
SLIDE 46

0!

If k = n, then P(n, n) = n!,

Alan H. SteinUniversity of Connecticut

slide-47
SLIDE 47

0!

If k = n, then P(n, n) = n!, and this will equal n! (n − k)! = n! 0! if we define 0! = 1.

Alan H. SteinUniversity of Connecticut

slide-48
SLIDE 48

0!

If k = n, then P(n, n) = n!, and this will equal n! (n − k)! = n! 0! if we define 0! = 1. We therefore make the special definition 0! = 1, so that the formula P(n, k) = n! (n − k)! holds whenever n is a positive integer and 0 ≤ k ≤ n.

Alan H. SteinUniversity of Connecticut

slide-49
SLIDE 49

Counting Combinations

Suppose we have a combination of k elements.

Alan H. SteinUniversity of Connecticut

slide-50
SLIDE 50

Counting Combinations

Suppose we have a combination of k elements. There are P(k, k) = k! ways of arranging those elements.

Alan H. SteinUniversity of Connecticut

slide-51
SLIDE 51

Counting Combinations

Suppose we have a combination of k elements. There are P(k, k) = k! ways of arranging those elements. In other words, every combination of k elements chosen from a set

  • f size n gives rise to k! different permutations of those elements

Alan H. SteinUniversity of Connecticut

slide-52
SLIDE 52

Counting Combinations

Suppose we have a combination of k elements. There are P(k, k) = k! ways of arranging those elements. In other words, every combination of k elements chosen from a set

  • f size n gives rise to k! different permutations of those elements

and thus the number of permutations must be k! times the number of combinations.

Alan H. SteinUniversity of Connecticut

slide-53
SLIDE 53

Counting Combinations

Suppose we have a combination of k elements. There are P(k, k) = k! ways of arranging those elements. In other words, every combination of k elements chosen from a set

  • f size n gives rise to k! different permutations of those elements

and thus the number of permutations must be k! times the number of combinations. In other words, P(n, k) = k!C(n, k).

Alan H. SteinUniversity of Connecticut

slide-54
SLIDE 54

Counting Combinations

Suppose we have a combination of k elements. There are P(k, k) = k! ways of arranging those elements. In other words, every combination of k elements chosen from a set

  • f size n gives rise to k! different permutations of those elements

and thus the number of permutations must be k! times the number of combinations. In other words, P(n, k) = k!C(n, k). Since P(n, k) = n! (n − k)!, pause we get C(n, k) = P(n, k) k! =

n! (n−k)!

k! = n! k!(n − k)!.

Alan H. SteinUniversity of Connecticut

slide-55
SLIDE 55

Counting Combinations

Suppose we have a combination of k elements. There are P(k, k) = k! ways of arranging those elements. In other words, every combination of k elements chosen from a set

  • f size n gives rise to k! different permutations of those elements

and thus the number of permutations must be k! times the number of combinations. In other words, P(n, k) = k!C(n, k). Since P(n, k) = n! (n − k)!, pause we get C(n, k) = P(n, k) k! =

n! (n−k)!

k! = n! k!(n − k)!. We thus get the formula C(n, k) = n! k!(n − k)!,

Alan H. SteinUniversity of Connecticut

slide-56
SLIDE 56

Counting Combinations

Suppose we have a combination of k elements. There are P(k, k) = k! ways of arranging those elements. In other words, every combination of k elements chosen from a set

  • f size n gives rise to k! different permutations of those elements

and thus the number of permutations must be k! times the number of combinations. In other words, P(n, k) = k!C(n, k). Since P(n, k) = n! (n − k)!, pause we get C(n, k) = P(n, k) k! =

n! (n−k)!

k! = n! k!(n − k)!. We thus get the formula C(n, k) = n! k!(n − k)!, and this holds even when n = 0, k = 0 or k = n.

Alan H. SteinUniversity of Connecticut