Combinatorics combinations permutations

¡Supera tus tareas y exámenes ahora con Quizwiz!

How many permutations of 3 different digits are there, chosen from the ten digits 0 to 9 inclusive?

10 x 9 x 8 = 720 P(10,3)

How many strings of four-digit decimal numbers? a) do not contain the same digit twice?

10 x 9 x 8 x 7 P(10, 4)

How many license plates can be made using either three digits followed by three uppercase English letters or three uppercase English letters followed by three digits?

10^3 x 26^3 x 2

permutation with repetition formula - decimal #'s

10^r

Show that if seven integers are selected from the first 10 positive integers, there must be at least two pairs of these integers with the sum 11.

11: {1, 10}, {2, 9}, {3, 8}, {4, 7}, {5, 6}. Let's start with drawing six integers. If six integers are selected from the first 10 integers, by the Pigoenhole Principle at least ⌈6/5 ⌉ = 2 numbers select 7 numbers no repetition ; the 6 and 7 pick will make for two pairs

What is a Discrete Probability Distribution?

A probability distribution shows the probability of occurrence for each outcome of a statistical experiment

How many ways are there to select five players from a 10-member tennis team to make a trip to a match at another school?

C(10, 5)

Consider a group of 10 people. How many ways are there to select a group of 5 people from the full group.

C(10, 5) 10!/(10-5)! 5!

How many bit strings of length 12 contain b) at most three 1s?

C(12, 0) + C(12, 1) + C(12, 2) + C(12, 3) = 1 + 12 + 66 + 220 = 299

How many bit strings of length 12 contain a) exactly three 1s?

C(12, 3) = 12!/3!(12-3)! = 12!/3!9! = 12 x 11 x 10 / 3 x 2 x 1 = 1320/6 = 220 12 positions for first 1, 11 pos for 2nd 1, 10 positions for 3rd 1. Then since we want combination (not perm, since it does not matter which # "1" goes into a bit position), divide by 3!. Convert problem to 12 people choose 3, think of each bit as representative of a person

How many bit strings of length 12 contain d) an equal number of 0s and 1s?

C(12, 6) = (12 x 11 x 10 x 9 x 8 x 7) / 6! = 665,280 / 720 = 924

Thirteen people on a softball team show up for a game. a) How many ways are there to choose 10 players to take the field?

C(13, 10)

Thirteen people on a softball team show up for a game. How many ways are there to choose 10 players to take the field

C(13, 10)

Consider a group of 10 people. a) How many ways are there to form/order a line of 5 people from the group?

P(10, 5) 10!/(10-5)!

How many ways are there to select a first-prize winner, a second-prize winner, and a third-prize winner from 100 different people who have entered a contest?

P(100,3)

Thirteen people on a softball team show up for a game. b) How many ways are there to assign the 10 positions by selecting players from the 13 people who show up?

P(13, 10)

A password consists of four different lowercase letters of the alphabet. How many different possible passwords are there?

P(26, 4)

A password consists of four different lowercase letters of the alphabet. How many different possible passwords are there?

P(26, 4) 26^4

How many ways to pick 4 numbers out of a hat? w/o replacement

P(4,4 ) w/o rep = 4!/(4-4)! = 4 x 3 x 2 x 1 / 0! = 24/1

In how many ways can we arrange all five of these students in a line for a picture?

P(5)=5!

In how many ways can we select three students from a group of five students to stand in line for a picture?

P(5,3)

How many ways are there to line up a wedding party of 6 people assume that the groom must always be lined up directly after the bride?

P(5,5) bride groom count as one

How many permutations of the letters ABCDEFGH contain the string ABC ?

P(6, 6) = DEFGH 5 and ABC 1 DEFGH = 5! Method #1) ABC can start in 6 positions , so: 6 * 5! Method #2) n = 6 (DEFGH = 5, ABC =1) so: 6P6 = 6!/(6-6)! = 6!

There are six different candidates for governor of a state. In how many different orders can the names of the candidates be printed on a ballot?

P(6,6) 6!

How many strings of four decimal digits that end with an even digit?

10 x 10 x 10 x 5 = 5000

Which is larger - P or C?

# P > # C

r

# of things chosen (P's)

n

# of things to choose from (P's)

Combination with repetition formula e.g., 3 scoops from 5 flavors of ice cream, 10 marbles from bag with 100 of 3 colors (r,y,g)

(n -1 + r) ! / (n-1)! r! = (n-1+r)C(n-1) = (n-1+r)Cr n-1 = Things to choose from = "moves to bins" i.e., n=flavors, colors, etc. Hint: Think of n as the number of groups or types or colors or flavors or whatever the items are sorted into r = # of things chosen Then group together as (n-1 + r) and the problem becomes like a combination without repetition problem

How many bit strings of length 12 contain c) at least three 1s?

* Find total combinations and subtract the combinations not wanted (0 , 1, and 2). (2^12) - C(12, 0) - C(12, 1) - C(12, 2) = 4096 - 1 - 12 - 66 = 4,017

How many strings are there that use each character in the set {a, b, c, d, e} exactly once (i.e. permutations of {a,b,c,d,e}) and that start with an 'a' and end with an 'e'?

1 x 3! x 1 = 3! = P (3, 3)

How many strings are there of four lowercase letters that have the letter x in them?

1) 26^4 - 25^4 = 66351 all combinations minus combos with no x's or , 2) one x: (1 x 25 x 25 x 25) x 4 (i.e. # of ways to arrange, which is 4C1) + two x's (1 x 1 x 25 x25) x 6 (4C2) + three x's (1 x 1 x 1 x 25) x 4 (4C3) + four x's 1 x 1 x 1 x 1 (4C4) = 62500 + 3750 + 100 + 1 = 66351

Hypergeometric Distribution

1) A DISCRETE probability distribution 2) that describes the probability of k successes in n draws, 3) WITHOUT REPLACEMENT, 4) from a finite population of size N containing exactly K successes 5) wherein EACH DRAW is either a SUCCESS or a FAILURE. Trials are NOT independent b/c each draw affects the probability of next draw. In contrast, the BINOMIAL distribution describes the probability of k successes in n draws with replacement. Replacement implies independence - each trial does not affect the next trial.

Consider a bag of jelly beans that has 100 red, 100 yellow, and 100 green jelly beans. c) How many color combinations of 10 beans have EXACTLY two yellow beans?

1)Each combination of 10 beans with two yellow beans = combination of 8 beans with only red and green. Count how many combos of 8 red/green beans you can have. n=different colors to chose from = 2 r= jellybeans chosen = 8 (n - 1 + r)Cr = (2 - 1 + 8)C8 = 9C8 = 9 9!/(8! 1!) 2) List combos of 8 jelly beans with two colors: 0+8, 1+7, 2+6,.....8+0 = 9 combos

0! (i.e., zero) is equal to the quantity:

1, by definition

Flight Example 12 flights that begin in Portland 20 flights that end in houston 4 flights that begin in portland and end in houston How many flights are there that either begin in Portland or end in Houston?

12 + 20 - 4 , subtract 4 that were double counted

Travel with 12 plane options, 5 bus options, and 3 train options. How many possible trip options are there.

12 x 5 x 3

A bowl contains 10 red balls and 10 blue balls. A woman selects balls at random without looking at them. b) How many balls must she select to be sure of having at least three blue balls?

13

How many bit strings of length seven either begin with two 0s or end with three 1s?

2 ^5 + 2^4 - 2^2 The ones that start with two 0s and end with three 1s only have 2 bits in the middle

Combinatorics has _ subdivisions: _____ & _________

2, Permutations and Combinations

How many solutions are there to the equation x1 + x2 + x3 + x4 + x5 + x6 = 29 where x(i) is a nonnegative integer such that: b) x1 ≥ 1, x2 ≥ 2, x3 ≥ 3, x4 ≥ 4, x5 ≥ 5, and x6 ≥ 6?

21 ones committed. Remains to assign 8 ones among the 5 zeros. C(13, 8) = 13! / 8!5! = 1,287

How many different three-letter initials with none of the letters repeated can people have?

26 x 25 x 24= 15600 26P3, p(26,3)

A password consists of two letters of the alphabet followed by three digits chosen from 0 to 9. Repeats are allowed. How many different possible passwords are there?

26 x 26 x 10 x 10 x 10 = 26 ^ 2 * 10 ^ 3 = 676,000

How many strings of length r can be formed from the uppercase letters of the English alphabet?

26^r

How many bit strings are there of length six or less, not counting the empty string? (000001 is different from 01)

2^1 + 2^2 + 2^3 + 2^4 + 2^5 + 2^6 = 126

Count the number of bit strings of length 5 00000, 10000,..., 11111

2^5

Consider a party with 366 people. Are there at least two people with the same birthday assuming a standard year?

365 container 366 objects yes pigeonhole

Every student in a discrete mathematics class is either a computer science or a mathematics major or is a joint major in these two subjects. How many students are in the class if there are 38 computer science majors (including joint majors), 23 mathematics majors (including joint majors), and 7 joint majors?

38 + 23 - 7 = 54

Show that among any set of 9 positive integers, there are 3 with the same remainder when divided by 4.

4 Containers =0,1,2,4 ; Objects 9 = 9/4 = 2.25 = 3

Show that among any set of 5 positive integers, there are 2 with the same remainder when divided by 4.

4 containers - 0,1,2,3 possible remainders 5 things

Consider a bag that contains 10 blue balls, 10 red balls, 20 green balls, and 20 yellow balls. Now suppose that we take n balls from the bag at random. a) How large does n need to be in order to guarantee that we get at least 3 balls of the same color?

4 containers result s3 9 balls

A bowl contains 10 red balls and 10 blue balls. A woman selects balls at random without looking at them. a) How many balls must she select to be sure of having at least three balls of the same color?

5 p (r-1) + 1 = 5 p=2; r = 3 ?? 2 x (3-1) + 1 = 5??

Count the number of possible levels Possible room designs: 5 different styles 6 color schemes 3 different luxury levels

5 x 6 x 3

Factorial notation/equation

5!=5×4×3×2×1=120

A computer network consists of six computers. Each computer is directly connected to at least one of the other computers. Show that there are at least two computers in the network that are directly connected to the same number of other computers.

6 objects/computers 5 containers/bins= 6/5 = 2

There are six different candidates for governor of a state. In how many different orders can the names of the candidates be printed on a ballot?

6! P(6,6) 720

Passwords must contain exactly 5 case sensitive alphanumeric characters and must have at LEAST one digit. How many possible passwords are there?

62^5 - 52^5 Subtract the combinations that you can't have, which are all the ones that don't have a digit.

A password must contain from 6 to 8 case sensitive alpha numeric characters. How many possible passwords are there?

62^6 + 62^7 + 62^8

How many strings of length 10 constructed from characters in the set {a, b, c, d, e, f} contain at least one occurrence of the letter 'a'. Order matters. (As usual the strings do not need to contain all 6 characters and can contain characters multiple times.)

6^10 - 5^10 =

Permutation notation

7P4=7×6×5×4=840 ; P(7,4)

An encyclopedia has eight volumes. In how many ways can the eight volumes be replaced on the shelf?

8! = P(8,8)

How many strings of four decimal digits have exactly three digits that are 9s?

999x 99x9 9x99 x999 x = 0-8 so there are only 9 digits to choose from This would be 9 x 4 = 36 ( 1 x 1 x 1 x 9) x 4 ways to arrange the 0-8 There are 4 choices of where to put the digit that is not 9. There are 9 choices (0-8). So 4 x 9 = 36.

Counting Permutations, Expressed as a multiplication

9×8×7×6×5×4×3×2×1= 362,880

How many ways are there to select four pieces of fruit from a bowl containing apples, oranges, and pears if the order in which the pieces are selected does not matter, only the type of fruit and not the individual piece matters, and there are at least four pieces of each type of fruit in the bowl?

C(3-1+4, 4) 6C4 n=3-1 r=4 stars and bars

A group of 30 people have been trained as astronauts to go on the first mission to Mars. How many ways are there to select a crew of six people to go on this mission (assuming that all crew members have the same job?

C(30,6)

How many ways are there to select 47 cards from a standard deck of 52 cards

C(52, 47)

How many poker hands of five cards can be dealt from a standard deck of 52 cards?

C(52, 5)

Suppose that there are 9 faculty members in the mathematics department and 11 in the computer science department. How many ways are there to select a committee to develop a discrete mathematics course at a school if the committee is to consist of three (3) faculty members from the mathematics department and four (4) from the computer science department?

C(9,3) x C(11,4)

Which formula is the same as Binomial Coefficient?

Combination w/o repetition = n choose r = nCr = C(n,r) = big parenthesis with 2 numbers vertically = Pascal's triangle

What is a Proper Probability Distribution?

Each p(x) probability function is between 0 and 1, and the Sum of p(x) is equal to 1.0 or 100%

How many solutions are there to the equation x1 + x2 + x3 + x4 + x5 + x6 = 29 where x(i) is a nonnegative integer such that d) x1 < 8 and x2 > 8?

Finally, to count all of the solutions where x1 < 8 and x2 > 8, we will count all of the solutions where x2 ≥ 9 and then exclude all of those solutions to that equation where x1 ≥ 8. The number of solutions where x2 ≥ 9 is the same as the number of ways you can choose 5 positions from 25, and the number of solutions where x2 ≥ 9 and x1 ≥ 8 is the same as the number of ways you can choose 5 positions from 17, so the number we seek is the difference C(25, 20) − C(17, 12) = (25! / 20!5!) − (17! / 12!5!) = 46,942

8 people, how many ways to order 3 without repetition of the people (or coins or balls, etc)

P w/o rep n = # of people = 8 r = # chosen = 3 8!/(8-3)! = 8 x 7 x 6

Multiplication counting principle

If there are m ways to make a first selection and n ways to make a second selection, there are m×n ways to make the two selections.

What is a Sample Space?

Is a set of Unique Outcomes

Consider a bag of jelly beans that has 100 red, 100 yellow, and 100 green jelly beans. d) How many color combinations of 10 beans have at LEAST two yellow beans?

Method #1) 2 must be yellow 10-2=8 can be any combination of 3 colors so n = 3, r = 8 = 10C8 (3 - 1 + 8)! / 8! (3 - 1)! = 10!/8! 2! = 45 C(10,8) = 45 Method #2) Total combos minus # with zero Y minus # with 1 Y = 12C10 - 11C10 - 10C9 = 66 - 11 - 10 =45

If six integers are selected from the first 10 positive integers, will at least 2 pairs be picked that sum to 11?

No, 6 picked numbers only guarantees one pair. 10 integers = 5 pairs that sum to 11. Once you pick 5 integers, every integer after 5 guarantees a pair.

Does order matter in combinations?

No, order does not matter.

Suppose that a saleswoman has to visit eight different cities. She must begin her trip in a specified city, but she can visit the other seven cities in any order she wishes. How many possible orders can the saleswoman use when visiting these cities?

P(7) = 7! = 5040

Consider a bag of jelly beans that has 100 red, 100 yellow, and 100 green jelly beans. b) How many color SEQUENCES can you get by drawing 5 beans from the bag?

Permutations with repitition 3^5

Let d be a positive integer. Show that among any group of d + 1 (not necessarily consecutive) integers there are two with exactly the same remainder when they are divided by d.

The remainders will always be 0,1,2,3...d-1, = d containers. d + 1 integers will be the objects. d + 1 > d ; there will always be one more number than containers.

How many ways are there for 10 women and six men to stand in a line so that no two men stand next to each other?

The women can be in any order: P(10, 10) = 3628800 There are then 11 places for a man: P(11, 6) = 332640 P(10, 10) x P(11, 6) = 1,207,084,032,000 10! * 11!/5!

How many solutions are there to the equation x1 + x2 + x3 + x4 + x5 + x6 = 29 where xi is a nonnegative integer such that a) xi > 1 for i = 1, 2, 3, 4, 5, 6?

Think of the "'+" signs as zeros and the values of the xi as strings of ones. For example, one solution to the problem of six non-negative integers, each greater than one, which sum to 29 is 7 + 5 + 2 + 2 + 2 + 11 = 29 and can be represented by the bit string 1111111011111011011011011111111111 a) If each xi > 1, that is each xi ≥ 2, then there are 12 ones assigned among the 5 zeros already and we need to assign 17 more ones among the 5 zeros. This amounts to the number of ways you can choose 5 (or 17) positions from 22. C(22, 5) = 22! / 5!17! = 26,334

Thirteen people on a softball team show up for a game. c) Of the 13 people who show up, three are women. How many ways are there to choose 10 players to take the field if at least one of these players must be a woman?

Two ways: 1) Subtract the one case where there are no women on the field. C(13, 10) - 1 = ( 13! / (3! 10!) ) - 1 = 286 -1 = 285 2) (10C7 x 3C3) + (10C8 x 3C2) + (10C9 x 3C1) = 285

Does order matter in Permutations?

Yes, order matters

How many solutions are there to the equation x1 + x2 + x3 + x4 + x5 + x6 = 29 where x(i) is a nonnegative integer such that c) x1 ≤ 5?

c) To count the number of solutions with x1 ≤ 5 is the same as counting all of the solutions (where each xi ≥ 0), and then excluding the solutions where x1 ≥ 6. As we have done above, the number of all solutions (where each xi ≥ 0) is the same as the number of ways you can choose 5 positions from 34, and the number of solutions where x1 ≥ 6 is the same as the number of ways you can choose 5 positions from 28, so the number we seek is the difference C(34, 29) − C(28,23) = 34! / 29!5! − 28!/ 23!5! = 179,976

Show that if there are 100,000,000 wage earners in the United States who earn LESS than 1,000,000 dollars (but at least a penny), then there are two who earned exactly the same amount of money, to the penny, last year.

containers 99,999,999 objects 100,000,000

How many different ways are there to choose a dozen donuts from the 21 varieties at a donut shop?

n = 21 r = 12 C(21 - 1 + 12, 12) = C(32, 12)

How many solutions are there to the equation x1 + x2 + x3 + x4 = 17, where x1, x2, x3, and x4 are non-negative integers?

n = 4 = choose from 4 bins r = 17 = things to choose C(4-1 + 17, 17) = C(20, 17) = 20C17 (4-1+17)! / 17! (4-1)! = = 20!/17! 3! = 1140 Stars and bars. The + signs are the dividers of the bins. One solution example: 5 + 5 + 5 + 2 =17 11111 0 11111 0 11111 0 11

In how many ways can we select three students from a group of five students to stand in line for a picture?

n = 5 r = 3 5P3, P(5,3) 5 x 4 x 3 5! / (5 - 3) !

How many different combinations of pennies, nickels, dimes, quarters, and half dollars can a piggy bank contain if it has 20 coins in it?

n = 5 ; r = 20 ; (n - 1 + r)! / (n - 1)! r! (5 - 1 + 20) / (5-1)! 20! = 24! / 4! 20! = 10,626 = C(n,r) = C(5-1 + 20, 20) = C(24, 20)

Consider a bag that contains 10 blue balls, 10 red balls, 20 green balls, and 20 yellow balls. Now suppose that we take n balls from the bag at random. a) How large does n need to be in order to guarantee that we get at least 3 blue balls?

n = 53

How many ways are there to select five bills from a cash box containing $1 bills, $2 bills, $5 bills, $10 bills, $20 bills, $50 bills, and $100 bills? Assume that the order in which the bills are chosen does not matter, that the bills of each denomination are indistinguishable, and that there are at least five bills of each type.

n = 7-1 r = 5 C(7-1+5, 5 ) = 11C5 or 11C6 Key to combinations w/o replacement! Stars and bars = picks and moves Each n is a move and starting at the first n means there are n-1 moves and r picks. So the question becomes, how many ways can you combine a total of n-1 moves (or stars) plus r picks (or bars) when you pick r of the total.

n! means:

n Factorial

Combination w/o replacement formula

n! / ( (n-r)! r! ) - same as P w/o repetition but then need to remove the repetitions - the repetitions are = to r! (3! = 3 x 2 x 1) - so divide P(n,k) by r! : (n!/(n-r)!) / r! Known as = n choose r = Pascal's triangle = Binomial Coefficient = nCr = C(n,r) = big parenthesis with 2 numbers vertically

permutation w/o repetition formula ; show math expression using P, n, r

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

How many ways are there to select five UNORDERED elements from a set with three elements when repetition is allowed?

n= 3 r= 5 C(3-1+5, 5) = 21 Combinations. With repetition. n = 3 ; r = 5 Therefore the number of possible ways is C(n-1+r, r)

Consider a bag of jelly beans that has 100 red, 100 yellow, and 100 green jelly beans. a) How many color COMBINATIONS can you get by drawing 10 beans from the bag?

n= 3, r=10 3-1+10C10 = 12C10 (3-1+10)! / 3-1! 10! = 66

Suppose that a cookie shop has four different kinds of cookies. How many different ways can six cookies be chosen? Assume that only the type of cookie, and not the individual cookies or the order in which they are chosen, matters.

n= 4-1 r = 6 C(4-1+6, 6) 9C6 84

In how many ways can a committee of 5 be chosen from 10 people?

n=10, r = 5, C(10, 5)

Combination formula, without replacement:

nCr = n! / (n-r)! r! # of ways to choose / combine (r) items from (n) items

Permutation formula, without replacement:

nPr = n!/(n-r)! # of ways to permute (r) chosen items from a set of (n) items.

Permutation notation. What do the components of the expression nPr represent?

nPr The expression nPr represents the number of permutations of n objects arranged r at a time.

permutation with repetition formula, e.g., how many permutations of 5 digits?

n^r

permutation with repetition formula - binary (0, 1), coin flips

n^r 2^r

combination

order does not matter (COD)

permutation

order matters (POM POM)

How many strings are there that use each character in the set {a, b, c, d, e} exactly once (i.e. permutations of {a,b,c,d,e}) and that contain the sequence 'de' somewhere in the string?

p(4,4) = 24 1) "de" count as one n and one r, so: 4! = p(4.4) 2) The sequence "de" can show up in the first through fourth positions (4), and there are 3 characters left to permute (3!). 4 x P(3,3) = 4 x 3! = 4 x 6 = 24


Conjuntos de estudio relacionados

Demonstrative Pronouns: (this, that, these, those)

View Set

technology engineering unit 4 quiz

View Set

*HURST REVIEW Qbank/Customize Quiz - Basic Care and Comfort, *HURST REVIEW Qbank/Customize Quiz - Adult Health, *HURST REVIEW Qbank/Customize Quiz - Management of care, *HURST REVIEW Qbank/Customize Quiz - Leadership, *HURST REVIEW Qbank/Customize Qu...

View Set

romanticism and transcendentalism (11/6)

View Set

American History Since 1877 Exam 1 Review: Quizzes (ch. 17-20)

View Set