26.10.19

I’m back and no longer doing the initial word problem, because I don’t want to. Instead I am going to plug some very cool puzzles invented by a friend of a friend! http://www.phildent.org.uk/index.html — these hinge on the fun quirk that your interpretation of the ‘dots’ pictured (binary strings) changes depending on how you partition them up! Throw in some other rules about what numbers can go where and you’ve got yourself a cracking sudoku-style logic puzzle. Now on with the maths:

2. The last question of Andy’s home-work is always a bit more challenging than the others. This is intended to get pupils to think for themselves. All he had to do was find x given that \frac{x^2}{(x+1)^2} + \frac{x^2}{(x-1)^2} = 2

Let’s start by factoring out the x^2 and see what we have:

x^2(\frac{1}{(x+1)^2} + \frac{1}{(x-1)^2}) = 2

Now taking advantage of the difference of two squares we can get to:

x^2(\frac{(x-1)^2}{(x^2-1)^2} + \frac{(x+1)^2}{(x^2-1)^2}) = 2

x^2(\frac{2x^2+2}{(x^2-1)^2}) = 2

x^2(\frac{x^2+1}{(x^2-1)^2}) = 1

x^2(x^2+1) = x^4 - 2x^2 + 1

After some speedy cancelling:

x^2 = 1/3

So we have:  x = \frac{1}{\sqrt{3}}, \frac{-1}{\sqrt{3}}

3. Garabaggio’s latest oeuvre currently on show in Rogue’s Gallery on Poppycock Terrace is Trinity. Well, “3 circles each touching the other two” would be a bit of a mouthful, I suppose. It is so simple even a fool could have made it — indeed I believe one has. According to the catalogue the medium circle of the left has radius of 9 units, and the largest on on the right has a radius of 36 units. What is the radius of the smallest one?

Now to insert an unhelpfully crowded diagram with all the relevant extra lines:

Capture

 

Wow, that is truly awful. Let’s try to work with it anyway because I’m writing this on my lunch break and don’t have time to do a pretty LaTex diagram. Consider the large right angled triangle whose hypotenuse is formed by the line joining the centres of the two larger circles. We know the length of this hypotenuse in fact! It is formed by two radii and so is 36+9=45 units long. We also know that the side parallel to the y-axis is length 27. So we’re now in a position to use Pythagoras to say that the base of this triangle is length 36.

Now we’re going to look to find an alternative expression for this length using the radius of the smallest circle, r. We can do this using the two smaller right angled triangles formed by the lines joining the centres of the larger circles to the centre of the smallest.

We get (after some manipulation which I might add in later):

18\sqrt{r} = 36

\sqrt{r} = 2

r = 4

Very simple! A more general rule can be derived about this set up — this is a classic example of a Sangaku puzzle which you can read more about here https://en.wikipedia.org/wiki/Sangaku !

3. Down at the Last Chance saloon Sonny Uplands puts 4 balls into an urn. Each of the balls is either red or blue. The chances of withdrawing a pair at random and finding they are both red are a half. What are the chances they are instead both blue?

There are only 4 balls at play here so we can use our brains to narrow down the options pretty quickly. Clearly there is at least one red ball in the mix as our chance of getting two isn’t 0. In the same vein, there must be at least two in the mix. They can’t all be red otherwise our chances of getting 2 reds would be one! Now its down to the last two options. If there were two reds then the chance of picking one would be 1/2 and the chance of picking two would be less than this. So there we are — 3 red balls.

If you are an algebra lover like myself you can do the unnecessary manipulation below:

\frac{n}{4}\frac{n-1}{3} = \frac{1}{2}

n^2-n-6 = 0

(n-3)(n+2) = 0

There you go, -2 balls makes no sense so 3’s our guy!

 

 

 

 

4.5.19

1. “Oh our network radio – such a mine of linguistic solecisms! Pedanticus had already almost choked on his panino at “dwin-der-ling” and  “our Island (sic) correspondent” and “twice as near” so I was surprised to see him rock with mirth at “legs akimbo”. What on earth could be funny about that?”

Arms akimbo means to have your hands on your hips! Legs akimbo therefore seems to be an activity reserved for only the most flexible of people.

2. “”May the fourth be with you!” exclaimed professor Quark as he walked into the Department of Unclear Physics. Well old ones are the best.

a) What was the last year when 4 May fell on a Saturday and when was the last year whose calendar was identical to this year’s?

b) What is the next year when 4 May falls on a Saturday and the next year when the calendar will be identical to this year’s? Why the discrepancy in the second case?

a) For very year that passes (excluding leap years) 4 May will move forward by one day of the week. So last year 4 May fell on a Friday, in 2017 it fell on a Thursday, in 2016 (a leap year) it jumped back 2 days so it fell on a Tuesday, in 2015 it fell on a Monday, in 2014 on a Sunday and finally in 2013 it fell on a Saturday! 2013 is not a leap year so its calendar will be identical to this year’s.

b) For this part a similar calculation to the above, accounting for 2020 and 2024 being leap years leads us to 2024 being the next year when 4 May falls on a Saturday. The discrepancy comes from 2024 being a leap year. We need to look even further forward to 2030 to find the next calendar match up!

3. “In each case partition each of the following numbers into a set of integers whose product is as great as possible: 3; 4; 13; 44.”

3 only has one non-trivial partition: {1, 2}. The greatest (and only) product is 2!

The partitions of 4 are {1,3}, {2,2}, {1,2,1} and {1,1,1,1}. The greatest product here is from the partition with two 2s – 4.

Partitioning 13 into all possible options would take longer. We need to try to work smart now if we don’t want to be partitioning for hours on end! Intuitively we want to split each number into as many parts as possible that are greater than 1 (since 1 is a useless berk when it comes to multiplication) and of roughly equal size (since when we make one part larger another will become smaller to keep the sum the same). My initial guess will be that our greatest product will come from lots of 2s or 3s. Consider {2,2,2,2,2,2,1} or {3,3,3,3,1} and their respective products 64 and 81. Can we get bigger than 81? My feeling is no. But let’s try to formalize now. We have that x_1+x_2+...+x_n = 13 and we want to maximise x_1x_2x_3...x_n (where n will be maximum 13, would for all our x_n to be 1s).

When I think maximising, I think upper bound. When I think upper bound, I think inequality. Finally, when I think inequality to do with products and sums I think of the geometric vs arithmetic mean inequality! Yes, I am aware that my brain is in need of a serious spring clean post university. Anyway, the inequality mentioned above relates the classic mean found by adding (arithmetic) everything up and dividing by the number of things and the geometric mean which involves multiplying everything together and then rooting by the number of things:

\frac{x_1+x_2+...+x_n}{n} \geq \sqrt[n]{x_1x_2...x_n}

Our fixed sum here is 13 so we have:

x_1x_2...x_n \leq (\frac{13}{n})^n

Now even though our n can only run in between 1 and 13 I am going to use a graph for analysing this inequality, because I want to.

Screen Shot 2019-05-14 at 19.30.02

This is a graph of y = (\frac{13}{x})^x . We can see that its maximum is at about 5, so we’re going to split 13 into about 5 pieces. {3,3,3,3,1} works! Our guess was right.

The graph for 44 is a tad tricky to read but I think 2s or 3s is the way to go. Fourteen 3s all multiplied together I think will produce the desired maximum.

4. I actually couldn’t find this question because I’ve gotten so behind but what I remember is that it concerned maximising the area of shape with a fixed perimeter.

1750457

We have the above shape to maximise with fixed perimeter L. This is a little like maximising the area of a rectangle with a fixed perimeter apart from here the length is weighted by the addition of a semi circle (the larger the length the more semi-circle we we get!).

Let’s put together a general expression for the perimeter and area and try to get it all in terms of x:

2x + twice the width + perimeter of the semi-circle  = L, so the width is equivalent to \frac{L}{2} - x - \frac{\pi x}{4}

Now the area is x (\frac{L}{2} - x - \frac{\pi x}{4}) + \frac{\pi x^2}{8}

Maximising the area is the same as maximising 8 times the area so we can happily multiply through by 8 to get rid of fractions. We are now dealing with 4xL-8x^2- 2\pi x^2 + \pi x^2 = -8x^2 - \pi x^2 + 4xL = -x^2(8+\pi) + 4xL =  -x((8+\pi)x - 4L)

Because parabolas are symmetrical our maximum will be halfway between 0 and \frac{4L}{8+\pi} , so when x is equal to $latex $

We can test this out by plotting the area with a fixed L, let’s say 10:

Screen Shot 2019-05-24 at 22.02.53

This confirms our algebra!

27.4.19

1. Pendanticus shredded his copy of our favourite newspaper with much swearing and gnashing of teeth. The cause? The headline: The Proof Is In The Pudding. I had no idea what proof the journo had in mind or why it had been put in the pudding. What might have triggered this latest outburst?

As usual the clue to what is wrong here is in the question! It wouldn’t make sense to have the proof in the pudding – instead the true phrase is “the proof of the pudding is in the eating”. Much more palatable for Pendanticus!

2. A rational number is one that can be expressed as the ratio of two whole numbers. Prove that there is no a) greatest b) least positive rational number; and that there is no least rational number greater than 2.

This is an interesting question as to most people it might seem almost pointlessly obvious. Given any whole number fraction you could think of a bigger one surely?

This is essentially all you need for the proof! A touch of formalisation and we’re done:

Suppose that \frac{a}{b} is the largest rational.

There are lots of options here but assuming the set of rationals is closed under addition (a rational plus another rational is still a rational) we can simply go for \frac{a}{b} + \frac{a}{b} = \frac{2a}{b}. If a is a whole number then clearly 2a is also a whole number an b is a whole number as assumed at the start. If we (I hope) are also allowed to assume that \frac{2a}{b} is larger than \frac{a}{b} then we are done with part a). We assumed that our original rational was the largest out there but then we used it to make one that was even larger! This is called proof by contradiction.

For part b) a similar contradiction can be reached by – for example – assuming \frac{a}{b} is the least positive rational and then dividing by 2. The result would still be positive and would be a rational smaller than our original!

Now for the last part. My instinct is to try to in some way shift our working for the least positive rational over by two to get the least rational greater than 2. Here is a formalisation of this idea:

Suppose that \frac{a}{b} were the least rational greater than 2. Since \frac{a}{b} is greater than 2 we know that \frac{a}{b}-2 will be positive (and rational since the rationals are closed under subraction). Now we apply our method from before of, for example, dividing by two. After this we add the 2 back on and we’ve arrived at our contradiction – a rational closer to 2 than our previous pick!

3. A rectangular jigsaw puzzle measures 28cm x 96cm. What is the diameter of the smallest circular table-top that the completed puzzle will fit on?

This problem is sort of the reverse of the problem posed last week on rectangles and circles . This time instead of expanding a rectangle to fit inside a circle we are shrinking a circle down to fit around a rectangle!

It seems clear that the smallest circle that fits around the rectangle would be the one which touches each of the corners of the rectangle as picture below: Screen Shot 2019-04-28 at 16.55.00

The centre of this circle will lie in the centre of the rectangle and the radius of the circle will be equal to \sqrt{14^2+48^2} = 50.

3. “Garabaggio’s Sunspots consists of a circle with three randomly placed black dots unaccountably on its circumference and a fourth at the centre of the circle. If you do mark 3 points independently and at random on the circumference of a circle and they are joined to make a triangle, what are the chances the point marking the centre of the circle will lie within this triangle?”

 

Image result for triangle in a circle

My previous reasoning for this question was wrong so I’m leaving it blank until I can explain it properly!

 

20.4.19

1. “Pendanticus, on offering the fresher (and how fresh they are nowadays, almost untouched by education!) a little more Victoria sponge and being blithely told “Oh go on, then, Prof – just a slither!”, took on the sinister appearance of a hooded Cobra about to strike an errant mouse. What had brought out the hamadryad in the old boy?”

The snake references give this one away. There is no such thing as a “slither” of cake – the correct word is sliver.

2. “”The series 1.2+2.3+3.4+…+k(k+1)” Andy told Candy, “is a bit unaesthetic as every number appears twice except for 1 and (k+1); whereas in the series 1.2+3.4+5.6+7.8+… every number appears exactly once.” What is the k-th term of this series?”

Making a quick table and trying to spot a pattern reveals the k-th term (induction can be used to make the proof rigorous):

Screen Shot 2019-04-21 at 16.58.46

The k-th term is (2k-1)2k.

3. Andy guesses that S(k), the sum up to the k-th term of the sequence in the previous question, must be in cubic form. Assuming that S(k) = ak³+bk²+ck+d, find a, b, c & d. Hence show that as S(k) = k(k+1)(4k-1)/3. “Ah,” said Candy. “That is an inspired guess.” What needs to be done to complete the proof?” 

I think a simple induction could verify the guess. If the above is true for every term up to the (k-1)-th we have:

Screen Shot 2019-04-21 at 17.35.20

Just the result we wanted! It doesn’t take much to verify the formula for k=1, so the induction is complete.

4. “The Eskimo’s Fridge is the latest piece of connery foisted on a too credulous public by that poseur and reprobate Garabaggio. No doubt it will end up in the collection of the Such and Such Brothers. Why – any fool could have drawn it. Well, one did. Even the catalogue admits that its just a rectangle inscribed in a semicircle. But Art’s shame is Geometry’s opportunity. What do the dimensions of the rectangle have to be for it to be of maximum area?”

Screen Shot 2019-04-21 at 20.10.59

Here is a picture of a rectangle in a semicircle. We can draw in the radii connecting the centre to the corners of the rectangle:

Screen Shot 2019-04-21 at 20.16.58

Let the angle between the two radii drawn in be called x. We can now use this to create a general expression for the area of the rectangle (the second term in the sum below comes from sticking the two right-angled triangles together to make one larger triangle):

Screen Shot 2019-04-21 at 22.21.38

Now we need to maximise this expression with the constraint that x lies between 0 and 180. Looking at a graph of sin(x) it’s clear that this is maximised when x is 90:

Image result for sine graph degrees

When x is 90 we see the rectangle is in fact half of a larger square inscribed inside the whole circle. The square has side \sqrt{2} r so the length of the rectangle is equal to this and the width is half the length.

5. “Which is larger: the square root of 3 or the cube root of 5?”

This is a nice little problem to tack onto the end of this week’s puzzle set! These two numbers are very close in value and so rough estimation here will not help. Instead, a logical approach will serve best. Let us make a guess and set up an inequality expressing our guess. If we perform a number of valid operations that preserve the inequality until we reach an obviously true statement then our original inequality must have been true!

Screen Shot 2019-04-21 at 23.45.37

We can see easily now that the square root of 3 is the larger of the two!

13.4.19

1. “Pedanticus – though safe from the mangled English of Radio 4 that caused him to smash so many cute DAB radios in his kitchen in Bickenhall Mansions – might have been out in the sticks in Nova Scotia but he wasn’t out of the woods. In an old copy of the Chronicle Herald he read that “Visitors to Nova Scotia Declined in July”. What made smoke come out of his ears?”

I think this one is fairly easy to spot! It’s not the visitors themselves who have declined but the number of visitors.

2. “Andy knew that the sum of the first k natural numbers equals k(k+1)/2; (Can you prove it?) and the sum of the first k perfect squares equals k(k+1)(2k+1)/6 (Can you prove it?) But he had no idea how to find a formula for the first k terms of the series: 1.2+2.3+3.4+4.5+… (the dots denote multiplication!) Luckily Candy had a bright idea how to use what Andy already knew. What might it have been?”

I had to make tiny correction to this question as it originally listed both formulas as the “sum of the first k natural numbers”. Let’s start by proving the first two formulas.

We can start by listing our series twice and adding it to itself – then we can divide by 2 to get the sum:

Screen Shot 2019-04-21 at 12.48.16

We end up with the following which is equal to twice the sum we’re interested in:Screen Shot 2019-04-21 at 13.02.02

We need to use a different technique for the sum of the squares:

Screen Shot 2019-04-21 at 13.39.02

Let’s take a closer look at the right hand side sum:

Screen Shot 2019-04-21 at 13.56.21

Now we have the following:

Screen Shot 2019-04-21 at 14.12.44

We’ve proven our two formulas! Now let’s think about how to find 1.2+3.4+4.5+…k(k+1) by using what we know:

Screen Shot 2019-04-21 at 14.25.38.png

We’re done!

3. ‘Garabaggio’s Two Walks Across a Field – shorn of its pretentious title – shows an oblong bisected by a diagonal line joining its top left corner to the midpoint of the bottom side. Again – not great art – I could have drawn it! But art’s loss is geometry’s gain. Show that the line from the corner to the midpoint of the base cuts off a third of the diagonal.”

Screen Shot 2019-04-21 at 14.48.25

My instinct is to put this problem on a cartesian plane and solve it with a coordinate method. Let the bottom left corner of the rectangle be (0,0) and the height and width of the rectangle be 2a and 2b respectively. Let’s call the line from the top left corner to the midpoint of the base “L”:

Screen Shot 2019-04-21 at 15.12.04.png

The upper right corner of the rectangle is (2a,2b) and the point we are interested in is (2a/3, 2b/3) – we can clearly see this point is one third of the way along the diagonal!

4. “A random robot (her name is Robotica) on a semi-infinite horizontal plane (in the geometrical sense) jumps with probability p to the right and 1-p to the left. She is one jump to the left away from a cliff edge to the right. If she falls over the cliff she breaks. Each jump translates the robot by the same distance. The space to the left is unrestricted and safe for robots. If p = 1/2 show Robotica is bound eventually to go over the cliff edge.”

This is the most interesting problem of the four. I have to admit I have an advantage here having studied maths at uni – this problem is an example of something called a simple random walk. Random walks are pretty cool and as a topic have quite a bit of depth – definitely worth a google/read around!

1_VPCtrvQPlG5wBhraiibZAw

Here is a nice diagram I found online (there is lots of material on the web on this particular style of problem). I’ll type out a quick solution anyway!

The probability of the robot eventually stepping off the cliff is the probability she steps to the left and falls off immediately plus the probability she steps the right and then after this eventually falls off. We know the first probability is simply 1/2.

The probability she steps to the right and then eventually falls off is 1/2*(probability she falls off starting 2 steps from the edge). The probability she falls off starting at 2 involves her starting at 2, eventually moving  down to 1 and from 1 eventually falling off the cliff. Because each step of the walk is independent from the next we know that the probability of moving one step to the left starting from anywhere is the same. So the probability of starting at 2 and moving eventually to 1 is the same as starting at 1 and falling off the cliff.

If we call the probability of her falling off starting at 1 “P” we can set up the following equation and solve it:

Screen Shot 2019-04-21 at 15.44.30

P = 1, the probability is certain and Robotica is bound to fall off the cliff!

6.4.19

1. The first question this week continued on the theme of circles:

Screen Shot 2019-04-06 at 19.50.15.png

“What is the total circumference of all the infinite set of circles? What is their total area (i.e. counting the overlap)?”

Let’s try to recognise a pattern in the circumferences:

Screen Shot 2019-04-06 at 20.23.25.png

It looks like we have a geometric sequence with the common ratio being a half – we know how to sum this!

Screen Shot 2019-04-06 at 20.49.55

Total area is a similar problem:

Screen Shot 2019-04-06 at 21.05.00

We have another geometric sequence with common ratio a half:

Screen Shot 2019-04-06 at 21.09.15

2. The next question from this week’s set of puzzles concerned itself with flipping a fair coin in a best of three competition. If you choose heads, what are the chances of winning best of three? What are the chances of winning given that your first flip is heads?

Intuitively the chance of winning a best in three from the start is a 1/2, it wouldn’t be worth playing otherwise! Just to prove this here are a list of all possible outcomes of playing the game:

TT, HH, THT, THH, HTH, HTT

Clearly half of them are winning scenarios for the person who picked heads. Now let’s consider the ‘flipping a head first’ scenario. Here are all the possible outcomes of a game that begins with a head:

HH, HTH, HTT

Two out of three of these are winning scenarios for the person who chose heads, so our probability goes up to a 2/3 chance of winning (nice)! To frame this more formally we can use the conditional probability formula (an event X happening given that an event Y has happened):

Screen Shot 2019-04-06 at 23.13.46

For the top of our fraction we have the probability that we both flip a head first and we win, which is 2/6 (out of 6 possible outcomes, only two have both a head to start and would be a winning scenario). The bottom is easy – the probability of starting with a head is 1/2. Now we can find our conditional probability: 2/6 ÷ 1/2 = 4/6 = 2/3. The same answer we got using our intuitive method!

3. I’m going to type this one out as it’s tricky to explain succinctly: Professor Heissenkalt has a calculation on his fridge door picked out in fridge magnets. Each of the digits 1 to 9 inclusive occurs once and only once. Five digits fell off the left-hand side. The multiplication sign is still in place. Can you replace the fallen digits so that the calculation still works?

X = 7632

Ok, so we need to put some numbers around the X sign to make this work. We have left 1,4,5,8 and 9 to play with.

Let’s start by exploring the one digit, four digit split across the sign. We can skip 5 as we can see 7632 is not divisible by 5:

7632/1=7632 (nope)

7632/4=1908 (nope)

7632/8=954 (nope)

7632/9=848 (nope)

Ok, so now we can do the 2 digit on either side split:

7632/14=545.142857143 (nope)

7632/15=508.8 (nope)

7632/18=424 (nope)

7632/19=401.684210526 (nope)

7632/41=186.146341463

7632/45=169.6 (nope)

7632/48=159 (bingo!!)

We have 159X48=7632.

 

30.3.19

New week, new puzzles. Let’s get started:

1. “Why was Pedanticus – eyes blazing – stamping up and down on the inoffensive little DAB radio, its dial set permanently to Radio 4? The cause, it turned out, was the phrase: “the sort of finds that we can say where they came from”. How might this word-tangle be unknotted?”

I think the problem here is just that the phrase is a grammatical mess. I don’t know if I’m missing some subtlety with this one but there are a number of ways to rewrite this sentence while still conveying its meaning. One way might be “the sort of finds that have an identifiable origin”.  I also tried to rewrite in a way that was as close to the original as possible: “the sort of finds that we could analyse to establish where they came from”. Essentially, I think after “the sort of” there needs to be a verb paired with the finds i.e “have” or “analyse”.

2. “Andy was a bit stuck on the last question of this week’s homework: Attila the Hen has 25% more eggs than Chicken Little, who has what percentage fewer eggs than Attlia the Hen? What is the smallest number of eggs that might be in play?” Candy got both questions right. What were the answers?”

Let’s all the number of eggs Attila has “A” and the number Chicken Little has “C”:

Screen Shot 2019-03-31 at 23.00.33

It seems unintuitive but Chicken Little has 20% fewer eggs. We can use either equivalence to work out the least number of eggs that could be at play. If “C” has to be an integer then we can just look for the smallest integer which when multiplied by 1.25 produces an integer. We quickly land at 4*1.25=5, so Chicken Little has 4 eggs and Attila the Hen has 5.

3. “Garabaggio’s latest “effort” – The Bubbles Within – consists of an infinite stack of circles all snuggly stacked in an equilateral triangle. Troll down to Rogue’s Gallery on Poppycock Terrace and you can see this “masterpiece” with your own eyes. Before being forcibly ejected by security I had already framed my questions: If the side of the triangle is unity what is the radius of the biggest circle? What fraction of the triangle does it fill? What is the total area of all the circles? What fraction of the triangle do they fill?”

I like these spacial questions a lot! Here we can see the first few triangles:

Screen Shot 2019-03-31 at 23.19.38

To start I’m going to assert that the largest circle touches the midpoint of each of the sides. I think there are several ways to show this. The way I went about this was drawing in the radii from the centre of the circle to the points where the circle touches the sides of the triangle, and also joining the corners of the triangle to the centre: Screen Shot 2019-03-31 at 23.27.18

These lines divide the triangle into 6 smaller triangles and it’s relatively easy to show these little triangles are congruent – so their bases are equal and split each side into two equal parts. Now we can make an equivalence between the height of the triangle which we know and the equivalent length in terms of r – the radius of the biggest circle:

Screen Shot 2019-03-31 at 23.55.06

 

Now we have the radius of the large circle. We can answer more of the questions using this:

Screen Shot 2019-04-01 at 00.10.34

We know the height of the triangle and dividing by the radius of the circle shows us it’s a third of the height. Drawing in a horizontal line across the top of the biggest circle shows us that to find the radius of the next circle we only need solve an identical problem to the one we just solved, only downsized by two thirds:Screen Shot 2019-04-01 at 00.28.06.png

Screen Shot 2019-04-01 at 00.37.59

The ratio between consecutive circle areas will be the length ratio squared, so 1/9:

Screen Shot 2019-04-01 at 00.44.41

Finally how much of the triangle do the circles take up:

Screen Shot 2019-04-01 at 00.53.01

4. The fourth question this week is an extension of last week’s problem on dice. My thoroughness has paid off here as I have already answered it: u(n)=2(2^n-1). You can take a look at last week’s blog to see how I did it. Now this leaves me more time to think about last week’s puzzle in isolation.

I found a nice intuitive explanation for the relationship between u(n) and u(n+1) on maths stack exchange (cheat-y, I know). If we know that we have to wait on average 6 rolls to see two consecutive odds then every 6 rolls on average will look like this: ????OO. Then on average every 7 rolls will look like this: ????OO?. Then we know half of the time that 7th spot will be filled by an odd. We can then say that on average we will have to wait 7*2 = 14 rolls to see three odds one after another.

Then similar reasoning can be applied to go from 14 to 30 and so on forever. Problem solved in reverse!

23.3.19

This will be my first ever post and first set of solutions for the Guardian’s weekly “Pyrgic Puzzles”! Let’s dive in with the first puzzle:

1. “When Mrs May lost one of her Brexit votes by 230 the presenter of the BBC lunchtime News remarked that Mrs May “needs to persuade 230 MPs to change their minds.” What made Pendanticus almost choke on his panino?”

I think what Pedanticus is turning his nose up at here is the use of the phrase “change their minds.” The government was defeated by 432 votes to 202, so let us imagine what would happen if MPs started to change their minds:

  • 432 to 202 (starting point – 230 margin)
  • 431 to 203 (one mind changed – 228 margin)
  • 430 to 204 (two minds changed – 226 margin)

For every “mind changed” the margin of the win drops by 2! In fact we only need 115 MPs to change their minds for the margin to be 0, and therefore 116 need only change their mind for May to win. Let’s crack on with puzzle number 2!

2. “Garabaggios latest effort – The Source Of Circles shows a corner (a right angle) and a large circle (of radius 1 unit, according to the catalogue) and a sequence of smaller and smaller circles, each tangent to each of the two walls and each touching the next biggest circle. According to the catalogue the circles continue ad infinitum into the corner. By what (linear) factor (f) is each circle smaller than the next largest one? Hence work out the total area of the infinite set of circles.”

We can see the first two of these circles in the diagram below:

Now let’s put in a few helpful lines:

The green line joins the centres of the two circles. Now if we consider the right-angled triangle created by the red, purple and green lines we can start to deduce some useful relationships.

If we call the radius of the the little circle r, then the base of our right-angled triangle is length 1-r and similarly for the height. The hypotenuse is length 1+r – it is the sum of the radii of the two circles. Now we can involve Pythagoras:

Screen Shot 2019-03-29 at 14.55.25

The radius of the large circle is 1, so the linear factor by which each circle is smaller than the last is simply equal to the radius of the first smaller circle, r, which we found above. Now we can use the formula for the sum of a geometric series to find the sum of the areas of all the infinitely many circles. Here R is the ratio between successive areas which will be our length ratio squared:

Screen Shot 2019-03-29 at 15.16.09

The use of this formula is made possible by the fact that our length ratio is less than 1, and so our area ratio is also less than 1.

3. “Andy was flummoxed by the last question of this week’s homework:

Screen Shot 2019-03-29 at 15.21.14

“Clearly 2 is one answer,” remarked Candy, “but it’s a cubic so there must be two other roots.” “But I can’t solve a cubic!” replied Andy. But Candy thought it wasn’t necessary to solve a cubic. How did she go about it?”

Unless I’m missing some subtlety of this puzzle, I think it is just hinting at a good method for solving cubics which is taught at A-level. The method is to try to find one obvious root (2 in this case) and then to divide by the linear factor that produces the root ( (x-2) in this case ) :

Screen Shot 2019-03-29 at 15.35.21

You are then left with a quadratic factor which hopefully Candy knows how to solve. In this case we want to know if there are any other roots than 2, so we should investigate whether the quadratic even has real roots before we try to find them! Let’s check out the discriminant:

Screen Shot 2019-03-29 at 15.44.07

The discriminant is negative! Now we know the final two roots are a pair of imaginary conjugates so 2 is our only real root.

4. “Down at the Last Chance Saloon Gullible Gus was explaining the die-rolling game to a visitor from Chipolata County. “You expect to need on average 6 rolls to get 2 consecutive odd scores and 14 to get 3,” he said. “It seems to me,” drawled the newcomer, “that if you roll the die over and over again and you know the expected number of successive rolls to get n successive odd scores – let’s call it u(n), it should be a doddle to deduce the expected number of rolls you need to get n+1 succesive odd scores – let’s call it u(n+1).” How?”

This is the most interesting problem of the lot. This answer is far more detailed than required and if anyone has a nice, simple and intuitive way of explaining it please get in touch!  Before I even thought about the actual question at hand, I wanted to satisfy myself that I understood where those 6 and 14 figures came from.

Usually if you want to find out how long you would have to wait to see an event occur, you would work out the probability of it occurring and use that to work out your waiting time. For example the probability of rolling a 6 is 1/6 so we know intuitively that we would expect to have to roll the dice 6 times before seeing a 6, on average (although it is no guarantee!). But in this scenario we cannot simply work out the probability of our event occurring. Sure, if you were given a fixed number of rolls you could work out the probability of you seeing two or more consecutive odds, but that’s not really the problem a hand. We’re going to have to work in the language of expectation.

We’re going to work out what our expected waiting time will be before we see two consecutive odds. Expectation is a weighted average of the possible values our waiting time could take, each weighted to the probability of that waiting time occurring. For example, the expected score when rolling a dice is the sum of each score multiplied by the probability it occurs: (1/6)*1 + (1/6)*2 + (1/6)*3 + (1/6)*4 + (1/6)*5 + (1/6)*6 =3.5 . Essentially what you would expect the average score of a dice roll to be!

Let’s set up an equation with our waiting time to see two consecutive odds:

Screen Shot 2019-03-29 at 16.12.00

Now we can put in one situation we know lots about: rolling two odds straight away. Our “waiting time” was two rolls of the dice and the probability of this happening is 1/4 so we can put this weighted event into our expectation formula:

Screen Shot 2019-03-29 at 16.19.18

Now what about if we roll an even on our first roll? The probability of this happening is 1/2. Let’s think about our waiting time now. We are still going to have to wait however long we would expect to wait to see two consecutive odds but now we have wasted one roll on getting an even. Our waiting time for the event of rolling an even first will be how long we have to wait to see two consecutive odds + 1 (for the wasted roll of the dice):

Screen Shot 2019-03-29 at 16.33.16

Finally lets think about what happens if we roll odd then even straight out of the gate. In the same way as before we will still have to wait as long as we would expect from the start to see two consecutive odds  except this time we’ve wasted two rolls:

Screen Shot 2019-03-29 at 16.37.17

We’ve now covered all our bases and have set up a nice (and solvable!) equation for our expected waiting time. We can now set about solving it:Screen Shot 2019-03-29 at 16.47.20

Just what we wanted to show! We can set up a similar equation thinking about wasted rolls for waiting to see three odds in a row:

Screen Shot 2019-03-29 at 17.01.08

Now again we got the answer we wanted! Now I feel satisfied I know where these figures are coming from. Now lets try to set up a shortcut to finding u(n+1). It seems to me that u(n+1) = 2( u(n) + 1). Let’s make sure and generalise our expression for u(n):

Screen Shot 2019-03-29 at 17.37.00

This checks out for the two we know: 2*(4-1)=6 and 2*(8-1)=14. Now we can test our claim about the relationship between u(n) and u(n+1):

Screen Shot 2019-03-29 at 17.53.54

Our speculation was right! 2(u(n)+1) = u(n+1). I’ll repeat what I said at the start – this is not, as the puzzle wants our solution to be, a doddle. I’m sure there is a nice intuitive explanation out there, I just wanted to do this one in depth.

This is an equivalent question to how many flips of a coin until we can expect to see n consecutive heads. Both problems are related to a concept called a Markov chain. If you want to read something even more in depth about this type of problem here are some notes that do it justice: https://courses.cit.cornell.edu/info2950_2012sp/mh.pdf