This page has solutions for selected questions from this tutorial sheet.
This tutorial is on combinatorics, and basic probability. 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
This is just another way of saying find the coefficient of the term . The idea is to use the fact that:
For , we can write it using the above identity to become:
Now, we need , so or . Plugging that value of in, we get:
Question 2
So for this question we’re just picking a start point and an end point for the run of white balls.
So from dotted lines, we wish to pick of them.
Question 3
Part (a)
Let . Now we know that for and , . You might be expected to infer from this that and .
We also know that:
Part (b)
So here’s the idea, we want where where and are random variables with the distribution from part (a), and is a random variable defined as above.
So first of all, we should probably try to find the distribution for . To do this, it’s easier if we have the following probabilities for all :
Now, the probability that is when exactly either and or and , or .
So working it out:
Okay now we take all the parts and get the expectation:
Question 4
This question actually exposes something interesting. Notice how the question does not specify with or without replacement when finding the sum of expectations? That’s because it doesn’t matter. I’ll sketch out the idea for why not later on.
Let be the random variable that have the same distribution , , . They may or may not be independent.
Now .
Then
By the way, the reason why we can use this has a very important subtlety that no one has mentioned properly. Refer to these notes on LoE for a thorough explanation. It will also cover not just the subtleties behind the question but also the proof for the linearity of the expectation.
Question 5
Based on the text we have, we can get the following quantities:
Part (a)
Now the question is asking given that it is positive, what is the probability he actually has the disease? So what we want is . We’ll use Bayes’ theorem here:
Part (b)
Now what we instead want is .
Here, notice that . Why? Because conditioned on being positive, you either have or don’t have the disease. So the two probabilities need to sum to 1.
Question 6
There are two ways to solve this. The question first notes that some basically satisfies . Which means we can view as a relation. We are picking any relation uniformly at random. So one way of viewing this is that we get some relation with probability . However, I would argue this is a little cumbersome because it doesn’t tell us anything useful about what’s the probability any two are related with a randomly chosen .
That said, if we insist on it, here’s how we’d do it.
Part (a)
For to be reflexive, we must have that for all . So to count all subsets that satisfy this, we simply fix those possible elements of , and there are remaining choices for which can either be in, or not in.
Part (b)
So fix any (not necessarily distinct). Now for each of these, the moment we’ve chosen , then we must also have (and vice versa). So now we count the number of possible sets . For distinct , each of these we need to decide if both and , or both are not in. There are also values for which we need to decide if is in or not. So
Question 7
None of the graphs in the question are Hamiltonian since we would need to re-visit the center node more than twice.
That said, is Hamiltonian because:
All of these graphs are Eulerian because all vertices have even degree.
Question 8
We have nodes, and edges. This means we need to pick from the set with replacement. So there are . Except, we don’t care about the order in which we pick the edges, and we also don’t distinguish between the two nodes (since we only want to count non-isomorphic graphs). So:
Question 9
Nothing much to say here for this question.
Part (c)
, , . The last two use either or .
, using either then or the other way around. or using only or using only . .
Part (d)
(where all the paths are taken from part ) using either or .
Question 10
So we’ll go back to doing PHP here. The idea is the following: there are people, these are our vertices. Draw an edge between two vertices if the two people shook hands. The degree is the number of edges incident to that node.
So now we know there exists at least one node such that (since the host shook hands with everyone else). This also means that . Since everyone shook hands with the host. Also everyone’s degree is at most (that’s the maximum amount of people you can shake hands with).
So there are to possible values for the degree of each vertex, and there are vertices. So two nodes need to have the same degree (by PHP).
Question 11
I don’t think there’s much to say here so here are just some graphs that answer each part:
Part (a)
Part (b)
Question 12
Now this question is a little interesting. For newcomers to this flavour of questions might find it a bit hard because it has this “either or ” kind of thing so it becomes hard to tell “oh should it be or ?”
Personally when I see a question like this, one default option for me is to do the following: “I will now aim to prove if does not have any triangles, then has at least one.” Why? Again to prove we can instead prove since .
So we’ll just do that this time around as well. Though it’s a little more complicated because it’s a lot more natural for the proof to say some stuff about or first before we do any of that stuff.
- Consider any . Since there are other vertices besides , let the other vertices be pigeons, and let the fact whether is incident to those vertices or not be pigeonholes.
- There are pigeons, and holes. So now there exist vertices are either incident to or not.
- Case 1: There exist vertices that are incident to . 2. Now assume that does not have any triangles. 3. Let the vertices incident to be called . 4. Since there are no triangles in , this means that we cannot have , otherwise since and in we would already have a triangle. 5. For a similar reason, we cannot have , nor . 6. But this means that are edges in . 7. Then vertices form a triangle in . 8. Therefore either or has a triangle. (We assumed has no triangles and were able to conclude has a triangle)
- Case 2: There exist vertices that are not incident to .
- Now assume that does not have any triangles.
- Let the vertices not incident to be called .
- Now we must have (Why? Hint: Check case and see how to adapt that argument for case 2 instead)
- This means that has a triangle since vertices form a triangle in .
- Therefore either or has a triangle. (We assumed has no triangles and were able to conclude has a triangle)
- In both cases it is shown that or has a triangle.