Counting: Discrete Structures

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

Count the number of strings of length 9 over the alphabet {a, b, c} subject to each of the following restrictions. The first character is the same as the last character, or the last character is a, or the first character is a.

Define the following sets: A: strings of length 9 in which the first and last characters are the same. B: strings of length 9 in which the first character is a. C: strings of length 9 in which the last character is a. Here are the sizes of the sets needed to apply the inclusion-exclusion principle: |A| = 38 because the first 8 characters can be any characters from the set {a, b, c} and once the first character is determined, the last character must match the first character. |B| = 38 because the first character must be a and the last 8 characters can be any character from the set {a, b, c}. |C| = 38 because the last character must be a and the first 8 characters can be any character from the set {a, b, c}. The sets A ∩ B, A ∩ C, B ∩ C, and A ∩ B ∩ C are all equal because they consist of the strings that begin and end with the character a and have no other restrictions on the other 7 characters. |A ∩ B| = 37. Now to apply the inclusion-exclusion principle: |A ∪ B ∪ C| = |A| + |B| + |C| - |A ∩ B| - |A ∩ C| - |B ∩ C| + |A ∩ B ∩ C| = 3^8 + 3^8 + 3^8 - 3^7 - 3^7 - 3^7 + 3^7 = 3·3^8 - 2·3^7 = 3^9 - 2·3^7.

Count the number of strings of length 9 over the alphabet {a, b, c} subject to each of the following restrictions. The string contains at least seven consecutive a's.

Define the following sets: A: strings of the form aaaaaaa**. B: strings of the form *aaaaaaa*. C: strings of the form **aaaaaaa. Here are the sizes of the sets needed to apply the inclusion-exclusion principle: |A| = |B| = |C| = 32 because seven of the characters are determined and the other two have no restrictions. A ∩ B is the set of strings of the form aaaaaaaa* of which there are 3. A ∩ C is the set of strings of the form aaaaaaaaa of which there is 1. B ∩ C is the set of strings of the form *aaaaaaaa of which there are 3. A ∩ B ∩ C is the set of strings of the form aaaaaaaaa of which there is 1. Now to apply the inclusion-exclusion principle: |A ∪ B ∪ C| = |A| + |B| + |C| - |A ∩ B| - |A ∩ C| - |B ∩ C| + |A ∩ B ∩ C| = 3^2 + 3^2 + 3^2 - 3 - 1 - 3 + 1 = 21.

Count the number of strings of length 9 over the alphabet {a, b, c} subject to each of the following restrictions. The characters in the string "abababa" appear consecutively somewhere in the 9-character string. (So "ccabababa" would be such a 9-character string, but "cababcaba" would not.)

Define the following sets: A: strings of the form abababa**. B: strings of the form *abababa*. C: strings of the form **abababa. Here are the sizes of the sets needed to apply the inclusion-exclusion principle: |A| = |B| = |C| = 32 because seven of the characters are determined and the other two have no restrictions. A ∩ B = ∅ because the strings in A have "b" as their second character and the strings in B have "a" as their second character. A ∩ C is the set of strings of the form ababababa of which there is 1. B ∩ C = ∅ because the strings in B have "a" as their second-to-last character and the strings in C have "b" as their second-to-last character. A ∩ B ∩ C = ∅ because if A ∩ B = ∅, then A ∩ B ∩ C = ∅. Now to apply the inclusion-exclusion principle: |A ∪ B ∪ C| = |A| + |B| + |C| - |A ∩ B| - |A ∩ C| - |B ∩ C| + |A ∩ B ∩ C| = 3^2 + 3^2 + 3^2 - 1 = 26.

Count the number of strings of length 9 over the alphabet {a, b, c} subject to each of the following restrictions. The string has exactly 2 a's or exactly 3 b's.

Define the following sets: A: strings with exactly two a's. B: strings with exactly three b's. Here are the sizes of the sets needed to apply the inclusion-exclusion principle: |A| = 2^7*C(9, 2). There are C(9, 2) ways to select the locations for the a's. The remaining 7 characters can be either b or c. |B| = 2^6* C(9, 3). There are C(9, 3) ways to select the locations for the b's. The remaining 6 characters can be either a or c. |A ∩ B| = C(9, 2) * C(7, 3). There are C(9, 2) ways to select the locations for the a's. Once the a's have been placed, there are C(7, 3) ways to select the locations for the b's. Then the rest of the locations must contain c. Now to apply the inclusion-exclusion principle: |A∪B|=|A|+|B|−|A∩B|=2^7* C(9, 2) + 2^6 * C(9, 3) − C(9, 2) * C(7, 3).

Count the number of strings of length 9 over the alphabet {a, b, c} subject to each of the following restrictions. The string has exactly 2 a's or exactly 2 b's or exactly 2 c's

Define the following sets: A: strings with exactly two a's. B: strings with exactly two b's. C: strings with exactly two c's. Here are the sizes of the sets needed to apply the inclusion-exclusion principle: |A| = 2^7 * C(9, 2). There are C(9, 2) ways to select the locations for the a's. The remaining 7 characters can be either b or c. |B| = |C| = 2^7 * C(9, 2), using similar arguments. |A ∩ B| = C(9, 2) * C(7, 2). There are C(9, 2) ways to select the locations for the a's. Once the a's have been placed, there are C(7, 2) ways to select the locations for the b's. Then the rest of the locations must contain c. |A ∩ C| = |B ∩ C| = C(9, 2) * C(7, 2), using similar arguments A ∩ B ∩ C = ∅. A string of length 9 can not contain 2 a's, 2 b's, and 2 c's, because there must be at least 9 characters and the only choices are a's, b's and c's. Now to apply the inclusion-exclusion principle: |A∪B∪C|=|A|+|B|+|C|−|A∩B|−|A∩C|−|B∩C|+|A∩B∩C|= 3⋅2^7Define the following sets: A: strings with exactly two a's. B: strings with exactly two b's. C: strings with exactly two c's. Here are the sizes of the sets needed to apply the inclusion-exclusion principle: |A| = 27(92). There are (92) ways to select the locations for the a's. The remaining 7 characters can be either b or c. |B| = |C| = 27(92), using similar arguments. |A ∩ B| = (92)(72). There are (92) ways to select the locations for the a's. Once the a's have been placed, there are (72) ways to select the locations for the b's. Then the rest of the locations must contain c. |A ∩ C| = |B ∩ C| = (92)(72), using similar arguments A ∩ B ∩ C = ∅. A string of length 9 can not contain 2 a's, 2 b's, and 2 c's, because there must be at least 9 characters and the only choices are a's, b's and c's. Now to apply the inclusion-exclusion principle: |A∪B∪C|=|A|+|B|+|C|−|A∩B|−|A∩C|−|B∩C|+|A∩B∩C|= 3⋅2^7⋅C(9, 2)−3⋅C(9, 2)⋅C(7, 2).

A university offers 3 calculus classes: Math 2A, 2B and 2C. In both parts, you are given data about a group of students who have all taken at least one of the three classes. Group A contains 157 students. Of these, 51 students in Group A have taken Math 2A, 80 have taken Math 2B, and 70 have taken Math 2C. 15 have taken both Math 2A and 2B, 20 have taken both Math 2A and 2C, and 13 have taken both Math 2B and 2C. How many students in Group A have taken all three classes?

Define the following sets: A: students from group A who have taken Math 2A. B: students from group A who have taken Math 2B. C: students from group A who have taken Math 2C. According to the information given in the problem, |A ∪ B ∪ C| = 157. |A| = 51, |B| = 80, and |C| = 70. |A ∩ B| = 15, |A ∩ C| = 20, and |B ∩ C| = 13. According to the principle of inclusion-exclusion: 157 = 51 + 80 + 70 - 15 - 20 - 13 + |A ∩ B ∩ C| = 153 + |A ∩ B ∩ C| Therefore |A ∩ B ∩ C| = 4.

A university offers 3 calculus classes: Math 2A, 2B and 2C. In both parts, you are given data about a group of students who have all taken at least one of the three classes. You are given the following data about Group B. 28 students in Group B have taken Math 2A, 28 have taken Math 2B, and 25 have taken Math 2C. 11 have taken both Math 2A and 2B, 9 have taken both Math 2A and 2C, and 10 have taken both Math 2B and 2C. 3 have taken all three classes. How many students are in Group B?

Define the following sets: A: students from group B who have taken Math 2A. B: students from group B who have taken Math 2B. C: students from group B who have taken Math 2C. According to the information given in the problem, |A| = 28, |B| = 28, and |C| = 25. |A ∩ B| = 11, |A ∩ C| = 9, and |B ∩ C| = 10. |A ∩ B ∩ C| = 3. According to the principle of inclusion-exclusion: |A ∪ B ∪ C| = 28 + 28 + 25 - 11 - 9 - 10 + 3 = 54.

In the following question, we will count distinct integer solutions to the equation x1 + x2 + x3 + x4 = 35. How many solutions are there if x1 ≥ 2, x2 ≥ 4, x3 ≥ 0, and x4 ≥ 0?

Define y1 = x1 - 2 and y2 = x2 - 4. The condition x1 ≥ 2 is equivalent to y1 ≥ 0. The condition x2 ≥ 4 is equivalent to y2 ≥ 0. Replace x1 with (y1 + 2) and x2 with (y2 + 4). The number of solutions to x1 + x2 + x3 + x4 = 35 with x1 ≥ 2, x2 ≥ 4 and x3 and x4 non-negative is equal to the number of solutions to the equation (y1 + 2) + (y2 + 4) + x3 + x4 = 35 with y1, y2, x3, x4 non-negative integers. The equation above is equal to y1 + y2 + x3 + x4 = 29 Thus, the number of solutions is C(29+4−1, 4−1) = C(32, 3).

A Chinese restaurant offers 10 different lunch specials. Each weekday for one week, Fiona goes to the restaurant and selects a lunch special. How many different ways are there for her to select her lunches for the week? Note that which lunch she orders on which day matters

Each day Fiona has 10 choices for the lunch special she selects. There are a total of 5 days and she selects a lunch special each day, so by the product rule, there are 10^5 choices for the week.

How many 10-bit strings are there subject to each of the following restrictions? The first two bits are the same as the last two bits.

Each of the first 8 bits can be either 0 or 1. Once the the first 8 bits are determined, the last two bits must match the first two bits, so there are no remaining choices for the string. Thus, the number of strings in which the first two bits are the same as the last two bits is 28.

A large number of coins are divided into four piles according to whether they are pennies, nickels, dimes or quarters. How many ways are there to select 25 coins if at least 5 of the chosen coins must be quarters?

First select 5 quarters. Once the 5 quarters have been selected, there are 20 coins left to select from 4 varieties with no restrictions on how the 20 are selected. The number of ways to select 20 coins from 4 varieties is C(20+4−1, 4−1) = C(23, 3)

There are 20 members of a basketball team. From the 12 players who will travel, the coach must select her starting line-up. She will select a player for each of the five positions: center, power forward, small forward, shooting guard and point guard. However, there are only three of the 12 players who can play center. Otherwise, there are no restrictions. How many ways are there for her to select the starting line-up?

First select the player who will play center. There are only 3 possible choices for the center. After the center has been selected, the coach can place any of the remaining 11 players in any of the other four positions, so there are P(11, 4) choices for the players who will play the positions besides center. The total number of choices is 3·P(11, 4).

A cookie store sells 6 varieties of cookies. It has a large supply of each kind. How many ways are there to select 15 cookies if at least three must be chocolate chip?

First select the three chocolate chip cookies. Now there are 12 cookies to select from 6 varieties with no restrictions on the number of each variety. The number of ways to select the cookies is C(12+6−1, 6−1) = C(17, 5)

20 identical printing jobs are sent to 5 different printers. One of the printers is much faster than the other four. How many ways are there to distribute the jobs if the faster printer gets at least 7 jobs?

First send 7 jobs to the faster printer. Now there are 13 identical jobs to send to 5 different printers. The number of ways to distribute the jobs is equal to the number of ways to place 13 identical balls into 5 distinct bins which is C(13+5−1, 5−1) = C(17, 4).

20 identical printing jobs are sent to 5 different printers. One of the printers is almost out paper. How many ways are there to distribute the jobs so that the printer that is almost out of paper does not get more than three jobs? (In addition to the fact that the faster one gets at least 7 jobs.)

First send 7 jobs to the faster printer. Now there are 13 identical jobs to send to 5 different printers. The number of ways to send 13 jobs to 5 printers in which the low-paper printer gets at most 3 jobs is equal to the number of ways to send 13 jobs to 5 printers with no restrictions minus the number of ways to send 13 jobs to 5 printers with the low-paper printer getting at least 4 jobs, which is C(17, 4) − C(13, 4)

20 different comic books will be distributed to five kids. How many ways are there to distribute the comic books if there are no restrictions on how many go to each kid (other than the fact that all 20 will be given out)?

For each comic book, there are five different choices for which kid will receive that comic book. 20 decisions are made, one for each comic book with five different possibilities for each choice. The number of ways to distribute the comic books to the five kids is 5^20.

A school cook plans her calendar for the month of February in which there are 20 school days. She plans exactly one meal per school day. Unfortunately, she only knows how to cook ten different meals. How many ways are there for her to plan her schedule of menus for the 20 school days if there are no restrictions on the number of times she cooks a particular type of meal?

For each day, there are ten different choices for what she will cook that day. 20 decisions are made, one for each day with ten different possibilities for each choice. The number of ways to plan her schedule of menus for the 20 school days is 10^20.

How many 8-bit strings have at least two consecutive 0's or two consecutive 1's?

If a string does not have two consecutive 0's or two consecutive 1's, then the bits alternate. There are only two 8-bit strings in which the bits alternate: 10101010 and 01010101. The total number of 8-bit strings with no restrictions is 2^8. Therefore the number of 8-bit strings which have at least two consecutive 0's or at least two consecutive 1's is 2^8 - 2.

A school cook plans her calendar for the month of February in which there are 20 school days. She plans exactly one meal per school day. Unfortunately, she only knows how to cook ten different meals. How many ways are there for her to plan her schedule of menus if she wants to cook each meal the same number of times?

If she cooks each meal the same number of times, then she will cook each meal twice. Number the meals 1 through 10. For j = 1 to 10, she selects the days in which she will cook meal j. After she has selected the days for meals 1 through j, there are 20 - 2j days remaining from which to select the two days for meal j+1. The total number of choices is C(20, 2)C(18, 2)⋯C(4, 2)= 20! / 2!2!2!2!2!2!2!2!2!2! =20! / 2^10

10 coupons are given to 20 shoppers in a store. Each shopper can receive at most one coupon. 5 of the shoppers are women and 15 of the shoppers are men. If the coupons are different, how many ways are there to distribute the coupons so that at least one woman receives a coupon?

If the coupons are different, then there are P(20, 10) ways to distribute the coupons with no restrictions other than the fact that at most one coupon can go to a shopper. There are P(15, 10) ways to distribute the coupons so that all the coupons go to the men. Therefore there are P(20, 10) - P(15, 10) ways to distribute the coupons so that at least one coupon goes to a woman.

In the following question, we will count distinct integer solutions to the equation x1 + x2 + x3 + x4 = 35. How many solutions are there if all the variables must be positive?

If xi is a positive integer, then xi ≥ 1. Define yi = xi - 1. The condition xi ≥ 1 is equivalent to yi ≥ 0. Now replace each xi in the equation with yi + 1. The number of solutions to the equation x1 + x2 + x3 + x4 = 35 with each xi ≥ 1 is equal to the number of solutions to the equation (y1 + 1) + (y2 + 1) + (y3 + 1) + (y4 + 1) = 35 with yi ≥ 0. The equation above is equal to y1 + y2 + y3 + y4 = 31 Thus, the number of solutions with yi ≥ 0 is C(31+4−1, 4−1) = C(34, 3)

An employee of a grocery store is placing an order for soda. There are 8 varieties of soda and they are sold in cases. Each case contains all the same variety of soda. The store will order 50 cases total. How many ways are there to place the order if she orders at least 3 of each variety?

In order to guarantee that at least 3 cases of each variety are chosen, she first selects 3 cases of each variety. Then there are 24 cases already selected and she has to choose 26 more cases. The additional 26 cases can be chosen from any of the varieties without any restrictions. The number of ways to select 26 cases from 8 varieties is C(26+8−1, 8−1) = C(33, 7)

Count the number of strings of length 9 over the alphabet {a, b, c} subject to each of the following restrictions. The first or the last character is a.

Let A be the set of strings for which the first character is a. Let B be the set of strings for which the last character is a. |A| = |B| = 38. A ∩ B is the set of strings whose first and last characters are a. |A ∩ B| = 37. By the inclusion-exclusion principle, the number of strings such that the first or last characters are a is: |A ∪ B| = |A| + |B| - |A ∩ B| = 3^8 + 3^8 - 3^7 = 2·3^8 - 3^7

Count the number of strings of length 9 over the alphabet {a, b, c} subject to each of the following restrictions. The string contains at least 8 consecutive a's.

Let A be the set of strings of length 9 of the form aaaaaaaa*, where the * can be any character from the set {a, b, c}. Let B be the set of strings of length 9 of the form *aaaaaaaa. The set A ∪ B is the set of strings that contain at least 8 consecutive a's. |A| = |B| = 3 because there are exactly three choices for the unspecified character. A ∩ B = {aaaaaaaaa}, so |A ∩ B| = 1. Therefore |A ∪ B| = |A| + |B| - |A ∩ B| = 3 + 3 - 1 = 5.

The sixth row of Pascal's triangle is: 1 6 14 20 15 6 1 What is the 7th row of Pascal's triangle?

1 7 21 35 35 21 7 1

Each character in a password is either a digit [0-9] or lowercase letter [a-z]. How many valid passwords are there with the given restriction(s)? Length is 18. No character repeats. Must contain: g, 8, 4, and 5

4 already chosen characters with 18 possible positions: P(18, 4) Then, permute 14 from 32 characters: P(32, 14) Finally, combine: P(18, 4) * P(32, 14)

Digits = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 } Letters = { a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z } Special characters = { *, &, $, # } Strings of length 7, 8, or 9. Characters can be special characters, digits, or letters.

40^7 + 40^8 + 40^9

An employee of a grocery store is placing an order for soda. There are 8 varieties of soda and they are sold in cases. Each case contains all the same variety. The store will order 50 cases total. How many ways are there to place the order?

50 cases are selected from 8 varieties. The number of ways to make the selection is C(50+8−1, 8−1) = C(57, 7).

Ten members of a wedding party are lining up in a row for a photograph. How many ways are there to line up the ten people?

A line-up of the ten people is just a permutation of ten distinct items/people. There are 10! ways to order ten people.

A large number of coins are divided into four piles according to whether they are pennies, nickels, dimes or quarters. Suppose the pile only has 10 quarters, so at most 10 quarters can be selected. How many ways are there to select 25 coins?

At most 10 quarters selected is equivalent to not selecting at least eleven quarters. The number of ways to select the 25 coins with at most 10 quarters selected is equal to the number of ways to select the coins with no restrictions minus the number of ways to select the coins with at least eleven quarters: C(28, 3) − C(17, 3)

A cookie store sells 6 varieties of cookies. It has a large supply of each kind. How many ways are there to select 15 cookies if at most 2 can be sugar cookies?

At most 2 sugar cookies selected is equivalent to not selecting at least three sugar cookies. The number of ways to select the 15 cookies with at most two sugar cookies is the number of ways to select the cookies with no restrictions minus the number of ways to select the cookies with at least three sugar cookies: C(20, 5) − C(17, 5)

A movie theater offers 6 showings of a movie each day. A total of 1000 people come to see the movie on a particular day. The theater is interested in the number of people who attended each of the six showings. How many possibilities are there for the tallies for each showing for that day?

C(1000+6−1, 6−1) = C(1005, 5)

14 students have volunteered for a committee. Eight of them are seniors and six of them are juniors. Suppose the committee must have five students (either juniors or seniors) and that one of the five must be selected as chair. How many ways are there to make the selection?

C(14, 5) * C(5, 1)

What is the coefficient of x^6*y^1 in (-2x - 5y)^7?

C(7, 1)(−2)^6*(−5) = −7⋅26⋅5 = −2240

What is the coefficient of x^3y^4 in (-3x + 4y)^7?

C(7, 3)* (−3)^3*4^4 = −C(7, 3)*27⋅256 = −241920

What is the coefficient of x^5y^3 in (3x - 4y)^8?

C(8, 5)3^5*(−4)^3 = −C(8, 5)⋅243⋅64 = −870912

What is the coefficient of x^2y^7 in (5x - y)^9?

C(9, 2)*5^2*(−1)^7 = −36⋅25 = −900

A family lines up for a photograph. In each of the following situations, how many ways are there for the family to line up so that the mother is next to at least one of her daughters? The family consists of two parents, two daughters and two sons.

Call the daughters A and B. The number of ways the family can line up with the mother next to A is 2·5!. The number of ways the family can line up with the mother next to B is 2·5!. To determine the number of ways in which the family can line up in which the mother is next to both A and B, first decide whether A is to the left and B is to the right of the mother or whether A is to the right and B is to the left of the mother (2 choices). Once this decision has been made, stick the daughters to either side of the mother. The number of items to permute is now four: father, two sons, and the daughter-mother-daughter unit. There are 4! ways to permute the four people/groups. Thus, there are 2·4! ways to line up the family so that the mother is next to both daughters. Use the inclusion-exclusion principle to determine the number of ways to line up the family so that the mother is next to one or both of her daughters: 2·5! + 2·5! - 2·4! = 4·5! - 2·4!

A family lines up for a photograph. In each of the following situations, how many ways are there for the family to line up so that the mother is next to at least one of her daughters? The family consists of two parents, three daughters and four sons.

Call the daughters A, B and C. The number of ways the family can line up with the mother next to A is 2·8!. The number of ways the family can line up with the mother next to B is 2·8!. The number of ways the family can line up with the mother next to C is 2·8!. To determine the number of ways in which the family can line up in which the mother is next to both A and B, first decide whether A is to the left and B is to the right of the mother or whether A is to the right and B is to the left of the mother (2 choices). Once this decision has been made, stick the daughters to either side of the mother. The number of items to permute is now seven: father, four sons, one unattached daughter and the daughter-mother-daughter unit. There are 7! ways to permute the seven people/groups. Thus, there are 2·7! ways to line up the family so that the mother is next to daughters A and B. The same argument holds for the mother next to A and C as well as the mother next to B and C. It is impossible for the mother to be next to all three daughters if the family is in a single line. Use the inclusion-exclusion principle to determine the number of ways to line up the family so that the mother is next to at least one of her daughters: 2·8! + 2·8! + 2·8! - 2·7! - 2·7! - 2·7! = 6(8! - 7!)

Ten members of a wedding party are lining up in a row for a photograph. How many ways are there to line up the ten people if the bride must be next to the maid of honor and the groom must be next to the best man?

Decide whether the bride is to the left or the right of the maid of honor (two choices). Once that decision is made, the bride and maid of honor will be stuck together. Decide whether the groom is to the left or the right of the best man (two choices). Once that decision is made, the groom and best man will be stuck together. Now find an ordering of the 8 items, where the 8 items consist of the bride/maid of honor unit, the groom/best man unit and the other 6 members of the wedding party. There are 8! ways to permute 8 distinct items. Therefore the number of ways to line up the ten people with the maid of honor next to the bride and the best man next to the groom is 2·2·8!.

Count the number of binary strings of length 10 subject to each of the following restrictions. The string contains exactly five 1's or it begins with a 0.

Define the following sets: A: binary strings of length ten that contain exactly five 1's. B: binary strings of length ten that begin with 0. Here are the sizes of the sets needed to apply the inclusion-exclusion principle: |A| = C(10, 5). There are C(10, 5) ways to select the locations for the 1's. The remaining locations have a 0. |B| = 2^9. The first bit is fixed and the remaining 9 bits can be either 0 or 1. |A ∩ B| = C(9, 5). Since the first bit must be 0, the first location is not eligible to contain a 1, so the locations for the 1's are selected from the last nine places. There are C(9, 5) ways to select the locations for the 1's. The remaining locations have a 0. Now to apply the inclusion-exclusion principle: |A∪B|=|A|+|B|−|A∩B| = C(10, 5) + 2^9 − C(9, 5).

How many solutions are there to the equation x1 + x2 + x3 + x4 + x5 + x6 = 25 in which each xi is a non-negative integer and ... 3 ≤ x1 ≤ 10 and 2 ≤ x2 ≤ 7

Let x1 = y1 + 3 and x2 = y2 + 2. The condition 3 ≤ x1 ≤ 10 is equivalent to the condition that 0 ≤ y1 ≤ 7. The condition 2 ≤ x2 ≤ 7 is equivalent to the condition that 0 ≤ y2 ≤ 5. The number of solutions to (1) x1 + x2 + x3 + x4 + x5 + x6 = 25 with 3 ≤ x1 ≤ 10 and 2 ≤ x2 ≤ 7 is equal to the number of solutions to (2) y1 + y2 + x3 + x4 + x5 + x6 = 20 with 0 ≤ y1 ≤ 7 and 0 ≤ y2 ≤ 5. The number of solutions with only the constraints that y1 ≥ 0 and y2 ≥ 0 is (20+6−16−1)=(255). In order to count the number of solutions with y1 ≤ 7 and y2 ≤ 5, we need to subtract off all the solutions in which y1 ≥ 8 or y2 ≥ 6. The number of solutions to Equation (2) with y1 ≥ 8 is C(20−8+6−1, 6−1) = C(17, 5). The number of solutions to Equation (2) with y2 ≥ 6 is C(20−6+6−1, 6−1) = C(19, 5). The number of solutions to Equation (2) with y1 ≥ 8 and y2 ≥ 6 is C(20−6−8+6−1, 6−1) = C(11, 5). By the inclusion-exclusion principle, the number of solutions to Equation (2) with y1 ≥ 8 or y2 ≥ 6 is C(17, 5) + C(19, 5) − C(11, 5). Finally, the number of solutions to Equation (1) with 3 ≤ x1 ≤ 10 and 2 ≤ x2 ≤ 7 is C(25, 5) − [C(17, 5)+C(19, 5) − C(11, 5)] = C(25, 5) − C(17, 5) − C(19, 5) + C(11, 5).

How many solutions are there to the equation x1 + x2 + x3 + x4 + x5 + x6 = 25 in which each xi is a non-negative integer and ... 3 ≤ x1 ≤ 10

Let x1 = y1 + 3. The condition 3 ≤ x1 ≤ 10 is equivalent to the condition that 0 ≤ y1 ≤ 7. The number of solutions to (1) x1 + x2 + x3 + x4 + x5 + x6 = 25 with 3 ≤ x1 ≤ 10 is equal to the number of solutions to (2) y1 + x2 + x3 + x4 + x5 + x6 = 22 with 0 ≤ y1 ≤ 7. The number of solutions with only the constraint that y1 ≥ 0 is (22+6−16−1)=(275). To enforce the constraint that y1 ≤ 7, we need to subtract off all the solutions in which y1 ≥ 8. Let y1 = z1 + 8. The number of solutions to Equation (2) with y1 ≥ 8 is the same as the number of the solutions to the equation z1 + x2 + x3 + x4 + x5 + x6 = 14 with z1 ≥ 0, which is C(14+6−1, 6−1) = C(19, 5). The number of solutions to Equation (1) with 3 ≤ x1 ≤ 10 is C(27, 5) − C(19, 5).

How many solutions are there to the equation x1 + x2 + x3 + x4 + x5 + x6 = 25 in which each xi is a non-negative integer and ... xi ≥ 3 for i = 1, 2, 3, 4, 5, 6

Let xi = yi + 3 for i = 1, 2, ..., 6. The condition xi ≥ 3 is equivalent to the condition that yi ≥ 0. The number of solutions to x1 + x2 + x3 + x4 + x5 + x6 = 25 with each xi ≥ 3 is equal to the number of solutions to (y1 + 3) + (y2 + 3) + (y3 + 3) + (y4 + 3) + (y5 + 3) + (y6 + 3) = 25 which is equivalent to y1 + y2 + y3 + y4 + y5 + y6 = 7 with each yi ≥ 0. The number of solutions is C(7+6−1, 6−1) = C(12, 5).

Each character in a password is either a digit [0-9] or lowercase letter [a-z]. How many valid passwords are there with the given restriction(s)? Length is 11. No character repeats. Starts with: e

P(35, 10)

Each character in a password is either a digit [0-9] or lowercase letter [a-z]. How many valid passwords are there with the given restriction(s)? Length is 10

P(36, 10)

Each character in a password is either a digit [0-9] or lowercase letter [a-z]. How many valid passwords are there with the given restriction(s)? Length is 7. Must contain: m, h, l, j, o, a, and d

P(7, 7) = 1

Ten members of a wedding party are lining up in a row for a photograph. How many ways are there to line up the ten people if the groom must be to the immediate left of the bride in the photo?

Place the groom to the left of the bride and keep them stuck together. Now find an ordering of the 9 items, where the 9 items consist of the 8 people in the wedding party besides the bride and groom and the unit consisting of the bride and groom stuck together. There are 9! ways to permute 9 distinct items. Therefore the number of ways to line up the ten people so that the groom is to the immediate left of the bride is 9!.

An employee of a grocery store is placing an order for soda. There are 8 varieties of soda and they are sold in cases. Each case contains all the same variety of soda. The store will order 50 cases total. How many ways are there to place the order if she does not order more than 20 cases of Coke?

Selecting at most 20 cases of Coke is equivalent to not selecting at least 21 cases of Coke. The number of ways to select 50 cases with at most 20 cases of Coke selected is equal to the number of ways to select 50 cases of Coke with no restrictions minus the number of ways to select 50 cases with at least 21 cases of Coke selected. In order to guarantee that 21 cases of Coke are selected, she first selects 21 cases of Coke and then selects the remaining 29 from the 8 varieties with no restrictions. Therefore, there are C(29+8−1, 8−1) = C(36, 7) ways to select 50 cases with at least 21 cases of Coke selected. The number of ways to select 50 cases with at most 20 cases of Coke selected is C(57, 7) − C(36, 7)

120 pianists compete in a piano competition. In the second round, the judges select the first, second, third, fourth and fifth place winners of the competition from among the 30 pianists who advanced to the second round. How many outcomes are there for the second round of the competition?

Suppose that the pianists are selected in the order in which they rank. That is, the first pianist selected wins first place, the second pianist selected wins second place, etc. The order in which the pianists are selected is important because the order determines which pianists gets which place. The number of ways to select an ordered list of five pianists from a set of 30 with no repetitions is P(30, 5).

There are 20 members of a basketball team From the 12 players who will travel, the coach must select her starting line-up. She will select a player for each of the five positions: center, power forward, small forward, shooting guard and point guard. How many ways are there for her to select the starting line

Suppose that the starters are placed into positions in the order in which they are selected. That is, the first player selected will play center, the second will play small forward, etc. The order in which the players are selected is important because the order determines which player plays which position. The number of ways to select an ordered list of five players from a set of 12 with no repetitions is P(12, 5).

How many 8-bit strings do not begin with 000?

The number of 8-bit strings that begin with 000 is 2^5 because there are two choices for each of the last five bits. The total number of 8-bit strings with no restrictions is 2^8. Therefore the number of 8-bit strings which do not begin with 000 is 2^8 - 2^5.

How many integers in the range 1 through 120 are integer multiples of 2, 3, or 5?

The number of integers in the range 1 through 120 that are divisible by 2 is 120/2 = 60 divisible by 3 is 120/3 = 40 divisible by 5 is 120/5 = 24 divisible by 2 and 3 is 120/2·3 = 20 divisible by 2 and 5 is 120/2·5 = 12 divisible by 3 and 5 is 120/3·5 = 8 divisible by 2 and 3 and 5 is 120/2·3·5 = 4 By the inclusion-exclusion principle, the number of integers in the range 1 through 120 that are divisible by 2 or 3 or 5 is: 60 + 40 + 24 - 20 - 12 - 8 + 4 = 88.

How many integers in the range 1 through 140 are integer multiples of 2, 5, or 7?

The number of integers in the range 1 through 120 that are divisible by 2 is 140/2 = 70 divisible by 5 is 140/5 = 28 divisible by 7 is 140/7 = 20 divisible by 2 and 5 is 140/2·5 = 14 divisible by 2 and 7 is 140/2·7 = 10 divisible by 5 and 7 is 140/5·7 = 4 divisible by 2 and 5 and 7 is 140/2·5·7 = 2 By the inclusion-exclusion principle, the number of integers in the range 1 through 140 that are divisible by 2 or 5 or 7 is: 70 + 28 + 20 - 14 - 10 - 4 + 2 = 92.

In the following question, we will count distinct integer solutions to the equation x1 + x2 + x3 + x4 = 35. How many solutions are there if all the variables must be non-negative?

The number of solutions is C(n+m−1, m−1), where n is the value of the sum and m is the number of variables. Therefore the number of solutions to the equation is C(35+4−1, 4−1) = C(38, 3)

In the following question, we will count distinct integer solutions to the equation x1 + x2 + x3 + x4 = 35. How many solutions are there to the equation x1 + x2 + x3 + x4 ≤ 35 in which all the xi are non-negative? (Hint: add an extra variable y such that y is non-negative and x1 + x2 + x3 + x4 + y = 35.)

The number of solutions to (1) x1 + x2 + x3 + x4 ≤ 35 with all the xi non-negative integers is equal to the number of solutions to (2) x1 + x2 + x3 + x4 + y = 35 with all the xi and y non-negative integers. For every solution to Inequality (1), there is a solution to Equation (2) with y = 35 - (x1 + x2 + x3 + x4). The value of y must be a nonnegative integer if Inequality (1) is true. Similarly, a solution to Equation (2) corresponds to a solution to the Inequality (1) since y is non-negative. The number of solutions to Equation (2) is C(35+5−1, 5−1) = C(39, 4) because the sum is 35 and there are 5 variables.

Sally goes into a candy store and selects 12 pieces of taffy. The candy store offers 75 varieties of taffy. How many ways are there for Sally to select her 12 pieces of taffy?

The number of varieties is m = 75. The number of pieces selected is n = 12. The number of ways to select n pieces from m varieties is C(n+m−1, m−1) = C(12+75−1, 75−1) = C(86, 74)

A cookie store sells 6 varieties of cookies. It has a large supply of each kind. How many ways are there to select 15 cookies?

The number of ways to select 15 cookies from 6 varieties is: C(15+6−1, 6−1) = C(20, 5)

An employee of a grocery store is placing an order for soda. There are 8 varieties of soda and they are sold in cases. Each case contains all the same variety of soda. The store will order 50 cases total. How many ways are there to place the order?

The number of ways to select 50 cases from 8 varieties is C(50+8−1, 8−1) = C(57, 7)

A teacher selects students from her class of 37 students to do 4 different jobs in the classroom: pick up homework, hand out permission slips, staple worksheets, and organize the classroom library. Each job is performed by exactly one student in the class and no student can get more than one job. How many ways are there for her to select students and assign them to the jobs?

The number of ways to select an ordered list of four students from a set of 37 with no repetitions is P(37, 4).

Based on the interview, the committee will rank the top three candidates and submit the list to their boss who will make the final decision. (You can assume that the interviewees are already decided.) How many ways are there to select the list from the 6 interviewees?

The selected list is ordered because the three people selected are also designated as first choice, second choice, and third choice. The number of ways to select an ordered list of three people without repetitions from a set of 6 people is P(6, 3).

How many 10-bit strings are there subject to each of the following restrictions? the string has exactly six 0's and the first bit is 1.

The six 0's can be placed in any of the 10 locations, except the first location. There are C(9, 6) ways to select the six locations for the 0's among the last nine locations in the string. Once the 0's are placed, the four 1's go in the unfilled locations. Therefore the number of 10-bit strings with exactly six 0's and a 1 in the first location is C(9, 6).

How many solutions are there to the equation x1 + x2 + x3 + x4 + x5 + x6 = 25 in which each xi is a non-negative integer and ... There are no other restrictions.

The sum is 25 and the number of variables is 6. Therefore the number of solutions is C(25+6−1, 6−1) = C(30, 5).

Digits = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 } Letters = { a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z } Special characters = { *, &, $, # } Strings of length 6. Characters can be special characters, digits, or letters.

The three sets are mutually disjoint, so the total number of characters is |D ∪ L ∪ S| = |D| + |L| + |S| = 10 + 26 + 4 = 40 Each of the six characters in the string can be any of the 40 characters, so there are a total of 40^6

How many 5-card hands have at least two cards with the same rank?

The total number of 5-card hands with no restrictions is C(52, 5). The number of 5-card hands in which all the cards have different ranks is 4^5 ⋅ C(13, 5). (Solved in Exercise 10.5.8 on subsets.) Therefore the number of 5-card hands with at least two cards of the same rank is C(52, 5) − 4^5 ⋅ C(13, 5).

A 5-card hand is drawn from a deck of standard playing cards. How many 5-card hands have at least one club?

The total number of 5-card hands with no restrictions is C(52, 5). The total number of 5-card hands with no clubs is C(39, 5) because there are 39 non-clubs from which to select the five cards. Therefore the number of 5-card hands with at least one club is C(52, 5) − C(39, 5).

How many different passwords are there that contain only digits and lower-case letters and satisfy the given restrictions? Length is 6 and the password must contain at least one digit and at least one letter.

The total number of passwords with no restrictions is 36^6. The number of passwords with no digits (i.e., only letters) is 26^6. The number of passwords with no letters (i.e., only digits) is 10^6. The number of passwords with no digits or no letters is 26^6 + 10^6. Therefore the number of passwords with at least one digit and at least one letter is 36^6 - 26^6 - 10^6.

How many different passwords are there that contain only digits and lower-case letters and satisfy the given restrictions? Length is 6 and the password must contain at least one digit.

The total number of passwords with no restrictions is 36^6. The number of passwords with no digits (i.e., only letters) is 26^6. Therefore the number of passwords with at least one digit is 36^6 - 26^6.

Ten members of a wedding party are lining up in a row for a photograph. How many ways are there for the wedding party to line up in which the bride is not next to the groom?

There are 10! ways to line up the ten people in the wedding party if there are no restrictions on how the people are placed. As shown earlier, the number of ways to line up the ten people in the wedding party in which the bride and the groom are next to each other is 2·9!. Therefore the number of ways to line up the ten people in the wedding party in which the bride is not next to the groom is 10! - 2·9!

Ten members of a wedding party are lining up in a row for a photograph. How many ways are there for the wedding party to line up if the groom is not in the leftmost position?

There are 10! ways to line up the ten people in the wedding party if there are no restrictions on how the people are placed. The number of ways to line up the ten people if the groom is in the leftmost position is 9!. (First place the groom in the leftmost position. Then there are 9! ways to order the rest of the people.) Therefore the number of ways to line up the ten people in the wedding party in which the groom is not in the leftmost position is 10! - 9!

Ten members of a wedding party are lining up in a row for a photograph. How many ways are there for the wedding party to line up if the groom is not at one end (i.e. in the leftmost or rightmost positions)?

There are 10! ways to line up the ten people in the wedding party if there are no restrictions on how the people are placed. The number of ways to line up the ten people if the groom is in the leftmost position is 9!. The number of ways to line up the ten people if the groom is in the rightmost position is 9!. The number of ways to line up the ten people if the groom is in the rightmost or the leftmost position is 9! + 9! = 2·9!. Therefore the number of ways to line up the ten people in the wedding party in which the groom is not in the leftmost or rightmost position is 10! - 2·9!

Now suppose that in addition to selecting her main course, she also selects between water or tea for her drink. How many ways are there for her to select her lunches?

There are 10^5 food choices for the week. There are 2^5 drink choices because each day Fiona can select one of two drink choices. The number of different selections are put together by the product rule: 10^5·2^5 = (20)^5.

How many five-card hands do not have any two cards of the same rank?

There are 13 different possible ranks. The number of ways to select 5 distinct ranks from 13 possible ranks is C(13, 5). For each rank chosen, there are four possible cards with that rank that can be selected. Therefore once the ranks have been determined, there are 4^5 ways to select the cards in the hand. The total number of ways to select a five-card hand in which no two cards have the same rank is 45⋅C(13, 5).

How many five-card hands have four cards of the same rank?

There are 13 ways to select a rank. Once a rank has been chosen, all four of the cards with that rank will be in the hand. Then there are 48 ways to select the remaining card that does not have the same rank as the four already chosen. The total number of ways to select a five-card hand with four cards of the same rank is 13·48.

A "full house" is a five-card hand that has two cards of the same rank and three cards of the same rank. For example, {queen of hearts, queen of spades, 8 of diamonds, 8 of spades, 8 of clubs}. How many five-card hands contain a full house?

There are 13 ways to select the rank for the two cards with the same rank. The three cards with the same rank must have a different rank than the rank chosen for the pair, so there are 12 ways to select the rank for the three cards with the same rank. Once the rank has been chosen for the two cards that have the same rank, there are C(4, 2) ways to select two cards from the four cards with that rank. Once the rank has been chosen for the three cards that have the same rank, there are C(4, 3) ways to select three cards from the four cards with that rank. The choices are put together by the product rule, so that the number of ways to select a hand that is full house is: 13⋅12⋅C(4, 2) * C(4, 3)

Digits = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 } Letters = { a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z } Special characters = { *, &, $, # } Strings of length 6. Characters can be special characters, digits, or letters, with no repeated characters. The first character can not be a special character.

There are 36 characters that are not special characters. Therefore there are 36 choices for the first character. Once the first character is chosen, there are 39 choices for the second character because the second character can be any character, except the character that was chosen to be first. For the next character, there are 38 choices, etc. The total number of length 6 strings with no repetitions in which the first character is not a special character is: 36 · 39 · 38 · 37 · 36 · 35

A large number of coins are divided into four piles according to whether they are pennies, nickels, dimes or quarters. How many ways are there to select 25 coins from the piles?

There are 4 types (or varieties) of coins. 25 coins are selected. The number of ways to select 25 items if there are 4 varieties is C(25+4−1, 4−1) = C(28, 3)

Consider a function that maps 5-permutations from a set S = {1, 2, ..., 20} to 5-subsets from S. The function takes a 5-permutation and removes the ordering on the elements. How many 5-permutations map on to the subset {2, 5, 13, 14, 19}?

There are 5! ways to order five elements in a subset. Therefore, the function mapping 5-permutations to 5-subsets is k-to-1 for k = 5! = 120.

How many 10-bit strings are there subject to each of the following restrictions? The string has exactly six 0's.

There are C(10, 6) ways to select where the six 0's will be placed among the ten possible locations. Once the 0's are placed, the four 1's go in the unfilled locations. Therefore the number of 10-bit strings with exactly six 0's is C(10, 6).

A camp offers 4 different activities for an elective: archery, hiking, crafts and swimming. The capacity in each activity is limited so that at most 35 kids can do archery, 20 can do hiking, 25 can do crafts and 20 can do swimming. There are 100 kids in the camp. How many ways are there to assign the kids to the activities?

There are C(100, 35) ways to select the kids who will do archery. Then there are C(65, 20) ways to select the kids who will go hiking. Then there are C(45, 25) ways to select the kids who will do crafts. The remaining 20 kids will go swimming. Putting together the selections by the product rule, the number of ways to assign kids to activities is C(100, 35)C(65, 20)C(45, 25) 100! / 35! 20! 25! 20!

A search committee is formed to find a new software engineer. If 100 applicants apply for the job, how many ways are there to select a subset of 9 for a short list?

There are C(100, 9) ways to select a subset of 9 people from a set of 100.

How many different strings of length 12 containing exactly five a's can be chosen over the following alphabets? The alphabet {a, b}

There are C(12, 5) ways to select where the five a's will be placed among the 12 possible locations. Once the a's are placed, the unfilled locations are filled with b's. Therefore the number of strings over the alphabet {a, b} with exactly five a's is C(12, 5).

How many different strings of length 12 containing exactly five a's can be chosen over the following alphabets? The alphabet {a, b, c}

There are C(12, 5) ways to select where the five a's will be placed among the 12 possible locations. Once the a's are placed, there are two choices (b or c) for each of the remaining seven unfilled locations. Therefore, there are 2^7 ways to fill the locations that do not have an a. The number of strings over the alphabet {a, b, c} with exactly five a's is 2^7⋅C(125)

120 pianists compete in a piano competition. In the first round, 30 of the 120 are selected to go on to the next round. How many different outcomes are there for the first round?

There are C(120, 30) ways to select a subset of 30 pianists from a set of 120 pianists. The order in which the pianists are chosen does not matter, just the subset of 30 pianists selected.

How many five-card hands have exactly two hearts?

There are C(13, 2) ways to select a subset of 2 hearts from the set of 13 hearts in the deck. There are C(39, 3) ways to select a subset of 3 non-hearts from the set of 39 non-hearts in the deck. Since the hearts and the non-hearts must all be selected in order to determine the cards in the hand, the product rule applies, and there are a total of C(13, 2) * C(39, 3)

14 students have volunteered for a committee. Eight of them are seniors and six of them are juniors. How many ways are there to select a committee of 5 students?

There are C(14, 5) ways to select a subset of 5 students from a set of 14 students.

10 coupons are given to 20 shoppers in a store. Each shopper can receive at most one coupon. 5 of the shoppers are women and 15 of the shoppers are men. If the coupons are identical, how many ways are there to distribute the coupons so that at least one woman does not receive a coupon?

There are C(15, 5) ways to distribute the coupons so that all five women get coupons. (Since the coupons are identical, think of giving each woman a coupon and then selecting the five men who also get coupons.) Therefore there are C(20, 10) − C(15, 5) ways to distribute the coupons so that at least one woman does not get a coupon.

10 coupons are given to 20 shoppers in a store. Each shopper can receive at most one coupon. 5 of the shoppers are women and 15 of the shoppers are men. If the coupons are identical, how many ways are there to distribute the coupons so that at least one woman receives a coupon?

There are C(20, 10) ways to distribute the coupons with no restrictions other than the fact that at most one coupon can go to a shopper. There are C(15, 10) ways to distribute the coupons so that all the coupons go to the men. Therefore there are C(20, 10) − C(15, 10) ways to distribute the coupons so that at least one coupon goes to a woman.

There are 20 members of a basketball team. The coach must select 12 players to travel to an away game. How many ways are there to select the players who will travel?

There are C(20, 12) ways to select a subset of 12 players from a set of 20 players. The order in which the players are chosen does not matter, just the subset of 12 players selected.

20 different comic books will be distributed to five kids. How many ways are there to distribute the comic books if they are divided evenly so that 4 go to each kid?

There are C(20, 4) ways to select the comic books given to the first kid. Then C(16, 4) ways to select the comic books given to the second kid, then C(12, 4) for the third kid, and C(8, 4) for the fourth kid. The fifth kid gets the four remaining comic books. Putting together the selections by the product rule, the number of ways to distribute the comic books to the kids with four going to each kid is 20! / 4!4!4!4!4!

How many five-card hands are made entirely of hearts and diamonds?

There are C(26, 5) ways to select a subset of 5 cards from the set of 26 hearts and diamonds in the deck.

There are 30 boys and 35 girls that try out for a chorus. The choir director will select 10 girls and 10 boys from the children trying out. How many ways are there for the choir director to make his selection?

There are C(30, 10) ways to select a subset of 10 boys from a set of 30 boys. There are C(35, 10) ways to select a subset of 10 girls from a set of 35 girls. Since the choir director must select the girls and the boys for the chorus, the product rule applies, and there are a total of C(35, 10)C(30, 10) ways to make the selection.

A teacher selects 4 students from her class of 37 to work together on a project. How many ways are there for her to select the students?

There are C(37, 4) ways to select a subset of 4 students from a set of 37 students. The order in which the students are chosen does not matter, just the subset of 4 students selected.

Suppose a network has 40 computers of which 5 fail. How many possibilities are there for the five that fail?

There are C(40, 5) ways to select a subset of 5 computers from a set of 40 computers.

How many 10-bit strings are there subject to each of the following restrictions? There is exactly one 1 in the first half and exactly three 1's in the second half.

There are C(5, 1) ways to select the location for the 1 among the first five locations. There are C(5, 3) ways to select the location for the three 1's among the last five locations. Once the 1's are placed, the 0's go in all the unfilled locations. Since the location for the 1 in the first half and the locations for the 1's in the second half must both be determined to specify the string, the product rule applies. Therefore the number of 10-bit strings with one 1 in the first half and three 1's in the second half is C(5, 1) C(5, 3) = 5* C(5, 3).

How many ways are there to deal hands from a standard playing deck to four players if: Each player gets exactly 13 cards.

There are C(52, 13) ways to pick 13 cards for the first player. Then C(39, 13) ways to pick 13 cards from the remaining 39 cards for the second player. Then C(26, 13) ways to pick 13 cards from the remaining 26 cards for the third player. The fourth player is left with the remaining 13 cards. Putting together the selections by the product rule, the number of ways to deal hands with 13 cards each to 4 players is 52! / 13!13!13!13!

How many different five-card hands are there from a standard deck of 52 playing cards?

There are C(52, 5) ways to select a subset of 5 cards from a set of 52 cards.

How many ways are there to deal hands from a standard playing deck to four players if: Each player gets seven cards and the rest of the cards remain in the deck?

There are C(52, 7) ways to pick 7 cards for the first player. Then C(45, 7) ways to pick 7 cards from the remaining 45 cards for the second player. Then (387) ways to pick 7 cards from the remaining 38 cards for the third player. Then C(31, 7) ways to pick 7 cards from the remaining 31 cards for the fourth player. The rest of the cards remain in the deck. Putting together the selections by the product rule, the number of ways to deal hands with 7 cards each to 4 players is 52! / 7! 7! 7! 7! 24!

Define the set S = {a, b, c, d, e, f, g}. How many subsets of S have either three or four elements?

There are C(7,4) subsets with four elements and there are C(7,3) subsets with three elements. A subset can not have three and four elements, so the sum rule applies. Therefore the number of subsets with three or four elements is C(7, 4)+C(7, 3).

14 students have volunteered for a committee. Eight of them are seniors and six of them are juniors. How many ways are there to select a committee with 3 seniors and 2 juniors?

There are C(8, 3) ways to select a subset of 3 seniors from a set of 8 seniors. There are C(6, 2) ways to select a subset of 2 juniors from a set of 6 juniors. Since the juniors and the seniors must all be selected in order to determine the membership of the committee, the product rule applies, and there are a total of C(8, 3) * C(6, 2) ways to make the selection.

If 6 of the 9 are selected for an interview, how many ways are there to pick the set of people who are interviewed? (You can assume that the short list is already decided).

There are C(9, 6) ways to select a subset of 6 people from a set of 9.

Digits = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 } Letters = { a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z } Special characters = { *, &, $, # } Strings of length 6. Characters can be special characters, digits, or letters, with no repeated characters.

There are a total of 40 characters. There are 40 possibilities for the first character. There are 39 for the second character (because the second character can not match the first character), then 38 choices for the third character, etc. The total number of length 6 strings with no repetitions is: 40 · 39 · 38 · 37 · 36 · 35

How many ternary strings (digits 0,1, or 2) are there with exactly seven 0's, five 1's and four 2's?

There are a total of 7 + 5 + 4 = 16 characters in the string. The total number of ways to permute seven 0's, five 1's and four 2's is 16!/(7!5!4!).

How many ways are there to permute the letters in each of the following words? DISCRETE

There are eight letters in the word DISCRETE. The only repeated letters in DISCRETE are two E's. Therefore there are 8!/2! = 8!/2 = 4·7! ways to permute the letters in DISCRETE.

A family has four daughters. Their home has three bedrooms for the girls. Two of the bedrooms are only big enough for one girl. The other bedroom will have two girls. How many ways are there to assign the girls to bedrooms?

There are four ways to select the girl who will get the first single room. Then there are three ways to select the girl who will get the second single room. The two remaining girls are placed in the double room. Therefore the number of ways to assign girls to rooms is 4·3 = 12.

How many ways are there to permute the letters in each of the following words? SUBSETS

There are seven letters in the word SUBSETS. The only repeated letters in SUBSETS are three S's. Therefore there are 7!/3! ways to permute the letters in SUBSETS.

How many ways are there to permute the letters in each of the following words? NUMBER

There are six letters in the word NUMBER. The letters in NUMBER are all distinct. Therefore there are 6! ways to permute the letters in NUMBER.

How many strings are there over the set {a, b, c} that have length 10 in which no two consecutive characters are the same? For example, the string "abcbcbabcb" would count and the strings "abbbcbabcb" and "aacbcbabcb" would not count.

There are three choices for the first character. There are two choices in selecting each of the next 9 characters from left to right because each character can be any element from the set {a, b, c}, except the one that was chosen to be the previous character. 3·2^9.

Count the number of binary strings of length 10 subject to each of the following restrictions. The string has at least one 1 and at least one 0.

There are two binary strings of length ten with no 0's or no 1's. Those are 0000000000 and 1111111111. Therefore the number of binary strings with at least one 0 and at least one 1 is 2^10 - 2.

At a certain university in the U.S., all phone numbers are 7-digits long and start with either 824 or 825. How many different phone numbers are possible?

There are two choices for the first three digits (824 or 825). Each of the remaining 4 digits can be any one of the ten digits, so there are 104 ways to pick the last four digits. The total number of 7-digit phone numbers that start with 824 or 825 is 2·10^4

At a certain university in the U.S., all phone numbers are 7-digits long and start with either 824 or 825. How many different phone numbers are there in which the last four digits are all different?

There are two choices for the first three digits (824 or 825). In selecting the remaining 4 digits, 4 digits are selected from a set of 10 with no repetitions, so there are P(10, 4) choices. The total number of 7-digit phone numbers that start with 824 or 825 and have no repeated digits among the last four digits is 2·P(10, 4)

Count the number of binary strings of length 10 subject to each of the following restrictions. The string has at least one 1.

There is only one binary string of length ten with no 1's: 00000000000. There are 210 binary strings of length ten. Therefore the number of binary strings of length ten with at least one 1 is 2^10 - 1.

10 coupons are given to 20 shoppers in a store. Each shopper can receive at most one coupon. 5 of the shoppers are women and 15 of the shoppers are men. If the coupons are different, how many ways are there to distribute the coupons so that at least one woman does not receive a coupon?

We will first determine the number of ways to distribute the coupons so that each woman gets a coupon. First select the set of coupons given to the women. There are C(10, 5) ways to select five coupons. Now distribute the five coupons to the women. There are 5! ways to distribute 5 different items to 5 different people in such a way that each person gets exactly one item. Finally, distribute the remaining 5 coupons among the men. There are P(15, 5) ways of distributing the remaining 5 coupons among the men. Thus, the number of ways to distribute the coupons so that every woman gets a coupon is C(10, 5)* 5!*P(15,5) = P(10,5)⋅P(15,5). The number of ways to distribute the coupons so that at least one woman does not get a coupon is P(20, 10) - P(10, 5) · P(15, 5).

Suppose a network has 40 computers of which 5 fail. Suppose that 3 of the computers in the network have a copy of a particular file. How many sets of failures wipe out all the copies of the file? That is, how many 5-subsets contain the three computers that have the file?

ask rogers C(40, 5) * C(5, 3)

Count the number of different functions with the given domain, target and additional properties. f: {0,1}^7 → {0,1}^7

herefore there are |{0,1}7| = 2^7 choices for f(x). The output must be chosen for each element x in the domain and the choices are put together by the product rule. There are 2^7 elements in the domain, so the number of functions whose domain and target sets are both {0,1}^7 is: (2^7)^(2^7)

Define the set S = {a, b, c, d, e, f, g}. How many subsets of S have exactly four elements?

order DNM 7 Distinct Items selecting 4 There are C(7, 4) ways to select a subset of 4 items from a set of 7 distinct items.

Digits = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 } Letters = { a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z } Special characters = { *, &, $, # } Strings of length 7, 8, or 9. Characters can be special characters, digits, or letters. The first character cannot be a letter.

there are 14 choices for the first character because there are 4 + 10 digits and special characters. There are 40 choices for each of the remaining characters. Putting the choices together by the product rule, the total number of strings of length j in which the first character is not a letter is 14·40^(j-1) 14·40^6 + 14·40^7 + 14·40^8 = 14(40^6 + 40^7 + 40^8)

The sixth row of Pascal's triangle is: 1 6 14 20 15 6 1 Use your answer to the previous problem to write the expanded form of (x + y)7. 1 7 21 35 35 21 7 1

x^7 + 7x^6y + 21x^5y^2 + 35x^4y^3 + 35x^3y^4 + 21x^2y^5 + 7xy^6 + y^7

Each character in a password is either a digit [0-9] or lowercase letter [a-z]. How many valid passwords are there with the given restriction(s)? Length is 13. No character repeats. Must contain: z

z can be in 13 possible positions: P(13,1) Then, permute 12 from 35 characters: P(35,12) Finally, combine: P(13, 1) * P(35, 12)


संबंधित स्टडी सेट्स

CHAPTER FOUR: TAXES, RETIREMENT, AND OTHER INSURANCE CONCEPTS

View Set

Lab 1.2: Networking Topologies and Characteristics

View Set

Character and Culture in Literature

View Set