Chapter 4- Counting

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

In terms of the order of elements within sets, what does () mean and {} mean?

() means that order does matter {} means that the order does not matter

Which permutation is the first permutation of {1, 2, 3, 4, 5} in lexicographic order? (1, 2, 4, 3, 5) (1, 2, 3, 4, 5) (1, 2, 3, 3, 5) Which permutation is the last permutation of the set {1, 2, 3, 4, 5} in lexicographic order? (5, 4, 3, 1) (5, 4, 4, 2, 1) (5, 4, 2, 3, 1) (5, 4, 3, 2, 1) Which one of the choices given is the next permutation after P = (5, 2, 4, 3, 1) in lexicographic order? (5, 2, 4, 1, 3) (5, 3, 4, 2, 1) (5, 3, 1, 2, 4)

(1, 2, 3, 4, 5) In the first permutation in lexicographic order, the elements of the set appear in increasing order. (5, 4, 3, 2, 1) In the last permutation in lexicographic order, the elements are ordered in decreasing order. (5, 3, 1, 2, 4) (5, 3, 1, 2, 4) is larger than P. Furthermore, there is no permutation that comes in between P and (5, 3, 1, 2, 4) in lexicographic order.

What is the next permutation after (1, 5, 4, 2, 3, 6) in lexicographic order? (1, 5, 2, 3, 4, 6) (1, 5, 4, 2, 6, 3) (1, 5, 4, 6, 3, 2) What is the next permutation after (2, 1, 4, 6, 5, 3) in lexicographic order? (2, 1, 4, 5, 3, 6) (2, 3, 1, 4, 5, 6) (2, 1, 5, 3, 4, 6) What is the next permutation after (5, 6, 4, 3, 2, 1) in lexicographic order? (6, 1, 2, 3, 4, 5) (6, 5, 4, 3, 2, 1) (5, 1, 2, 3, 4, 6)

(1, 5, 4, 2, 6, 3) Since 3 < 6, only the last two elements in (1, 5, 4, 2, 3, 6) need to be reordered to produce a larger permutation. (2, 1, 5, 3, 4, 6) The next permutation is found by swapping 4 and 5 and then reordering (..., 6, 4, 3). (6, 1, 2, 3, 4, 5) The only way to get a larger permutation is to make the first entry 6. Once 6 is placed as the first entry, the remaining numbers can be sorted in ascending order.

Which expression has the same value as (12 / 4)? (8 / 4) (11 / 4) (12 / 8)

(12 / 4 ) is equal to (12 / (12−4)) = (12 / 8)

Answer the following questions about bijection mapping power sets to strings: Let X = {1, 2, 3, 4}. Define the function f from P(X) to {0, 1}^4 What is f({1,4})? Which element is not in f^-1(1101)? How many elements are in the set f^-1(0000)?

1001 3 0

For questions 2 and 3, express your answer as 'n choose r'. Ex: 8 choose 3. Define a bijection between 5-subsets of the set S = {1, 2, 3, 4, 5, 6, 7, 8} and 8-bit strings with exactly five 1's. A subset X of S with five elements maps on to a string x so that j ∈ X if and only if the j^th bit of x is 1. What string corresponds to the set {1, 3, 4, 5, 8}? How many 8-bits strings have exactly five 1's. How many strings over the alphabet {a, b} have length 20 and exactly 8 a's?

10111001 The bit locations of the string are numbered 1 through 8. There should be 1's in locations 1, 3, 4, 5, and 8 and 0's in the other locations. 8 choose 5 or 8 choose 3 There are (8/5) 5-subsets of a set with 8 elements. 20 choose 8 or 20 choose 12 There are (20/8) ways to select the 8 locations of the a's from among the 20 locations in the string. Then the b's go in the remaining 12 locations.

For the following questions, express your answer as "n choose r". Ex: 8 choose 3. A teacher must select four members of the math club to participate in an upcoming competition. How many ways are there for her to make her selection if the club has 12 members? A file will be replicated on 3 different computers in a distributed network of 15 computers. How many ways are there to select the locations for the file?

12 choose 4 or 12 choose 8 She is selecting a 4-subset from the 12 kids in the club, so the number of choices is (12/4) 15 choose 3 or 15 choose 12 In determining the locations for the file, a 3-subset is selected from the set of 15 computers, so the number of choices is (15/3)

A red, blue, and green die are thrown. Each die has six possible outcomes. How many outcomes are there for the three dice in which they are all different? There are 5 computers and 3 students. How many ways are there for the students to sit at the computers if no computer has more than one student and each student is seated at a computer? A class has ten students. A teacher will give out three prizes: One student gets a gift card, one gets a book, and one gets a movie ticket. No student can receive more than one prize. How many ways can the teacher distribute the prizes?

120 6 possible outcomes for the red die. Since the blue die must be different from the red die, 5 possibilities for the blue die. Since the green die must be different from the red and blue dice, 4 possibilities for the green die. P(6, 3) = 6 × 5 × 4 = 120 60 5 possible computers for the first student. Once the first student has chosen, there are 4 computers left for the second student to select from, and then 3 possible computer choices for the third student. P(5, 3) = 5 × 4 × 3 = 60 720 10 students to select from for the first prize. Once the first prize has been given, there are 9 students to select from for the second prize, and then 8 students to select from for the third prize. P(10, 3) = 10 · 9 · 8 = 720

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

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

In a group, there are 10 women, 8 blondes and 3 blonde women. How many people are either blonde or a woman? Erica goes swimming three out of the seven days of the week. How many possibilities are there for her swim schedule if she goes swimming on Monday or Tuesday or both? (Define M to be the set of schedules in which Erica goes swimming on Monday. Let T be the set of schedules in which Erica goes swimming on Tuesday.) How many positive integers less than 100 have at least one digit that is a 9? (Let T be the set of positive integers less than 100 with a 9 in the ten's place. Let O be the set of positive integers less than 100 with a 9 in the one's place. Now determine T ∪ O).

15 25 19

A burrito stand sells burritos with different choices of stuffing. The set of choices for each category are: Meats choices = {chicken, beef, pork} Bean choices = {black, pinto} Salsa choices = {mild, medium, hot} 1) If every burrito has meat, beans, and salsa, then how many possible burrito combinations are there? 2) Suppose that the customer can substitute grilled veggies for the meat. Now how many selections are there? 3) Now suppose that the burrito stand introduces a choice between plain flour or whole wheat tortillas? The option to substitute veggies instead of a meat is still available as well. Now how many selections are there?

18 A burrito selection is described by a triple of the form: (meat choice, bean choice, salsa choice). The number of selections is: meat · bean · salsa = 3 · 2 · 3 = 18 24 The set of choices for the filling is now {chicken, beef, pork, veggies}.A burrito selection is described by a triple of the form: (filling choice, bean choice, salsa choice). The number of selections is: filling · bean · salsa = 4 · 2 · 3 = 24 48 A burrito selection is described by a 4-tuple of the form: (tortilla choice, filling choice, bean choice, salsa choice). The number of selections is: tortilla · filling · bean · salsa= 2 · 4 · 2 · 3 = 48

Let S = {a, b, c}. 1) Is (b, a) a 2-permutation or a 2-subset from S? 2-permutation 2-subset 2) Is {b, a} a 2-permutation or a 2-subset from S? 2-permutation 2-subset 3) How many different 2-permutations from S are there? 6 3 1 4) How many different 2-subsets from S are there? 6 3 1

2-permutation The regular parens () indicate that the order of the elements matters, so (b, a) ≠ (a, b). 2-subset The curly braces {} indicates that order does not matter, so {b, a} = {a, b}. 6 The 2-permutations from S are: (a, b), (b, a), (a, c), (c, a), (b, c), (c, b). 3 The 2-subsets from S are {a, b}, {a, c}, {b, c}.

Suppose you are using the inclusion-exclusion principle to compute the number of elements in the union of four sets. Each set has 14 elements. The pair-wise intersections have 10 elements each. The three-way intersections have 7 elements each. There are 4 elements in the intersection of all four sets. What is the size of the union? Ron only plays hockey on Tuesday, Wednesday and Friday. John only plays hockey on Thursday and Saturday. How many days each week does at least one of them play hockey? Kate forgot the password of an online service, but remembers that the password was just made of lowercase vowels (a, e, i ,o, u), was 3 characters long and contained at least one 'i'. How many possible passwords fulfill these requisites?

20 5 61

A wedding party consisting of a bride, a groom, two bridesmaids, and two groomsmen line up for a photo. How many ways are there for the wedding party to line up so that the bride is next to the groom?

240 First decide whether the bride is to the left or right of the groom (2 choices). Then glue the bride and groom together and there are 5! ways to permute the five items. By the product rule, the number of line-ups with the bride next to the groom is: 2 · 5! = 240

Three employees of a company, Anna, Fred and Jose, have each worked on 12 projects. Each pair of people have worked on 4 together. There is only one project that all three of worked on as a team. What is the total number of projects that any of them have worked on? How many numbers in the range from 1 through 42 are divisible by 2, 3, or 7?

25 30

A bit string contains 1's and 0's. How many different bit strings can be constructed given the restriction(s)? Write a^b as a^b Write combination as: C(n,k) Length is 16 Length is 15 Starts with 101 Length is 20 Has exactly two 0's Length is 21 Has exactly nine 0's Starts with 11 Length is 24 Has exactly two 1's in the first half Has exactly seven 1's in the second half

2^16 Each position has 2 possibilities 2^12 15 - 3 positions remain, each with 2 possibilites C(20,2) Choose two locations for 0's from 20 locations C(19,9) First two locations already chosen. Choose nine locations from 0's from 19 locations C(12,2) * C(12,7) For first half, choose two 1's from 12 For second half, choose seven 1's from 12

The math team has 6 girls and 4 boys. How many ways are there to select the two competitors so that at least one boy is chosen? Four people (John, Paul, George, and Ringo) are seated in a row on a bench. The number of ways to order the four people so that John is next to Paul is 12. How many ways are there to order the four people on the bench so that John is not next to Paul?

30 12

A bit string consists of 0s and 1s. For example, 0101 is a bit string with four bits. 1) How many six bits strings are there that begin and end with a 1, or start with 00? 2) How many strings of length five or six start with a 1?

32 48

The 6th row of Pascal's triangle is: 1 6 15 20 15 6 1 What is (7 / 4)? What is (7 / 5)?

35 21

Calculate a numerical value for (7/3). (Hint: write out the factorials as products and cancel numbers before multiplying). Calculate a numerical value for (7/4). Calculate a numerical value for (100/1), the number of ways to select a subset of size 1 from a set of size 100. Calculate a numerical value for (100/100), the number of ways to select a subset of size 100 from a set of size 100. Note that 0! = 1.

35 35 100 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 11 Length is 12 or 19 Length is 17 and cannot start with a digit Length is 13 and cannot start nor end with a digit Length is 17 or 18, and must start with a digit

36^11 36^12 + 36^19 26 * 36^16 26^2 * 36^11 (10 * 36^16) + (10 * 36^17)

How many 5-bit strings contain the string "100" as a consecutive substring? Define the following sets: A = set of 5-bit strings of the form 100** B = set of 5-bit strings of the form *100* C = set of 5-bit strings of the form **100 The *'s can be either 0 or 1. 1) Sets A, B, and C all have the same cardinality. What is the cardinality of each set? 2) What is |A ∩ B| ? 3) What is |A ∩ C| ? 4) What is |B ∩ C| ? 5) How many 5-bit strings have "100" consecutively as a substring?

4 0 0 0 12

There are 10 kids on the math team. Two kids will be selected from the team to compete in the state competition. How many ways are there to select the 2 competitors? The math team has 6 girls and 4 boys. How many ways are there to select the two competitors if they are both girls?

45 15

Determine and use the appropriate counting technique to find the number of possible sequences in each scenario. 1) A computer program chooses nine volunteers at random from a pool of fifteen volunteers. The order in which the volunteers are chosen does not matter. 2) A computer's sorting algorithm must sort eight items into the appropriate order. To determine how long the process will take, a computer engineer must determine how many different possibilities there are for the initial list of all eight items. 3) An algorithm that generates exams for a professor chooses ten questions from a bank of twenty questions. If questions in a different order count as different exams, how many different exams are possible?

5005 40320 670442572800

In the following question, a club with 10 students elects a president, vice president, secretary and treasurer. No student can hold more than one position. 1) How many ways are there to select the class officers? 2) Now suppose that there are five girls and five boys in the club. How many ways are there to elect the officers if the president is a girl? 3) Again suppose that there are five girls and five boys in the club. How many ways are there to elect the officers if the president is a girl and the VP is a boy?

5040 10 choices for Pres. After Pres chosen, 9 choices for VP. After Pres, VP chosen, 8 choices for Treas. After Pres, VP, Treas chosen, 7 choices for Sec. 10 × 9 × 8 × 7 = 5040 2520 5 girls to choose from for Pres. After Pres chosen, 9 choices for VP. After Pres, VP chosen, 8 choices for Treas. After Pres, VP, Treas chosen, 7 choices for Sec. 5 × 9 × 8 × 7 = 2520 1400 5 girls to choose from for Pres. 5 boys to choose from for VP. After Pres, VP chosen, 8 choices for Treas. After Pres, VP, Treas chosen, 7 choices for Sec. 5 × 5 × 8 × 7 = 1400

How many ways are there to permute the letters in PEPPER? (Give a numerical answer) How many ways are there to permute the letters in HAPPY? (Give a numerical answer)

60 60

A group of students is selected from a class. How many students must be selected in order to guarantee that at least 4 boys or at least 4 girls are selected? A research firm is tracking the number of text messages sent by 1000 7th graders in a single day. How many texts must be sent by the group in order to guarantee that at least one of the 7th graders has sent at least 20 text messages?

7 The target is the set {boy, girl} and the size of the target k = 2. The goal for how many are desired from a single boy/girl category is b = 4. k(b - 1) + 1 = 2(4 - 1) + 1 = 7 students are required. 19001 The domain is the set of texts, the target is the set of 7thgraders, and the function maps each text to the person who sent it. Since there are 1000 students, the size of the target is k = 1000. The goal for how many texts are sent by a single 7th grader is b = 20. k(b - 1) + 1 = 1000(20 - 1) + 1 = 19001

Each scenario given involves either counting permutations or counting subsets. Provide solutions in the form "P(n, r)" or "n choose r" (e.g. P(8, 3) or 8 choose 3). Dave swims three times in the week. How many ways are there to plan his workout schedule (i.e. which days he will swim) for a given week? Dave will swim one day, run one day, and bike another day in a week. He does at most one activity on any particular day. How many ways are there for him to select his workout schedule (i.e. which activities he does which days)?

7 choose 3 A schedule for Dave's workouts consists of the set of three days he will swim (e.g., {Mon, Wed, Sat}). The order in which he selects the three days of the week does not affect the schedule. Therefore, Dave is selecting a subset of 3 days from the 7 days of the week. P(7, 3) First Dave picks his swimming day, then his running day, and then his biking day. Since each activity is different, the order in which he selects the days matters. Therefore the number of selections is P(7, 3).

A wedding party consisting of a bride, a groom, two bridesmaids, and two groomsmen line up for a photo. How many ways are there for the wedding party to line up?

720 A line-up of the wedding party is a permutation of the six people in the group, so the number of different line-ups is: 6! = 720

John plays hockey 3 out of the 5 weekdays. How many possible schedules are there to play hockey on Friday or Monday or both? Lisa, Sue, and Ann play on the same basketball team Lisa has played 15 minutes in total Sue has played 11 minutes in total Ann has played 13 minutes in total Each pair has played 7 minutes together All three of them have played at the same time for 2 minutes How many minutes in total did the team have at least on of them playing?

9 20

Suppose that 9 desserts are handed out to 9 kids. Each kid gets one dessert. There are three ice cream sandwiches, four cupcakes and two bowls of pudding. How many ways are there to hand out the desserts to the kids? (9 / 3) 9! / 3!4!2! 9! Fifteen kids arrive at camp and are assigned a place to sleep. There are three different cabins each of which can hold five kids. How many ways are there to assign kids to cabins? 15! / 5!5!5! 15! (15 / 5)

9! / 3!4!2! 15! / 5!5!5!

What does it mean when a collection of sets is mutually disjoint? What is the formula for determining the union of mutually disjoint sets?

A collection of sets is mutually disjoint if the intersection of any pair of sets in the collection is empty. If we apply the principle of inclusion-exclusion to determine the union of a collection of mutually disjoint sets, then all the terms with the intersections are zero. Thus, for a collection of mutually disjoint sets, the cardinality of the union of the sets is just equal to the sum of the cardinality of each of the individual sets

What is the k-to-1 rule?

A group of kids at a slumber party all leave their shoes in a big pile at the door. One way to count the number of kids at the party is to count the number of shoes and divide by 2. Counting kids by counting shoes and dividing by 2 is an example of the k-to-1 rule with k = 2. A 1-to-1 correspondence is another term for a bijection, so a bijection is a k-to-1 correspondence with k = 1. The k-to-1 rule uses a k-to-1 correspondence to count the number of elements in the range by counting the number of elements in the domain and dividing by k.

What is a multiset?

A multiset is a collection that can have multiple instances of the same kind of item. For example, {1, 2, 2, 3} is a multiset because it contains two 2's. The curly braces denote the fact that the order in which the elements are listed does not matter, so {1, 2, 2, 3} is equal to {2, 1, 2, 3}.

What is a permutation?

A permutation (without the parameter r) is a sequence that contains each element of a finite set exactly once

What is the algorithm GenLexPermutations(n) and NextPerm(P)?

A permutation of the set {1, 2, ..., n} is an ordered n-tuple in which each number in {1, 2, ..., n} appears exactly once. For example (2, 5, 1, 4, 3) is a permutation of the set {1, 2, 3, 4, 5}. Any two distinct permutations over {1, 2, ..., n - 1, n} can be ordered lexicographically. Ex: (1, 2, 3) < (1, 3, 2) < (2, 1, 3) < (2, 3, 1) < (3, 1, 2) < (3, 2, 1) The algorithm GenLexPermutations(n) takes as input a natural number n and outputs all the permutations of {1, 2, ..., n} in lexicographic order. GenLexPermutations starts with the first permutation in lexicographic order and keeps generating the next permutation until the last permutation is reached. The algorithm NextPerm(P) (described below) takes as input a permutation P and returns the smallest permutation that is larger than P.

What is a permutation with repetition?

A permutation with repetition is an ordering of a set of items in which some of the items may be identical to each other. To illustrate with a smaller example, there are 3! = 6 permutations of the letters CAT because the letters in CAT are all different. However, there are only 3 different ways to scramble the letters in DAD: ADD, DAD, DDA.

What is an identify and combinatorial identity?

An identity is a theorem stating that two mathematical expressions are equal. An identity that involves expressions related to counting is called a combinatorial identity.

What is an n-tuple? What is lexicographic order?

An ordered set of n-items Lexicographic order is a way of ordering n-tuples in which two n-tuples are compared according to the first entry where they differ. Alphabetical order and alphanumeric order are familiar examples of lexicographic order. Words in a dictionary are ordered in lexicographic order. For example, the word "comment" appears before the word "compare" because the first place where the two words differ is the 4th character and "m" appears before "p" in the alphabet.

What is an r-permutation?

An r-permutation is a sequence of r items with no repetitions, all taken from the same set. Consider the set X = {John, Paul, George, Ringo}. The sequences (Paul, Ringo, John) and (John, George, Paul) are both examples of 3-permutations over X.

An auto dealer has 7 different cars and 4 different trucks. How many ways are there to select two vehicles? A shop has 4 different shirts and 5 different jeans. How many ways are there to select 2 shirts? A shop has 4 different shirts and 8 different jeans. How many ways are there to select two items so that at least one jeans is chosen? An auto dealer has 8 different cars and 7 different trucks. How many ways are there to select three vehicles so that at least one truck is chosen?

C(11,2) C(4,2) C(12,2) - C(4,2) C(15,3) - C(8,3)

What is an r-subset? What is an r-combination/permutation?

Consider a class with 20 students who must elect three representatives to the student council. How many ways are there to select the three representatives? The outcome of the election is a set of three students, not a sequence because there is no particular order imposed on the three representatives. The outcome {Joshua, Karen, Ingrid} is the same outcome as {Karen, Ingrid, Joshua}. A subset of size r is called an r-subset. In counting the number of ways to elect the three representatives, we are counting the number of different 3-subsets of students from a class of size 20. An r-subset is sometimes referred to as an r-combination or r-permutation. In permutations, the order of the objects is considered. In combinations, order does not matter.

What is the contrapositive of the generalized pigeonhole principle?

Consider a situation in which a school would like to select a group of students to form a committee that will meet regularly in order to plan an event. Because students from different grades have different schedules, the group must all be in the same grade. The school has students in grades 9 through 12 and the goal is to have at least four students on the committee. How many students need to sign up in order to guarantee that there will be at least four in the same grade? If there are as many as 12 students who sign up, it is possible that the school falls short of the goal by having three students in each grade. However, after 12 students sign up, it just takes one more student before the school is guaranteed to have four in the same grade. There are 4 grades (k = 4) and the goal was to have at least 4 students from one grade (b = 4). The number of students required to guarantee at least four students from the same grade is k(b - 1) + 1 = 4(4 - 1) + 1 = 13.

What is counting by complement?

Counting by complement is a technique for counting the number of elements in a set S that have a property by counting the total number of elements in S and subtracting the number of elements in S that do not have the property.

How do you determine the number of strings in a set when one or more of the characters are fixed?

Define S to be the set of binary strings of length 5 that start and end with 0. A strings is in the set S if it has the form 0***0, where each * could be a 0 or a 1. |S| = |{0} × {0, 1} × {0, 1} × {0, 1} × {0}| = 1 · 2 · 2 · 2 · 1 = 8

{3, 1, 6, 7} > {2, 4, 5, 6} True False {2, 4, 5, 6} > {4, 2, 5, 6} True False {2, 4, 5, 6} > {2, 5, 6, 1} True False

False The sets are sorted in increasing order before they are compared. 1 < 2, so {1, 3, 6, 7} < {2, 4, 5, 6}. False {2, 4, 5, 6} and {4, 2, 5, 6} are the same set, so they are equal. True The sets are sorted in increasing order before they are compared. 2 > 1, so {2, 4, 5, 6} > {1, 2, 5, 6}.

How do you count permutations with repetition?

If you are working with a string consisting of the letters in "GOOD," there's no way to distinguish between the two Os. There's no way to know that {G, O} ← using the first O is different from {G, O} ← using the second O. Luckily, there is a very quick fix for this. Simply take the number of items in the string n! and divide by the number of times each look alike is duplicated (repeated.) For example, to determine the number of duplicates in the string "HEEBIE JEEBIES" calculate: 13! / 6!⋅2!⋅2! = 2,162,160. Notice the numerator is 13 factorial because there are 13 letters in the entire string. The denominator is a product of a factorial for each duplicate letter; the E repeats 6 times, and both the I and B both repeat twice.

In a sequence, what is a combination?

In a sequence, order matters, so the sequence (Paul, Ringo, John) is different from the sequence (Ringo, Paul, John). In contrast, counting subsets of objects in which order does not matter is called combinations.

Consider again the set {John, Paul, George, Ringo}. These four would like to sit on a bench together, but Paul and John would like to sit next to each other. How many possible seatings are there?

In order to apply the generalized product rule, view the set of possibilities as a process in which a seating is specified. The first step is to determine whether Paul sits to the left or right of John. There are two possible choices: Paul is to the left of John or Paul is to the right of John. Then glue Paul and John together in the chosen order to satisfy the constraint that they sit together. Now there are three items to order: two of them are people (George and Ringo), the other is a pair that is bound together [John+Paul]. The next step is to select a permutation of the three items.

Indicate whether the pigeonhole principle can be used to prove the following statements: A class of 11 students take a quiz that is worth 10 points. No partial credit is given, so every student received a score that is an integer. There must be at least two students who received the same score on the quiz. Among a group of 400 people, there are at least two who have the same birthday. Among a group of 350 people, there are at least two who have the same birthday.

No Yes No

A computer program generates a random five letter security code for each new user of a system. The five letter code is generated by using any five letters of the alphabet, except for the letters X and Y, that do not repeat. Can the security code process given facilitate 10,000,000 users? How many users could the security code process given facilitate if the security code were six letters instead of five letters?

No The number of security codes possible is the number of 5-permutations of twenty four objects. P(24,5) = 24 · 23 · 22 · 21 · 20 = 5,100,480 The number of possible codes is not enough to facilitate 10,000,000 users. 96,909,120 The number of security codes is the number of 6-permutations of twenty four objects. P(24,6) = 24 · 23 · 22 · 21 · 20 · 19= 96,909,120

Each scenario given involves either counting permutations or counting subsets. Provide solutions in the form "P(n, r)" or "n choose r" (e.g. P(8, 3) or 8 choose 3). The students in a class elect a president, vice president, secretary, and treasurer. There are 30 students in the class and no student can have more than one job. How many different outcomes are there from the election process? A class of 30 students elects four students to serve on a student leadership council. The teacher tallies the votes and only reveals the names of the four students who received the most votes. How many different outcomes are there from the election process?

P(30, 4) Select an order in which the class officers are elected: Pres, VP, Treas, Sec. The order in which the students are elected (in addition to which students are elected) is important because the order will determine which student gets which job. Therefore, a sequence of four kids are selected from the 30: (president, vice president, secretary, treasurer). 30 choose 4 The students only learn the names of the four students who are elected. Each student that is elected plays the same role as the others. Therefore, the outcome is just a subset of four students chosen from the class of 30 students.

What is the formula for the number of permutations of a finite set?

P(n,n) = n!

What is the formula for the number of r-permutations from a set with n elements?

P(n,r) = n! / (n-r)!

What is Pascal's identity?

Pascal's identity says that the number of ways to select a set of k items from a set of n items is equal to the number of ways to select k - 1 from n - 1 plus the number of ways to select k from n - 1.

How do you distinguish between permutations or subsets? (with symbols and by the question)

Permutations are P(n,k) Subsets are (n / k) If the order of the elements is important, then the question is about permutations. If the order is not important, then the question is about subsets.

How is a set or subset ordered lexicographically, since the order of the elements does not matter?

Sets can be ordered lexicographically by first sorting the elements in increasing order and then comparing the two sets as if they were ordered sequences. Consider as an example the two sets {3, 11, 2} and {6, 5, 2}. The two subsets are sorted to get {2, 3, 11} and {2, 5, 6}, and then compared as if the two sorted sets were sequences. {2, 3, 11} < {2, 5, 6} because the first element is the same in both sets but in the second element 3 < 5.

An i-tunes playlist contains nine songs. In each case, determine what counting technique should be used to determine the number of possible sets described and calculate the number of possibilities. How many different ways can a five song set be created if songs in a different order are considered different sets? How many different ways can a six song set be created if songs in a different order are considered the same set? How many different ways can a song set be created if songs in a different order are considered different sets and all nine songs are used?

Since order matters and not every song is used, an r-permutation should be used to count the number of possible sets. The number of possible sets is the 5-permutation P(9,5) = 9 · 8 · 7 · 6 · 5 = 15,120 sets. Since order does not matter and six songs are used, an r-subset should be used to count the number of possible sets. The number of possible sets is the 6-subset C(9,6) = (9 / 6) = 9! / 6!3! = 84 sets. Since order matters and all nine songs are to be used, a permutation should be used to count the number of possible sets. The number of possible sets is the permutation P(9,9) = 9! = 9 · 8 · 7 · 6 · 5 · 4 · 3 · 2 · 1 = 362,880 sets.

What does the algorithm GenLexSubsets(r, n) and NextSubset(n, S) do?

The algorithm GenLexSubsets(r, n) starts with the first r-subset in lexicographic order and keeps generating the next r-subset until the last r-subset is reached. The algorithm NextSubset(n, S) takes as input an r-subset S and natural number n and returns the smallest r-subset of {1, 2, ..., n} that is larger than S.

What is the bijection rule?

The bijection rule says that if there is a bijection from one set to another then the two sets have the same cardinality.

What is the binomial theorem formula?

The binomial theorem says that the coefficient of (a^k)(b^n-k) in (a + b)^n is (n / k).

Suppose that a teacher distributes ten identical chocolate bars to five different kids but wants to make sure that each kid gets at least one chocolate bar. How many ways are there for the teacher distribute the chocolate bars with the additional constraint?

The constraint that each kid gets at least one chocolate bar can be satisfied by first giving a chocolate bar to each kid. Since the chocolate bars are identical, it doesn't matter which chocolate bar goes to which kid.

How do you calculate an expression for (n / n-r)? What is this equation called?

The equation is called an identity because the equality holds for any non-negative integer n and any integer r in the range from 0 through n. The identity means that for any set S with n elements, the number of r-subsets from S is equal to the number of (n - r)-subsets from S.

What is the generalized product rule?

The generalized product rule says that in selecting an item from a set, if the number of choices at each step does not depend on previous choices made, then the number of items in the set is the product of the number of choices in each step. Consider a race with 20 runners. There is a first place, a second place and a third place trophy. An outcome of the race is defined to be who wins each of the three trophies. How many outcomes are possible? All 20 of the runners are eligible to win the first place trophy. Once the first place runner is determined, there are 19 possibilities left for the second place trophy (since no one can place both first and second). Once the top two runners are determined, there are 18 possibilities for the third place trophy. The number of possibilities for the outcome of the race is 20 · 19 · 18 = 6840.

How do you find a new r-subset that is larger than a previous one? Ex: Find the next largest subset from S: A 7-subset of {1, 2, ..., 12, 13} S = {3, 5, 6, 8, 11, 12, 13}

The last three numbers {..., 11, 12, 13} are as large as possible subject to the conditions that the numbers come from the set {1, 2, ..., 12, 13}, are listed in increasing order, and are all different. Therefore, there is no way to change the last three numbers and get a 7-subset that is larger. Instead, the 8 is incremented by one, the smallest amount possible. The rest of the subset is replaced with the smallest three numbers that are all different, larger than 9, and listed in increasing order. The resulting 7-subset is {3, 5, 6, 9, 10, 11, 12}.

A manager has five different jobs that need to get done on a given day. She has eight employees whom she can assign to the jobs. A job only requires one person and no person can be assigned more than one job. How many possible ways can she do the assignment? Order the jobs arbitrarily so that one job is first, one is second, etc. An assignment is a 5-permutation from the set of 8 employees.

The number of 5-permutations from a set of 8 people is P(8, 5) = 8 · 7 · 6 · 5 · 4 = 6720.

What is the formula for counting multisets?

The number of objects to select is n, and the number of varieties of object is m.

What is the generalized pigeonhole principle?

The pigeonhole principle can be used to show that there are at least two of a given type of item. For example, in selecting socks from a drawer, the goal was to select enough socks to have a pair. What if it is important to have more than two of a given type of item? Consider the situation in which a pair of twins are picking socks from a drawer. They want to have two pairs of matching socks. Not only do the socks in each pair have to match but the twins also want to wear socks of the same color. How many socks must be drawn from the drawer to guarantee they have four of the same color? After they pick nine socks, it's possible that they have three blue, three grey and three red socks as pictured below.

What is the pigeonhole principle?

The pigeonhole principle is a mathematical tool used to establish that repetitions are guaranteed to occur in certain sets and sequences. The pigeonhole principle says that if n+1 pigeons are placed in n boxes, then there must be at least one box with more than one pigeon. Here is another application of the pigeonhole principle: among any set of 13 people, there are at least two people who have a birthday in the same month. The function f maps the set of people to the set of months such that each person is mapped to the month in which his or her birthday falls. Since the domain has size 13 and the target has size 12, the function cannot be one-to-one which means that two people must be mapped to the same month and must therefore have the same birthday month. If there are fewer than 12 people, then the pigeonhole principle cannot be applied.

What is the principle of inclusion-exclusion?

The principle of inclusion-exclusion is a technique for determining the cardinality of the union of sets that uses the cardinality of each individual set as well as the cardinality of their intersections. A high school gives free admission to football games to any student who is either a senior or on the honor roll. The school is trying to determine the number of students who will be admitted for free. The sum (s + h) results in over counting because seniors on the honor roll are counted twice, once for being a senior and once for being on the honor roll. The school must also know the number of students who are both seniors and on the honor in order to be able to determine the number of people in either group.

What is the product rule?

The product rule provides a way to count sequences. It is that if you have a finite set, that multiplying each number of terms from the set gives you the total number of combinations of the set Ex: Consider a restaurant that has a breakfast special that includes a drink, a main course, and a side. The set of choices for each category are: D = {coffee, orange juice} M = {pancakes, eggs} S = {bacon, sausage, hash browns} |D × M × S| = |D| · |M| · |S| = 2 · 2 · 3 = 12 possible combos

What is the sum rule?

The sum rule is applied when there are multiple choices but only one selection is made. For example, suppose a customer just orders a drink. The customer selects a hot drink or a cold drink. The hot drink selections are {coffee, hot cocoa, tea}. The cold drink selections are {milk, orange juice}. The total number of choices is 5, namely 3 hot drink choices plus 2 cold drink choices.

Answer the following questions with true or false about comparing n-tuples lexicographically: (2, 3, 2, 4, 5) < (3, 3, 1, 1, 1) (2, 1, 2, 3, 5, 8) < (2, 1, 2, 7, 1, 1) (2, 1, 23) < (2, 1, 4)

True The 5-tuples first differ at the first entry. Since 2 < 3, (2, 3, 2, 4, 5) < (3, 3, 1, 1, 1). True The 6-tuples first differ at the fourth entry. Since 3 < 7, (2, 1, 2, 3, 5) < (2, 1, 2, 7, 1). False The triplets first differ at the third entry. Since 23 > 4, (2, 1, 23) > (2, 1, 4).

Indicate whether the generalized pigeonhole principle can be used to prove the following statements: Among a group of 50 people, there are at least five whose birthday falls in the same month. Alice bought 14 cups of coffee in a week. Then there was a day in the week in which she bought at least three cups of coffee. A group of 42 employees are assigned to 7 different printers. There must be a printer to which 7 employees are assigned.

Yes No No

Indicate whether the pigeonhole principle can be used to prove the following statements: There are four people whose weight is at least 100 pounds and less than 130 pounds. All four people have different weights. There must be at least two people in the group whose weight differs by at most 10 pounds. 37 points are placed in a 6 mile by 6 mile square area. There must be 2 points that are within 2 miles of each other.

Yes Yes

List out the differences between an r-permutation, permutation, and an r-subset as well as their formulas

r-Permutation: A sequence of r items chosen from n total items in which the order of the items matters Permutation: A sequence of n items in which the order of the items matters and every item in a set is included exactly once. r-Subset (or r-combination): A sequence of r items chosen from n total items in which the order of the items does not matter.

A farm orders x horse shoes for its horses. The farm does not order extras and all the horses will get new horse shoes. Apply the k-to-1 rule to determine the number of horses on the farm. Express your answer as a function of x. You should not need the ceiling or floor functions.

x/4 Every horse has four hooves. Set up a function that assigns horse shoes to horses. The function is 4-to-1, so the number of horses is the number of horse shoes (x) divided by 4.

What is the first output of GenLexSubsets(4, 9)? {1, 2, 3, 4} {1, 1, 1, 1} {1, 2, 3, ..., 9} What is the last output of GenLexSubsets(4, 9)? {9, 8, 7, 6} {6, 7, 8, 9} {9, 9, 9, 9} If the set {2, 5, 6, 9} is output on a call to GenLexSubsets(4, 9), then which 4-subset is output next? {2, 5, 6, 10} {2, 5, 7, 9} {2, 5, 7, 8} {2, 4, 8, 9}

{1, 2, 3, 4} {1, 2, 3, 4} are the four smallest numbers in the set {1, 2, ..., 9}. {6, 7, 8, 9} {6, 7, 8, 9} contains the largest four distinct elements of {1, 2, ..., 9} listed in increasing order. {2, 5, 7, 8} {2, 5, 7, 8} is the smallest subset in lexicographic order that is greater than {2, 5, 6, 9}.

The subset {3, 4, 7, 8, 9} is chosen from the set {1, 2, ..., 9}. What 5-subset comes next in lexicographic order? {3, 5, 6, 7, 8} {3, 5, 7, 8, 9} {3, 4, 7, 9, 8} The subset {3, 4, 5, 7, 8} is chosen from the set {1, 2, ..., 9}. What 5-subset comes next in lexicographic order? {3, 4, 5, 8, 9} {3, 4, 5, 6, 7} {3, 4, 5, 7, 9} The subset {3, 4, 6, 8, 9} is chosen from the set {1, 2, ..., 9}. What 5-subset comes next in lexicographic order? {3, 4, 7, 8, 9} {3, 4, 6, 9, 8} {3, 5, 6, 7, 8}

{3, 5, 6, 7, 8} In order to get a larger 5-subset, the second element must be increased to 5. Then the remaining elements just need to be replaced so that they are larger than 5 and in increasing order. {3, 4, 5, 7, 9} A larger subset can be generated by increasing the last entry from 8 to 9. {3, 4, 7, 8, 9} To get a larger subset than {3, 4, 6, 8, 9}, the 6 must be incremented to 7. If the third to last element is 7, then the next two elements have to be 8 and 9.


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

Module 8 - Chapter 12: Abuse and Violence

View Set

Chapter 24: Economics and Suitability

View Set

How is pornography effecting our world socially

View Set

SOCI 4432: Chapter 6 (Social Structure Theory), Module 11

View Set

46: Acute Kidney Injury and Chronic Kidney Disease

View Set

Unit 14 Pathophysiology Prep U Chs 47, 48 and 50

View Set

Interactions between organisms in the Environment

View Set