This page has solutions for selected questions from this tutorial sheet.
This tutorial is on combinatorics and counting. Please do not use these as lecture notes. You should make an earnest attempt and pretty much solve the tutorial questions before referring to the solutions. This means I will say “you should already know this/you should already know that” without much explanation on what exactly it is in detail.
Question 1
Part (a)
First thing to note, the question says “with replacement”. Now the “direct” way of solving this would be to literally get the probability that there is exactly 1 queen, and the probability there is exactly 2 queens, and 3 queens, and 4 queens, and 5 queens.
But that’s cumbersome. The alternative is to note that since we’re drawing 5 cards, it’s there’s either 0, 1, 2, 3, 4, or 5 queens drawn. These are mutually exclusive events. If we drew 5 cards with replacement, and say we know there were exactly 3 queens, then the probability there were exactly 4 queens **given the fact that there were exactly 3 queens is .
I.e. Let be the probability that there were exactly queens of the 5 cards drawn with replacement. Then:
So we want . This happens to just be .
And what’s ? The probability no queens were drawn. Since it’s with replacement, each draw has the same distribution. There are queens, and in total, cards. So there are possible cards that are not queens. That’s also the probability any single draw is not a queen.
So the probability all 5 draws are not queens are: . And now the probability we draw at least one queen is .
What if we wanted the number of sequences itself? There’s two ways to get this. One is, you take the probability we got, and multiply by the number of possible sequences, which happens to be . So we get: . There happens to be another way. We can do the same idea, but with counts instead of probabilities.
There are possible sequences.Let be the number of possible 5-draws such that there are exactly queens in the 5 draws. Again, we have:
Which means:
So let’s find . That happens to be . Why? Because for each draw, there are possible cards we could have taken that are not the queen. Each draw must not have a queen, so for each possible draw, there aer choices, and we need to repeat this times.
So the answer is still .
Part (b)
This question works similarly. We just want to remove the case that there are no queens, and no kings. The number of sequences with no kings and no queens happens to be: .
So answer is .
Question 2
Assuming the only digits that can be confused are 0, 1, 6, 8, and 9. There are 5 possible digits, and each digit can take on 5 possible values. So .
Except, some numbers cannot be confused. E.g. will not be confused regardless of whether it is upside down or not.
So, we want to remove the numbers whose digits only come from but are the same as themselves when they’re upside down.
There are such numbers. The moment we choose the first digit, we have determined our last digit. If the first digit is either , then the last digit is also the same number. If the first digit is or , then the other digit is either or .
So in total: .
Question 3
We are going to use the principle of inclusion-exclusion here. Let be the count on the number of permutations where integer is in the correct position in the permutation. Likewise define and similarly. Now the question wants .
If we let be the set of permutations for which is in the correct position. Define and similarly. then
Thus,
Question 4
This one can sort of be done a little mechanically. Let’s do it step by step:
- There are possible white ball run lengths: through .
- Fixing a length , there are possible starting points for the white ball run.
Therefore, the total number of arrangements is:
Question 5
Part (a)
To make no two girls sit together, here’s the idea:
- Fix a circular permutation of the guys.
- Treat the slots in between the guys as “potential slots”. They don’t all have to be taken, but from them we need to pick 4 slots. Then we can seat the girls there.
So in total:
Question
Let’s try it with smaller values so I can actually draw it feasibly. Let’s say there are boys, and girls instead.
Part (b)
To do this, it’s far easier to count the number of ways in which Eric and Freddy sit next to each other. So, pair the two of them together. So either Eric before Freddy, or Freddy before Eric. Now we treat them as a single piece and parade them around the table.
- Fix an arrangement of Eric and Freddy. There are 2 possible arrangements.
- There are items (not because Eric and Freddy are now joined at the hip), and there are such arrangements.
Therefore, in total: where Eric and Freddy are adjacent. There are ways to seat anyone without restrictions. Thus the answer is .
Alternative Solution:
There’s an alternative solution where we seat everyone else except Freddy first first, then note that there are possible seats for Freddy. So there are possible solutions.
Like so:
Part (c)
This is really similar to the guys vs girls question. You have people, and you can make one more fake person called “EMPTY CHAIR”.
So it’s really just how would you seat people. In which case there are ways.
Question 6
Fix the word “I” first. There are 3 possible relative positions for where “IT” can go. In position 2, we are not worried about whether it is arranged as “IT” or “TI”.
So in case 1: There are ways to arrange each letter. Also, in this case, “IT” is fixed at position 2, so all that remains is to fix “CAN” and “DO” at either positions 1 and 3. There are possible ways. So in total .
Case 2: The other case where “IT” is either in position 1 or position 3. Then when that is chosen, the arrangement of the letters of of “IT” is fixed since it needs to arranged away from the “I”. Again the “CAN” and “DO” can be freely permuted, and we can pick wherever they go.
So in total: , ways to pick where “IT” sits (and the permutations is fixed), permutations of “CAN”, permutations of “DO”, and possible ways to pick where “CAN” and “DO” are placed.
Except, when “I” is next to “IT”, both arrangements are the same. Since the “T” is just sandwiched by “I” on both sides. So for case 2, we need to divide by 2.
This means the total count is .
Question 7
So either:
- All 5 men
- 4 men, 1 woman
- 3 men, 2 women We don’t care about the ordering.
In total:
We already know the count for the cases we care about. We just need the total possible cases. That happens to be picking people from any of the
So that is .
So the probability is .
Question 8
This is called stars-and-bars. You can Google it to look up the technique.
Part (a)
You have stars, and you need to draw bars to split up the stars into parts. That’s like saying there are possible slots. of them are stars, and of them are bars.
Part (b)
Since you need not invest all the money, you can instead choose to draw bars, to split up the stars into parts. The first parts are for investment, and the last part remains uninvested.
Question 9
So here’s the idea: the number 51 is pretty suspicious. Why? Because it says 51, and that’s 1 above, 25, which is a perfect square.
So take your unit square and divvy it up into 25 sub-squares. You can do this by picking your sub-square side length to be . Then there are 25 sub-squares. By PHP there is a square with 3 points. In the “worst case”, the points are at most apart (the hypothenuse). To be clear:
Now a circle with diameter will cover the 3 points. Which means a circle with diameter .
Question 10
When you take a number and ask for the remainder mod , there are only 4 possible answers: or . Therefore if you have numbers, at least two of them mod to the same value. This means their difference is a multiple of .
Question 11
This one is a little trippy.
Let be the running some of the total games played up to their respective days. E.g. is the total number of games played in day 1 and day 2.
Now we also consider values be another sequence of variables.
Okay so there are a few restrictions. First up: So this first set of variables are all distinct. Similarly, must be all distinct.
Okay each of these variables need to be assigned a value. These values can range from to . Why? Because maxes out at , so maxes out at . We’re going to be generous and say any variable here can take any value, as long as the first set of variables take distinct values, and the second set of variables also take distinct values.
In total there are variables, and for each we can pick one of values. By PHP, there must be two variables that take the same value. Also since are distinct, and are distinct. So it must be that for some and . But that means that there is a run of days for which the total games played is .