Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to Probability and Counting

Similar presentations


Presentation on theme: "Introduction to Probability and Counting"— Presentation transcript:

1 Introduction to Probability and Counting
AoPS: Introduction to Probability and Counting

2 Correcting for Overcounting
Chapter 3 Correcting for Overcounting

3 Permutations with Repeated Elements
Let’s start with a problem we should (hopefully) already know how to do. Problem 3.1: How many possible distinct arrangements are there of the letters in the word DOG?

4 Problem 3.1 How many possible distinct arrangements are there of the letters in the word DOG? We could list them or we should know by now that there are 3 ways to pick the 1st, 2 ways to pick the 2nd, and 1 way to pick the last letter, for a total of 3! = 6 ways. This is just a basic permutation problem like in Chapter 1.

5 Problem 3.2 How many possible distinct arrangements are there of the letters in the word BALL?

6 Solution 3.2 How many possible distinct arrangements are there of the letters in the word BALL? The Bogus Solution: 4! possibilities. That’s because BAL1L2 and BAL2L1 are the same once the subscripts are removed, so we have over-counted and need to correct this.

7 Solution 3.2 How many possible distinct arrangements are there of the letters in the word BALL? The Bogus Solution is 4! Possibilities. That’s because BAL1L2 and BAL2L1 are the same once the subscripts are removed, so we have over-counted and need to correct this. So we have to divide the # of arrangements by 2! because the L’s can be arranged 2 different ways: 4! / 2! = 12

8 Problem 3.3 How many distinct arrangements are there of TATTER?

9 Solution 3.3 TATTER: pretend that all the T’s are different (T1, T2, and T3). Then are are 6! possibilities. The 3 T’s can be arranged in 3! different ways, which leads to overcounting. The solution: 6! / 3! = 120. This is called strategic overcounting.

10 Problem 3.4 One more twist: How many distinct arrangements are there of PAPA?

11 Solution 3.4 One more twist: How many distinct arrangements are there of PAPA? Simple: because the P’s repeat twice and the A’s repeat twice, the answer is 4! / (2! X 2!) = 6 ways

12 Exercise 3.1 Compute the # of distinct arrangements of the letters in the word EDGE.

13 Solution 3.1 Compute the # of distinct arrangements of the letters in the word EDGE. 4! / 2! = 12 ways

14 Exercise 3.2 For each of the following words, determine the #
of ways to arrange the letters of the word. WAR THAT CEASE ALABAMA MISSISSIPPI

15 Solution 3.2 For each of the following words, determine the #
of ways to arrange the letters of the word. WAR = 3! = 6 THAT = 4! / 2! = 12 CEASE = 5! / 2! = 60 ALABAMA = 7! / 4! = 210 MISSISSIPPI = 11! / (4! X 4! X 2!) = 34,650

16 Problem 3.3 I have 5 books, two of which are identical copies of the same math book (and all of the rest of the books are different.) In how many ways can I arrange them on the shelf?

17 Solution 3.3 I have 5 books, two of which are identical copies of the same math book (and all of the rest of the books are different.) In how many ways can I arrange them on the shelf? 5! / 2! = 60

18 Problem 3.4 There are 8 pens along a wall in the pound. The pound has to allocate 4 pens to dogs, 3 to cats, and one to roosters. In how many ways can the pound make the allocation?

19 Solution 3.4 There are 8 pens along a wall in the pound. The pound has to allocate 4 pens to dogs, 3 to cats, and one to roosters. In how many ways can the pound make the allocation? 8! / (4! X 3!) = 280

20 Counting Pairs of Items
A round-robin tennis tournament consists of each player playing every other player exactly once. How many matches will be held during the an 8- person round-robin tournament?

21 Counting Pairs of Items
A round-robin tennis tournament consists of each player playing every other player exactly once. How many matches will be held during the an 8- person round-robin tournament? Bogus Solution: Each of the 8 players plays 7 games, or 8 x 7 = 56 total games played.

22 Counting Pairs of Items
A round-robin tennis tournament consists of each player playing every other player exactly once. How many matches will be held during the an 8- person round-robin tournament? Alice plays Bob and Bob plays Alice, but it’s the same game, so 8 x 7 = 28. 2

23 Counting Pairs of Items
Another way to look at the problem: Alice plays 7 matches. Bob also plays 7 matches, but the one with Alice has already been counted, leaving Bob with 6 more to play. The next player, Carol, has already played A & B, so Carol has 5 more matches to play, and so on down the line, to the last player.

24 Counting Pairs of Items
Another way to look at the problem: Alice plays 7 matches. Bob also plays 7 matches, but the one with Alice has already been counted, leaving Bob with 6 more to play. The next player, Carol, has already played A & B, so Carol has 5 more matches to play, and so on down the line, to the last player. That means we have a total of = 28 games total played

25 Counting Pairs of Items
That means we have a total of = 28 games total played. This is a classic example of counting pairs of objects.

26 Problem 3.5 Compute the sum of the 1st 4 positive integers. Compute the sum of of the 1st 5 positive integers. Compute the sum of … of the 1st 10 positive integers. Find a formula for the sum of the 1st n positive integers. Compute the sum of … of the 1st 100 positive integers.

27 Solution 3.5 Compute the sum of the 1st 4 positive integers. 10 Compute the sum of of the 1st 5 positive integers. 15 Compute the sum of … of the 1st 10 positive integers. 55 Find a formula for the sum of the 1st n positive integers. [n (n + 1)] / 2 Compute the sum of … of the 1st 100 positive integers

28 Problem 3.6 A round-robin tennis tournament consists of each player playing every other player exactly once. How many matches will be held during a n-person round-robin tennis tournament, where n > 2 is a positive integer?

29 Solution 3.6 A round-robin tennis tournament consists of each player playing every other player exactly once. How many matches will be held during a n-person round-robin tennis tournament, where n > 2 is a positive integer? Each of the n players must play every other player, so each player must play n – 1 matches which gives the preliminary count n (n – 1) matches.

30 Solution 3.6 Each of the n players must play every other player, so each player must play n – 1 matches which gives the preliminary count n (n – 1) matches. But this counts each match twice, so divide by 2 to get n (n – 1) 2

31 Problem 3.7 A convex polygon is a polygon in which every interior angles is less than 180°. A diagonal of a convex polygon is a line segment which connects 2 non-adjacent vertices. Find a formula for the # of diagonals of a convex polygon with n sides, where n is any positive integer greater than 2.

32 Solution 3.7 A polygon with n sides has n vertices. A diagonal corresponds to a pair of vertices. By similar reasoning to Prob. 3.6, there are n (n – 1) pairs 2 of vertices.

33 Solution 3.7 A polygon with n sides has n vertices. A diagonal corresponds to a pair of vertices. By similar reasoning to Prob. 3.6, there are n (n – 1) pairs 2 of vertices. However n of these pairs correspond to edges of the polygons rather than diagonals, so subtract these from the count: the # of diagonals n (n – 1) - n

34 Solution 3.7 Simplifying this expression n (n – 1) - n 2
leads to the following: n (n – 3) If you’re interested in the math behind this transformation, I can show it to you; all you have to do is ask!

35 Exercise 3.3.1 A club has 15 members and needs to choose 2 members to be co-presidents. In how many ways can the club choose its co-presidents?

36 Solution 3.3.1 A club has 15 members and needs to choose 2 members to be co-presidents. In how many ways can the club choose its co-presidents? If the co-president positions are unique, there are 15 choices for the 1st and 14 choices for the 2nd. However, since the positions are identical, we must divide by 2! (the # of arrangements of co- presidents) = (15 x 14) / 2! = 105 ways.

37 Exercise 3.3.2 I have twenty balls numbered 1 through 20 in a bin. In how many ways can I select 2 balls is the order in which I draw them doesn’t matter?

38 Solution 3.3.2 I have twenty balls numbered 1 through 20 in a bin. In how many ways can I select 2 balls is the order in which I draw them doesn’t matter? This is like the previous problem, so we get (20 x 19) / 2! = 190

39 Exercise 3.3.3 A sports conference has 14 teams in two divisions of 7. How many games are in a complete season for the conference if each team must play every other team in its own division twice and every team in the other division once?

40 Solution 3.3.3 A sports conference has 14 teams in two divisions of 7. How many games are in a complete season for the conference if each team must play every other team in its own division twice and every team in the other division once? Each team plays 6 other teams in its division twice and the other 7 teams once, for a total of 6 x = 19 games for each team.

41 Solution 3.3.3 Each team plays 6 other teams in its division twice and the other 7 teams once, for a total of 6 x = 19 games for each team. There are 14 teams total, which gives a preliminary count of 19 x 14 = 266 games, but we must divide by 2 because we counted each game twice. The answer is (19 x 14) / 2 = 133 games.

42 Exercise 3.3.4 Find a formula for the sum of the 1st n even integers: … + 2n. Find a formula for the sum of the 1st n odd integers: … + (2n – 1).

43 Solution 3.3.4 Find a formula for the sum of the 1st n even integers: … + 2n. Let S = … + 2n. ( S had n terms.) Another expression for S is 2n + … , so adding these together we obtain the equation 2S = (2n + 2) + (2n + 2) + … + (2n + 2) .

44 Solution 3.3.4 Find a formula for the sum of the 1st n even integers: … + 2n. Let S = … + 2n. ( S had n terms.) Another expression for S is 2n + … , so adding these together we obtain the equation 2S = (2n + 2) + (2n + 2) + … + (2n + 2) . This sum has n terms, so 2S = n (2n + 2) = 2n (n + 1), and S = n (n + 1)

45 Solution 3.3.4 Let S = … + 2n. ( S had n terms.) Another expression for S is 2n + … , so adding these together we obtain the equation 2S = (2n + 2) + (2n + 2) + … + (2n + 2) . This sum has n terms, so 2S = n (2n + 2) = 2n (n + 1), and S = n (n + 1) OR, S = 2( …+n) = 2(n(n + 1)) = 2 n (n + 1).

46 Solution 3.3.4 (b) Find a formula for the sum of the 1st n odd integers: … + (2n – 1). Let S = … + (2n – 1). (S has n terms.) Another expression for S = (2n – 1) + … , so adding these together we get the equation 2S = 2n + 2n + … + 2n.

47 Solution 3.3.4 (b) Find a formula for the sum of the 1st n odd integers: … + (2n – 1). Let S = … + (2n – 1). (S has n terms.) Another expression for S = (2n – 1) + … , so adding these together we get the equation 2S = 2n + 2n + … + 2n. This sum has n terms, so 2S = n (2n) = 2n2 so S = n2.

48 Exercise 3.3.5 How many interior diagonals does an icosahedron have? ( An icosahedron is a 3-dimentional figure with 20 triangular faces and 12 vertices, with 5 faces meeting at each vertex. An interior diagonal is a segment connecting two vertices which do not lie on a common face.)

49 Solution 3.3.5 How many interior diagonals does an icosahedron have? There are 12 vertices in the icosahedron, so there are potentially 11 other vertices to which we could extend a diagonal. However 5 of these 11 points are connected to the original point by an edge, so they are not connected by internal diagonals.

50 Solution 3.3.5 There are 12 vertices in the icosahedron, so there are potentially 11 other vertices to which we could extend a diagonal. However 5 of these 11 points are connected to the original point by an edge, so they are not connected by internal diagonals. So each vertex is connected to 6 other points by interior diagonals. This gives the preliminary count of 12 x 6 = 72 interior diagonals. However, they were counted twice, so divide by 2 = 36 diag.

51 Counting with Symmetries
Problem 3.8 In how many ways can 6 people be seated at a round table? Two seating arrange- ments are considered the same if, for each person, the person to his left or right is the same in both arrangements. In other words, the 2 arrangements shown are the same. C A F B B D E C A E D F

52 Counting with Symmetries
Solution 3.8 If 6 people were sitting in a row, there would be 6! arrangements. But this is a case of overcounting. The reason for this is the problem has rotational symmetry: therefore, we must divide the overcount by 6, so the answer is 6! / 6 = 5! = 120 C A F B B D E C A E D F

53 Counting with Symmetries
Solution 3.8 There is another way to solve the problem, using a constructive counting approach. First place person A. Since all rotations of the same seating are considered identical, person A is essentially “fixed” the rotation. Place the rest of the people in the usual way. C A F B B D E C A E D F

54 Counting with Symmetries
Solution 3.8 There are 5 choices for where to place person B, 4 remaining choices for where to place person C, etc., for a total of 5 x 4 x 3 x 2 x 1= 5! = 120 possible seatings. C A F B B D E C A E D F

55 Exercise 3.4.1 In how many ways can 8 people be seated around a round table?

56 Solution 3.4.1 In how many ways can 8 people be seated around a round table? There are 8! ways to place the people around the table, but this counts each valid arrangement 8 times (once for each rotation of the same arrange- ment). The answer is 8! / 8 = 7! = 5040.

57 Solution 3.4.2 In how many ways can 5 keys be placed on a key- chain? There are 5! ways to place the keys on the key- chain, but we must divide by 5 for rotational symmetry (5 rotations for each arrangement) and by 2 for reflectional symmetry (flip the keychain to get the same arrangement). 5! / (5 x 2) = 12.

58 Exercise 3.4.3 A Senate committee has 5 Democrats and 5
Republicans. In how many ways can they sit around a circular table: without restrictions? if all the members of each party all sit next to each other? if each member sits next to members of the other party?

59 Solution 3.4.3 A Senate committee has 5 Democrats and 5
Republicans. In how many ways can they sit around a circular table: without restrictions? There are 10 people to place, so place them in 10! ways, but this counts each valid arrangement 10 times (once for each rotation of the same arrange- ment). So the # of ways to seat them is 10! / 10 = 9! = 362,880.

60 Solution 3.4.3 A Senate committee has 5 Democrats and 5
Republicans. In how many ways can they sit around a circular table: (b) if all the members of each party all sit next to each other? Choose any 5 seats in which to seat the Democrats it doesn’t matter which 5 consecutive seats we choose. Then there are 5! ways to place the D’s and 5! ways to place the R’s in their seats for the total: 5! x 5! = 14, 400.

61 Solution 3.4.3 (c) if each member sits next to members of the other party? The only way the Senators can be seated is if the seats alternate by party. D R R D D R R D D R

62 Solution 3.4.3 Fix the rotation by placing the youngest Democrat in the top seat, so that we have removed the over- counting of rotations of the same arrangement. D R R D D R R D D R

63 Solution 3.4.3 Now there are 4! ways to place the Democrats left in the other Democrat seats, and 5! ways to place the Republicans in the Republican seats, for a total of 5! x 4! = 2,880 arrangements. D R R D D R R D D R

64 Problem 3.4.4 In how many ways can we seat 6 people around a table if Fred and Gwen insist on sitting opposite each other?

65 Solution 3.4.4 In how many ways can we seat 6 people around a table if Fred and Gwen insist on sitting opposite each other? There are 6 choices of seats for Fred to sit in. Once Fred is seated, then Gwen must sit opposite him. This leaves 4 people to place in the four remaining seats, which can be done 4! ways.

66 Solution 3.4.4 There are 6 choices of seats for Fred to sit in. Once Fred is seated, then Gwen must sit opposite him. This leaves 4 people to place in the four remaining seats, which can be done 4! ways. However, we must divide by 6 to account for the 6 rotations of the table. So the # of arrangements is (6 x 1 x 4!) / 6 = 4! = 24.

67 Problem 3.4.5 In how many ways can we seat 8 people around a table if Alice and Bob won’t sit next to each other?

68 Solution 3.4.5 In how many ways can we seat 8 people around a table if Alice and Bob won’t sit next to each other? There are 8 choices for seats for Alice. Once Alice is seated, there are 5 seats left for Bob, since he won’t sit in either seat immediately next to Alice. This leaves 6 people to place in the remaining 6 seats, which can be done 6! ways.

69 Solution 3.4.5 There are 8 choices for seats for Alice. Once Alice is seated, there are 5 seats left for Bob, since he won’t sit in either seat immediately next to Alice. This leaves 6 people to place in the remaining 6 seats, which can be done 6! ways. However, we must divide by 8 to account for the 8 rotations of the table. So the # of arrangements is (8 x 5 x 6!) / 8 = 5 x 6! = 3600.

70 Review 3.11 How many arrangements are there of ‘ste1e2e3’
(consider e1,e2,e3 to be different letters)? (b) List the arrangements of ‘ste1e2e3’ which have ‘st’ as the 1st two letters. How many are there? (c) List the arrangements of ‘steee’ (The e’s are all the same this time.) How many are there? (d) Let p be the answer to (a), q be the answer to (b) and r be the answer to (c). Is p/q = r? If so, why must it be so? If not, why not?

71 Solution 3.11 How many arrangements are there of ‘ste1e2e3’
(consider e1,e2,e3 to be different letters)? This is the # of ways to arrange 5 unique objects, which is 5! = 120.

72 Solution 3.11 (b) List the arrangements of ‘ste1e2e3’ which have ‘st’ as the 1st two letters. How many are there? ste1e2e3, ste1e3e2, ste2e1e3, ste2e3e1, ste3e1e2, and ste3e2e1, giving 6 arrangements.

73 Solution 3.11 (c) List the arrangements of ‘steee’ (The e’s are all the same this time.) How many are there? steee, setee, seete, seeet, estee, esete, eseet, eeste, eeset, eeest, tseee, tesee, teese, teees, etsee, etese, etees, eetse, eetes, eeets, giving 20 arrangements.

74 Solution 3.11 (d) Let p be the answer to (a), q be the answer to (b) and r be the answer to (c). Is p/q = r? If so, why must it be so? If not, why not? Yes, we see that 120/6 = 20. The # q counts the number of ways that each arrangement from part (c) is overcounted in part (a), so we must divide p by q to get the number of arrangements r in part (c).

75 Review 3.12 Determine the # of arrangements of the following: FOUR
NINE RADII GAMMAS COMBINATION

76 Solution 3.12 Determine the # of arrangements of the following: FOUR
All the letters are unique, so 4! = 24.

77 Solution 3.12 Determine the # of arrangements of the following: (b) NINE 1st count the arrangements if the two N’s are unique, which is 4!. Then since the N’s are not unique, divide by 2!. The answer is 4! / 2! = 12.

78 Solution 3.12 Determine the # of arrangements of the following: (c) RADII 1st account for the I’s as if they are unique, 5!. Then since the I’s are not unique, divide by 2! so the answer is 5! / 2! = 60.

79 Solution 3.12 Determine the # of arrangements of the following: (d) GAMMAS There are 2 A’s, 2 M’s, and six total letters, so 6! / (2! x 2!) = 180.

80 Solution 3.12 Determine the # of arrangements of the following: (e) COMBINATION Eleven total letters, two O’s, two I’s, and two N’s. 11! / (2! x 2! x 2!) = 4,989,600.

81 Review 3.13 I have 3 identical math books, 3 identical English books, and 2 identical French books. In how many ways can I arrange them on the shelf is all I care about is the order of the subjects (in other words, all 3 math books are considered the same)?

82 Solution 3.13 I have 3 identical math books, 3 identical English books, and 2 identical French books. In how many ways can I arrange them on the shelf is all I care about is the order of the subjects (in other words, all 3 math books are considered the same)? There are 8! ways to arrange the books if they are unique, but we must divide out the permutations of identical books, so 8! / (3! x 3! x 2!) = 560.

83 Review 3.14 In how many ways can the digits 45, 520 be arranged to form a 5-digit number?

84 Solution 3.14 In how many ways can the digits 45, 520 be arranged to form a 5-digit number? 1st place the 0, which has only 4 options (0 cannot be the 1st digit). Then there are 4 remaining places to put the last 4 digits, two of which are not unique (5’s), so there are 4! / 2! options for arranging the other 4 digits. The answer is (4 x 4!) / 2! = 48.

85 Review 3.18 There are 6 married couples at a party. At the start of the party, every person shakes hands once with every other person except with his or her spouse. How many handshakes are there?

86 Solution 3.18 There are 6 married couples at a party. At the start of the party, every person shakes hands once with every other person except with his or her spouse. How many handshakes are there? All 12 people shake hands with 10 other people (everyone except themselves and their spouses). In muliplying 12 x 10, each handshake is counted twice, so we divide by two. (12 x 10) / 2 = 60.

87 Review 3.19 Seven points are marked on the circumference of a circle. How many different chords can be drawn by connecting two of these seven points? (Source: MATHCOUNTS).

88 Solution 3.19 Seven points are marked on the circumference of a circle. How many different chords can be drawn by connecting two of these seven points? (Source: MATHCOUNTS). Choose two out of seven points (without regard to order) in (7 x 6) / 2 = 21 ways, so there are 21 chords.

89 Review 3.20 How many pairs of vertical angles are formed by five distinct lines that have a common point of intersection? (Source: MATHCOUNTS)

90 Solution 3.20 How many pairs of vertical angles are formed by five distinct lines that have a common point of intersection? (Source: MATHCOUNTS) Each pair of lines will give two pairs of vertical angles. There are (5 x 4) / 2 = 10 ways to choose a pair of lines, therefore there are 2 x 10 = 20 pairs of vertical angles.


Download ppt "Introduction to Probability and Counting"

Similar presentations


Ads by Google