68 problems found
Find the sum of those numbers between 1000 and 6000 every one of whose digits is one of the numbers \(0,\,2,\,5\) or \(7\), giving your answer as a product of primes.
Solution: The first digit is \(2\) or \(5\), all the other digits can be any value from \(0,2,5,7\). Therefore we have \begin{align*} S &= 2000 \cdot 4^3+5000 \cdot 4^3 + (200+500+700) \cdot 2 \cdot 4^2 + (20+50+70) \cdot 2 \cdot 4^2 + (2+5+7) \cdot 2 \cdot 4^2 \\ &= 7 \cdot 4^3 \cdot 2^3 \cdot 5^3 + 14 \cdot 2 \cdot 4^2 \cdot 111 \\ &= 2^{9} \cdot5^3 \cdot 7 + 2^{6} \cdot 3 \cdot 7 \cdot 37 \\ &= 2^6 \cdot 7 \cdot (1000+111) \\ &= 2^6 \cdot 7 \cdot 11 \cdot 101 \end{align*} Alternatively, consider adding the first and last terms, and second and second and last terms, etc we obtain \(7777\). There are \(2 \cdot 4^3\) terms so \(7777 \cdot 4^3 = 2^6 \cdot 7 \cdot 11 \cdot 101\)
Solution:
An examiner has to assign a mark between 1 and \(m\) inclusive to each of \(n\) examination scripts (\(n\leqslant m\)). He does this randomly, but never assigns the same mark twice. If \(K\) is the highest mark that he assigns, explain why \[ \mathrm{P}(K=k)=\left.\binom{k-1}{n-1}\right/\binom{m}{n} \] for \(n\leqslant k\leqslant m,\) and deduce that \[ \sum_{k=n}^{m}\binom{k-1}{n-1}=\binom{m}{n}\,. \] Find the expected value of \(K\).
Solution: If the highest mark is \(k\), then there are \(n-1\) remaining marks to give, and they have to be chosen from the numbers \(1, 2, \ldots, k-1\), ie in \(\binom{k-1}{n-1}\) ways. There are \(n\) numbers to be chosen from \(1, 2, \ldots, m\) in total, therefore \(\displaystyle \mathbb{P}(K=k) = \left.\binom{k-1}{n-1} \right/ \binom{m}{n}\) Since \(K\) can take any of the values \(n, \cdots, m\), we must have \begin{align*} && 1 &= \sum_{k=n}^m \mathbb{P}(K=k) \\ &&&= \sum_{k=n}^m \left.\binom{k-1}{n-1} \right/ \binom{m}{n} \\ \Rightarrow && \binom{m}{n} &= \sum_{k=n}^m \binom{k-1}{n-1} \\ \\ && \mathbb{E}(K) &= \sum_{k=n}^m k \cdot \mathbb{P}(K=k) \\ &&&= \sum_{k=n}^m k \cdot \left.\binom{k-1}{n-1} \right/ \binom{m}{n} \\ &&&= n\binom{m}{n}^{-1} \sum_{k=n}^m \frac{k}{n} \cdot \binom{k-1}{n-1} \\ &&&= n\binom{m}{n}^{-1} \sum_{k=n}^m \binom{k}{n} \\ &&&= n\binom{m}{n}^{-1} \sum_{k=n+1}^{m+1} \binom{k-1}{n+1-1} \\ &&&= n\binom{m}{n}^{-1} \binom{m+1}{n+1} \\ &&&= n \cdot \frac{m+1}{n+1} \end{align*}
A school has \(n\) pupils, of whom \(r\) play hocket, where \(n\geqslant r\geqslant2.\) All \(n\) pupils are arranged in a row at random.
I have \(n\) fence posts placed in a line and, as part of my spouse's birthday celebrations, I wish to paint them using three different colours red, white and blue in such a way that no adjacent fence posts have the same colours. (This allows the possibility of using fewer than three colours as well as exactly three.) Let \(r_{n}\) be the number of ways (possibly zero) that I can paint them if I paint the first and the last post red and let \(s_{n}\) be the number of ways that I can paint them if I paint the first post red but the last post either of the other two colours. Explain why \(r_{n+1}=s_{n}\) and find \(r_{n}+s_{n}.\) Hence find the value of \(r_{n+1}+r_{n}\) for all \(n\geqslant1.\) Prove, by induction, that \[ r_{n}=\frac{2^{n-1}+2(-1)^{n-1}}{3}. \] Find the number of ways of painting \(n\) fence posts (where \(n\geqslant3\)) placed in a circle using three different colours in such a way that no adjacent fence posts have the same colours.
The Tour de Clochemerle is not yet as big as the rival Tour de France. This year there were five riders, Arouet, Barthes, Camus, Diderot and Eluard, who took part in five stages. The winner of each stage got 5 points, the runner up 4 points and so on down to the last rider who got 1 point. The total number of points acquired over the five states was the rider's score. Each rider obtained a different score overall and the riders finished the whole tour in alphabetical order with Arouet gaining a magnificent 24 points. Camus showed consistency by gaining the same position in four of the five stages and Eluard's rather dismal performance was relieved by a third place in the fourth stage and first place in the final stage. Explain why Eluard must have received 11 points in all and find the scores obtained by Barthes, Camus and Diderot. Where did Barthes come in the final stage?
Solution: Since \(A\) scored \(24\) points, he must have finished first in all but one race and second in that race. Given \(E\) won the final stage, \(A\) must have been \(11112\) \begin{array}{c|ccccc|c} & 1 & 2 & 3 & 4& 5 & \sum \\ \hline A & 1 & 1 & 1 & 1 & 2 & 24 \\ B & - & - & - & - & - & \\ C & - & - & - & - & - & \\ D & - & - & - & - & - & \\ E & - & - & - & 3 & 1 \\ \end{array} If \(E\) has \(12\) points the smallest number of points the others can have are \(13, 14, 15\) which would be a total of \(78\) points \(\geq 15 \times 5 = 75\), more than is available, therefore \(E\) must have the minimum \(11\) points. \begin{array}{c|ccccc|c} & 1 & 2 & 3 & 4& 5 & \sum \\ \hline A & 1 & 1 & 1 & 1 & 2 & 24 \\ B & - & - & - & - & - & \\ C & - & - & - & - & - & \\ D & - & - & - & - & - & \\ E & 5 & 5 & 5 & 3 & 1 & 11 \\ \end{array} There are now \(40\) points to be divided between \(B, C\) and \(D\). \(12+13+14 = 39\), so only way to achieve this is \(12, 13, 15\). \begin{array}{c|ccccc|c} & 1 & 2 & 3 & 4& 5 & \sum \\ \hline A & 1 & 1 & 1 & 1 & 2 & 24 \\ B & - & - & - & - & - & 15 \\ C & - & - & - & - & - & 13 \\ D & - & - & - & - & - & 12 \\ E & 5 & 5 & 5 & 3 & 1 & 11 \\ \end{array} Camus gained the same position in four of the five races. So we need \(4x + y = 13\) which can be done with \(4 \times 1 + 9\) or \(4 \times 2 + 5\) or \(4 \times 3 + 1\). The first two aren't possible (you can't score \(9\)) and the second isn't possible (all the first places are taken) so \(C\) must have four third places and a last place. (Which also must be the second to last race since there are alread last places in \(3\) of the races and a third place in the second to last) \begin{array}{c|ccccc|c} & 1 & 2 & 3 & 4& 5 & \sum \\ \hline A & 1 & 1 & 1 & 1 & 2 & 24 \\ B & - & - & - & - & - & 15 \\ C & 3 & 3 & 3 & 5 & 3 & 13 \\ D & - & - & - & - & - & 12 \\ E & 5 & 5 & 5 & 3 & 1 & 11 \\ \end{array} There are now one \(5\), five \(4\)s, four \(2\)s left to place. And they need to add to \(12\) for one rider. [In score terms this is \(1, 5\times 2, 4 \times 4\). Neither rider can have all the second places, and since they would score too highly, and \(D\) can't have more than one second place since otherwise he'd score too highly. Therefore \(B\) has three second places. So \(B\) is \(1,2,4,4,4\) and \(C\) is \(4,2,2,2,2\) in some order. \(D\) can't come second in the last race, so he comes \(4\)th and \(B\) comes \(5\)th \begin{array}{c|ccccc|c} & 1 & 2 & 3 & 4& 5 & \sum \\ \hline A & 1 & 1 & 1 & 1 & 2 & 24 \\ B & - & - & - & - & 5 & 15 \\ C & 3 & 3 & 3 & 5 & 3 & 13 \\ D & - & - & - & - & 4 & 12 \\ E & 5 & 5 & 5 & 3 & 1 & 11 \\ \end{array}
There are 28 colleges in Cambridge, of which two (New Hall and Newnham) are for women only; the others admit both men and women. Seven women, Anya, Betty, Celia, Doreen, Emily, Fariza and Georgina, are all applying to Cambridge. Each has picked three colleges at random to enter on her application form.
Solution:
I have two dice whose faces are all painted different colours. I number the faces of one of them \(1,2,2,3,3,6\) and the other \(1,3,3,4,5,6.\) I can now throw a total of 3 in two different ways using the two number \(2\)'s on the first die once each. Show that there are seven different ways of throwing a total of 6. I now renumber the dice (again only using integers in the range 1 to 6) with the results shown in the following table \noindent
| Total shown by the two dice | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
| Different ways of obtaining the total | 0 | 2 | 1 | 1 | 4 | 3 | 8 | 6 | 5 | 6 | 0 |
In the game of ``Colonel Blotto'' there are two players, Adam and Betty. First Adam chooses three non-negative integers \(a_{1},a_{2}\) and \(a_{3},\) such that \(a_{1}+a_{2}+a_{3}=9,\) and then Betty chooses non-negative integers \(b_{1},b_{2}\) and \(b_{3}\), such that \(b_{1}+b_{2}+b_{3}=9.\) If \(a_{1} > b_{1}\) then Adam scores one point; if \(a_{1} < b_{1}\) then Betty scores one point; and if \(a_{1}=b_{1}\) no points are scored. Similarly for \(a_{2},b_{2}\) and \(a_{3},b_{3}.\) The winner is the player who scores the greater number of points: if the socres are equal then the game is drawn. Show that, if Betty knows the numbers \(a_{1},a_{2}\) and \(a_{3},\) she can always choose her numbers so that she wins. Show that Adam can choose \(a_{1},a_{2}\) and \(a_{3}\) in such a way that he will never win no matter what Betty does. Now suppose that Adam is allowed to write down two triples of numbers and that Adam wins unless Betty can find one triple that beats both of Adam's choices (knowing what they are). Confirm that Adam wins by writing down \((5,3,1)\) and \((3,1,5).\)
A \(3\times3\) magic square is a \(3\times3\) array \[ \begin{array}{ccc} a & b & c\\ d & e & f\\ g & h & k \end{array} \] whose entries are the nine distinct integers \(1,2,3,4,5,6,7,8,9\) and which has the property that all its rows, columns and main diagonals add up to the same number \(n\). (Thus \(a+b+c=d+e+f=g+h+k=a+d+g=b+e+h=c+f+k=a+e+k=c+e+g=n.)\)
Solution:
A point moves in unit steps on the \(x\)-axis starting from the origin. At each step the point is equally likely to move in the positive or negative direction. The probability that after \(s\) steps it is at one of the points \(x=2,x=3,x=4\) or \(x=5\) is \(\mathrm{P}(s).\) Show that \(\mathrm{P}(5)=\frac{3}{16},\) \(\mathrm{P}(6)=\frac{21}{64}\) and \[ \mathrm{P}(2k)=\binom{2k+1}{k-1}\left(\frac{1}{2}\right)^{2k} \] where \(k\) is a positive integer. Find a similar expression for \(\mathrm{P}(2k+1).\) Determine the values of \(s\) for which \(\mathrm{P}(s)\) has its greatest value.
Solution: After \(5\) steps we can get to: \begin{array}{c|c} x & \text{ways} \\ \hline 5 & 1 \text { - go positive every time}\\ 4 & 0 \\ 3 & \binom{5}{1} \text { - go positive every time but 1} \\ 2 &0 \\ \hline & 6 \end{array} Therefore there are \(\frac{6}{2^5} = \frac{3}{16}\) ways to get to \(\{2,3,4,5\}\) After \(6\) steps we can get to: \begin{array}{c|c} x & \text{ways} \\ \hline 5 & 0 \\ 4 & \binom{6}{1} \text { - go positive every time but 1}\\ 3 & 0 \\ 2 & \binom{6}{2} - \text{ - go positive every time but 2} \\ \hline & 21 \end{array} Therefore there are \(\frac{21}{2^6} = \frac{21}{64}\) ways to get to \(\{2,3,4,5\}\) After \(2k\) steps we can reach \(2\) or \(4\). To get to \(2\) we must take \(k+1\) positive steps and \(k-1\) negative steps, ie \(\binom{2k}{k-1}\). To get to \(4\) we must take \(k+2\) positive steps and \(k-2\) negative steps, ie \(\binom{2k}{k-2}\) Therefore there are \(\binom{2k+1}{k-1}\) routes, ie a probability of \(\frac{1}{2^{2k}} \binom{2k+1}{k-1}\) After \(2k+1\) steps we can reach \(3\) or \(5\). To get to \(3\) we must take \(k+2\) positive steps and \(k-1\) negative steps, ie \(\binom{2k+1}{k-1}\). To get to \(5\) we must take \(k+3\) positive steps and \(k-2\) negative steps, ie \(\binom{2k+1}{k-2}\) Therefore there are \(\binom{2k+2}{k-1}\) routes, ie a probability of \(\frac{1}{2^{2k+1}} \binom{2k+2}{k-1}\) To find the maximum of \(P(s)\) notice that \begin{align*} && \frac{P(2k+1)}{P(2k)} &= \frac12 \frac{\binom{2k+2}{k-1}}{\binom{2k+1}{k-1}} \\ &&&= \frac12 \frac{(2k+2)!(k-1)!(k+2)!}{(2k+1)!(k-1)!(k+3)!} \\ &&&= \frac12 \frac{2k+2}{k+3} = \frac{k+1}{k+3} < 1 \end{align*} So we should only look at the even terms. \begin{align*} && \frac{P(2k+2)}{P(2k)} &= \frac14 \frac{\binom{2k+3}{k}}{\binom{2k+1}{k-1}} \\ &&&= \frac14 \frac{(2k+3)!(k-1)!(k+2)!}{(2k+1)!k!(k+3)!} \\ &&&= \frac14 \frac{(2k+3)(2k+2)}{k(k+3)} \\ &&&= \frac{(2k+3)(k+1)}{2k(k+3)} \geq 1 \\ \Leftrightarrow && (2k+3)(k+1) &\geq 2k(k+3) \\ \Leftrightarrow && 2k^2+5k+3 &\geq 2k^2+6k \\ \Leftrightarrow && 3 &\geq k \\ \end{align*} Therefore the maximum is when \(s = 2\cdot 3\) or \(s = 2\cdot 4\) which we computed earlier to be \(\frac{21}{64}\)
A taxi driver keeps a packet of toffees and a packet of mints in her taxi. From time to time she takes either a toffee (with probability \(p\)) or mint (with probability \(q=1-p\)). At the beginning of the week she has \(n\) toffees and \(m\) mints in the packets. On the \(N\)th occasion that she reaches for a sweet, she discovers (for the first time) that she has run out of that kind of sweet. What is the probability that she was reaching for a toffee?
Solution: \begin{align*} \mathbb{P}(\text{run out reading for toffee on } N\text{th occassion}) &= \binom{N-1}{n}p^nq^{N-1-n}p \end{align*} Since out of the first \(N-1\) times, we need to choose toffee \(n\) times, and then choose it again for the \(N\)th time. Therefore: \begin{align*} \mathbb{P}(\text{reaching for toffee} | \text{run out on }N\text{th occassion}) &= \frac{\mathbb{P}(\text{reaching for toffee and run out on }N\text{th occassion})}{\mathbb{P}(\text{reaching for toffee and run out on }N\text{th occassion}) + \mathbb{P}(\text{reaching for mint and run out on }N\text{th occassion})} \\ &= \frac{ \binom{N-1}{n}p^nq^{N-1-n}p}{ \binom{N-1}{n}p^nq^{N-1-n}p + \binom{N-1}{m}q^mp^{N-1-m}q} \\ &= \frac{ \binom{N-1}{n}}{ \binom{N-1}{n} + \binom{N-1}{m} \l \frac{q}{p} \r^{m+ n+ 2-N}} \end{align*} Some conclusions we can draw from this are: As \(p \to 1, q \to 0\), the probability they were reaching for a Toffee tends to \(1\). (And vice versa). If \(p = q\), then the probability is: \begin{align*} \frac{ \binom{N-1}{n}}{ \binom{N-1}{n} + \binom{N-1}{m} } \end{align*} Since \(n+1 \leq N \leq n+m+1\) where \(n \geq m\) we can notice that: \begin{align*} \text{if } N = m + n + 1 && \binom{m+n+1 - 1}{n} &= \binom{m+n+1 - 1}{m} & \text{ so } \mathbb{P} = \frac12 \\ \text{if } N = n+k && \binom{n+k-1}{n} &< \binom{n+k-1}{m} & \text{ so } \mathbb{P} < \frac12 \\ \end{align*}
A set of \(2N+1\) rods consists of one of each length \(1,2,\ldots,2N,2N+1\), where \(N\) is an integer greater than 1. Three different rods are selected from the set. Suppose their lengths are \(a,b\) and \(c\), where \(a > b > c\). Given that \(a\) is even and fixed, show, by considering the possible values of \(b\), that the number of selections in which a triangle can then be formed from the three rods is \[ 1+3+5+\cdots+(a-3), \] where we allow only non-degenerate triangles (i.e. triangles with non-zero area). Similarly obtain the number of selections in which a triangle may be formed when \(a\) takes some fixed odd value. Write down a formula for the number of ways of forming a non-degenerate triangle and verify it for \(N=3\). Hence show that, if three rods are drawn at random without replacement, then the probability that they can form a non-degenerate triangle is \[ \frac{(N-1)(4N+1)}{2(4N^{2}-1)}. \]
Solution: Suppose we have \(a = 2k\), it is necessary (by the triangle inequality) that \(b + c > a\). So the smallest \(b\) can be is \(k+1\), and then \(c\) must be \(k\) (1 choice). Then \(b\) could be \(k+2\) and \(c\) can be \(k+1\), \(k\), \(k-1\) (3 choices). Suppose \(b = k+i\) then \(c\) can be \(k+i-1, \ldots, k-i+1\) which is \(2i-1\) choices. This works until \(b = 2k-1\) and there are \(2(k-1)-1 = 2k-3 = a-3\) choices. Therefore there are \(1 + 3 + 5 + \cdots + (a-3)\) total choices. If \(a = 2k+1\) then, \(b = k+1\) is not possible \(b = k+2\) we have \(a = k+1, k\) (2 choices) \(b = k+3\) we have \(a = k+2, k+1, k, k-1\) (4 choices) \(b = k + i\) we have \(a = k+i-1, \cdots, k-i+2\) (\(2i-2\) choices) This works until \(b = k+k\) with \(2k-2 = a-3\) choices. So \(2 + 4 + \cdots + (a-3)\) If \(a\) is even, we have \(\left ( \frac{a-2}{2} \right)^2\) If \(a\) is odd we have \(\frac{(a-3)(a-1)}{4}\) Therefore the total number is: \begin{align*} C &= \sum_{k=2}^N \left ( \frac{(2k-2)^2}{4} + \frac{(2k+1-3)(2k+1-1)}{4} \right) \\ &= \sum_{k=2}^N \left ( (k-1)^2 + (k-1)k\right) \\ &= \sum_{k=2}^N (2k^2-3k+1) \\ &= \sum_{k=1}^N (2k^2-3k+1) \\ &= \frac{N(N+1)(2N+1)}{3} - \frac{3N(N+1)}{2} + N \\ &= \frac{N((N+1)(4N+2-9)+6)}{6} \\ &= \frac{N(4N+1)(N-1)}{6} \\ \end{align*} When \(N = 3\) we have \(1, 2, \cdots, 7\) sticks, and so \(a = 4\), \(1\) option \(a = 5\), \(2\) options \(a = 6\) \(4\) options \(a = 7\) \(6\) options for a total of \(13\). \(\frac{3 \cdot 13 \cdot 2}{6} = 13\) so this is promising, There are \(\binom{2N+1}{3}\) ways to choose three sticks (in order) and of those our formula tells us how many are valid, therefore \begin{align*} && P &= \frac{ \frac{N(4N+1)(N-1)}{6} }{\frac{(2N+1)2N(2N-1)}{6}} \\ &&&= \frac{(4N+1)(N-1)}{2(4N^2-1)} \end{align*}
A pack of \(2n\) (where \(n\geqslant4\)) cards consists of two each of \(n\) different sorts. If four cards are drawn from the pack without replacement show that the probability that no pairs of identical cards have been drawn is \[ \frac{4(n-2)(n-3)}{(2n-1)(2n-3)}. \] Find the probability that exactly one pair of identical cards is included in the four. If \(k\) cards are drawn without replacement and \(2 < k < 2n,\) find an expression for the probability that there are exactly \(r\) pairs of identical cards included when \(r < \frac{1}{2}k.\) For even values of \(k\) show that the probability that the drawn cards consist of \(\frac{1}{2}k\) pairs is \[ \frac{1\times3\times5\times\cdots\times(k-1)}{(2n-1)(2n-3)\cdots(2n-k+1)}. \]
A coin has probability \(p\) (\(0 < p < 1\)) of showing a head when tossed. Give a careful argument to show that the \(k\)th head in a series of consecutive tosses is achieved after exactly \(n\) tosses with probability \[ \binom{n-1}{k-1}p^{k}(1-p)^{n-k}\qquad(n\geqslant k). \] Given that it took an even number of tosses to achieve exactly \(k-1\) heads, find the probability that exactly \(k\) heads are achieved after an even number of tosses. If this coin is tossed until exactly 3 heads are obtained, what is the probability that exactly 2 of the heads occur on even-numbered tosses?
Solution: We must have a sequence consisting of \(\underbrace{HTT\cdots TH}_{k-1\text{ heads and }n-k\text{ tails}}\underbrace{H}_{k\text{th head}}\). There are \(\binom{n-1}{k-1}\) ways to chose how to place the \(k-1\) heads in the first \(n-1\) flips, and each sequence has probability \(p^{k-1}(1-p)^{n-k}p\) which gives a probability of \(\displaystyle \binom{n-1}{k-1} p^k (1-p)^{n-k}\). Given that it took an even number of tosses to achieve \(k-1\) heads, this is equivalent to the problem of what is the probability that the first head occurs on an even flip, ie \begin{align*} \mathbb{P}(\text{even flip}) &= \mathbb{P}(2\text{nd flip}) +\mathbb{P}(4\text{th flip}) +\mathbb{P}(6\text{th flip}) + \cdots \\ &= (1-p)p + (1-p)^3p + (1-p)^5p + \cdots \\ &= (1-p)p \left ( \sum_{r=0}^\infty (1-p)^{2r}\right) \\ &= \frac{p(1-p)}{1-(1-p)^2} \\ &= \frac{p(1-p)}{2p-p^2} \\ &= \frac{1-p}{2-p} \end{align*} The ways to achieve \(2\) heads on even tosses are \(EEO\), \(EOE\), \(OEE\). The probability of going from \(O\) to \(E\) is the same as the initial probability of an \(O\) flip, etc. Therefore \begin{align*} \mathbb{P}(EEO) &=\left( \frac{1-p}{2-p} \right)^2 \left ( 1- \frac{1-p}{2-p} \right) \\ &= \left( \frac{1-p}{2-p} \right)^2 \left ( \frac{1}{2-p} \right) \\ \mathbb{P}(EOE) &= \left( \frac{1-p}{2-p} \right) \left ( \frac{1}{2-p} \right)^2 \\ \mathbb{P}(OEE) &= \left ( \frac{1}{2-p} \right)^2 \left( \frac{1-p}{2-p} \right)\\ \mathbb{P}(2 \text{ heads on even tosses}) &= \frac{(1-p)^2 + 2(1-p)}{(2-p)^3} \\ &= \frac{(1-p)(2-p)}{(2-p)^3} \\ &= \frac{1-p}{(2-p)^2} \end{align*}