Loading in 2 Seconds...

How many ways are there to pass through city A where the arrows represent one-way streets?

Loading in 2 Seconds...

- 282 Views
- Uploaded on

Download Presentation
## PowerPoint Slideshow about 'How many ways are there to pass through city A where the arrows represent one-way streets?' - ostinmannual

**An Image/Link below is provided (as is) to download presentation**

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript

How many ways are there to pass through city A where the arrows represent one-way streets? Answer: mn ways

- The counting principal: Suppose two experiments are to be performed. If experiment 1 can result in any of m possible outcomes and if for each of these outcomes of experiment 1, there are n possible outcomes of experiment 2, then together there are mn possible outcomes of the two experiments.
- The counting principal is also called the product rule.

m roads

A

...

n roads

...

Generalized Counting Principal

- If r experiments that are to be performed are such that the first one may result in any of n1 possible outcomes, and if for each of these n1 outcomes there are n2 possible outcomes of the second experiment, and if for each of the possible outcomes of the first two experiments there n3 possible outcomes of the third experiment, etc., then there is a total of possible outcomes of the r experiments.
- Example. How many different 7-place license plates are possible if the first 3 places are to be occupied by letters and the final 4 by numbers?

How many “words” of length three can be formed from the letters a, b, c, d, and e if letters can be repeated? Solution. There 5 choices for the first letter, 5 choices for the second letter, and 5 choices for the third letter. Thus, the number of “words” is 53 = 125.

- Theorem. The number of ordered arrangements of n distinct objects of size r, 1 r n, where repetition is allowed is given by nr.
- Example. The latter theorem implies that b distinguishable balls can be distributed into u distinguishable urns in ub ways. Note that “distinguishable balls” can be interpreted as saying that the balls are ordered.

b blanks to be filled with labels 1 to u

Triplets of nucleotides in DNA

- A description of the structure of a DNA molecule can be found at: http://www.accessexcellence.org/RC/VL/GG/nucleotide2.html
- A nucleotide is represented by one of the letters in the set {A,T,C,G}. A codon is defined to be a triplet of nucleotides. The order of the nucleotides in a codon is significant, and nucleotides can be repeated. These codons determine which amino acid is to be made.
- How many different codons are possible? How does this relate to the fact that there are only twenty amino acids?

Given a collection of n distinct objects, any ordered arrangement of these objects without repetition is called a permutation of the collection. If only r of the objects, 1 r n, are to be used in the ordered arrangement, then we have an r-element permutation.

- How many ways of listing three letters chosen from the collection a, b, c, d, and e are there? (Assume that no letter can be repeated.) That is, we are asked to find the number of permutations of size 3 for this collection of letters. Solution. We have 5 choices for the first element in the list. This leaves 4 choices for the second element. Once the first two are chosen, there are 3 choices remaining for the third element. This qualifies for the product rule since the number of choices only depends on the stage of the process and not on the particular letters which have been chosen. Thus, there are (5)(4)(3) = 60 ways to list three letters.

For any integer n 0, n factorial is defined by 0! = 1 n! = (n)(n-1)(n-2) … (3)(2)(1), for n 1.

- Note that n! grows very rapidly. Beware of arithmetic overflow if you try to calculate factorials explicitly on a calculator.
- Theorem. The number of r-element permutations of n objects is denoted by nPr and it equals
- Corollary. If r = n, then we have that the number of permutations of n objects is n!

Example. Suppose 3 distinguishable balls are to be distributed into 5 distinguishable urns in such a way that each urn contains at most one ball. This can be done in 5!/2! ways.

- Problem. How many distinct anagrams of the word BALL are there? If we treat the two L’s as distinct objects, we have 4! permutations of the four letters. However, the two L’s are not distinct and some of the permutations will correspond to the same anagram. In fact, there will be two permutations for every distinct anagram. We have 2(number of distinct anagrams) = (number of permutations of B, A, L1, L2). Thus, the number of distinct anagrams = 4!/2 = 12.

3 blanks (for balls) to be filled with labels 1 to 5 (for urns). This give us the permutations of 5 labels of size 3.

How many distinct anagrams are there of the word BANANA? There are 6! permutations of the six letters where all letters are considered distinct. However, the two N’s are not distinct and the three A’s are not distinct. There are 2! ways to order the N’s and there are 3! ways to order the A’s. Thus, (2!)(3!)(Number of distinct anagrams of BANANA) = (Number of permutations of B, A1, N1, A2 ,N2 , A3).

- Theorem. If there are n objects with n1 of the first type, n2 of the second type, …, and nr of an rth type, where n1 + n2 + … + nr = n, then there are ordered arrangements of the given objects where objects of the same type are indistinguishable. Note: These ordered arrangements are again called permutations (with indistinguishable objects)

Recall that the number of permutations of n distinct objects of size r is n!/(n-r)! If we don’t care about the order of the objects chosen, then we are asking for the number of subsets of size r chosen from the n objects. We see that each such subset can be ordered in r! ways. Thus, we have Such a subset of size r is also called a combination, and the number of possible combinations of size r chosen from n distinct objects is denoted by or by nCr .

- Theorem.

Problem. How many thirteen card bridge hands chosen from an ordinary deck of 52 cards are there? Since we don’t care about the order in which the cards are received, we want the number of combinations, = 635,013,559,600.

- In order to see a connection between the number of permutations with two groups of indistinguishable objects and , suppose that we have ten objects lined up as and then we distribute 4 labels I (for “in the set”) and 6 labels N (for “not in the set”) in the ten spaces occupied by the objects. We can count this as or as permutations with indistinguishable objects Of course, these two values are the same.

In the expansion of the n terms (x+y)(x+y)(x+y)…(x+y) , we may choose x from n-i of the terms, and y from the remaining i terms to form a xn-iyi. We don’t care about the order in which the terms are chosen, so the number of ways to form the term xn-iyi is . Thus, The latter result is known as The Binomial Theorem and it has a generalization called the Multinomial Theorem.

- Examples.
- The quantities are also called binomial coefficients.

- If n1 + n2 + … + nr = n, we define
- As shown in the textbook, represents the number of possible divisions of n distinct objects into r distinct groups of respective sizes n1, n2 , … nr.
- From previous work, we know that also represents a permutation. The connection between the two interpretations can be made by considering r types of labels for the n objects.

Using the multinomial coefficients.

- (x1+ x2+ x3)2 =
- Problem. If 12 distinguishable balls are to be placed into 3 distinguishable urns in such a way that each urn has 4 balls, how many ways can this be done?

The number of integer solutions of equations

- Suppose we have n indistinguishable balls and r distinguishable urns. How many ways are there to distribute the balls into the urns (where some urns may be empty)? This is readily seen to be equivalent to finding the number of distinct nonnegative integer-valued vectors (x1, x2, ... , xr) such that x1+ x2+ ... + xr = n.
- To solve this problem with “nonnegative” replaced by “positive”, imagine that the n indistinguishable objects are lined up and that we want to divide them into r nonempty groups. To count the number of ways this can be done, we select r – 1 of the n – 1 spaces between adjacent objects as the dividing points (see below).

The number of integer solutions of equations, continued

- Theorem. There are
- By making a simple change of variable we obtain: Theorem. There are
- Example. There are 2 positive integer-valued vectors satisfying x1 + x2 = 3.

- Suppose 12 indistinguishable balls are to be placed in 3 distinguishable urns with no urn left empty. The number of ways to do this is 55. Do you see why?
- Suppose 12 indistinguishable balls are to be placed in 3 distinguishable urns with some urns possibly empty. There are 91 ways to do this. Do you see why?
- Suppose an urn contains 11 distinguishable balls and a sample of 3 balls is to be selected (without replacement). How many different samples are there if (a) the order in which the balls are drawn is important? (b) the order in which the balls are drawn is not important?
- Tree diagrams provide a pictorial way to represent the possible cases in a counting problem.

Two ways to count the same set of objects

- Often there are two ways to count the same set of objects and this leads to an interesting result since the two ways must give the same answer. This is known as a combinatorial argument.
- Problem. How many subsets of a given set with n elements are there (include the empty set and the given set)? • One way to count: Fill n blanks with one of two possible labels, I or N, for “in the set” or “not in the set”: __ __ __ ... __ Clearly, there are 2n ways to do this since order matters. • Second way to count: Add number of subsets of size k, k = 0,1, ..., n to get the total number of ways. • Setting these two ways of counting equal we have:
- Note that the latter equality also follows from the binomial thm. Do you see how? Also, the set of all subsets of a given set A is called the power set of A.

Stirling's Formula

- To estimate n! for large values of n, we use
- Example. By Stirling's formula,

Download Presentation

Connecting to Server..