If you’re keen to do some mathematics whilst sightseeing around Edinburgh, then our walking tour is for you. We have curated a mathematical walking tour of Edinburgh. This combines the history of Edinburgh with some interesting mathematical facts. At each stop there is a mathematical puzzle to have a go at. You can find the solutions to these puzzles below. Check out this page for the full tour Witches Well There are three strategies they could follow:1) Each could guess the same colour as her card2) Each could guess randomly3) One could guess the same colour as her card, the other can guess the opposite The first strategy means they will lose if they have the same colour cards, so a 50% chance. For the second strategy, each witch has a 50% chance of guessing correctly, so their chance of guessing correctly is 0.5 x 0.5 = 0.25, or 25%.As for the third strategy, it turns out to be a winning strategy. These are the possible scenarios:1 gets red, 2 gets red: 1 guesses red, 2 guesses black. 2 is incorrect and they are released.1 gets red, 2 gets black: 1 guesses red, 2 guesses red. 1 is incorrect and they are released. 1 gets black, 2 gets red: 1 guesses black, 2 guesses black. 1 is incorrect and they are released. 1 gets black, 2 gets black: 1 guesses black, 2 guesses red. 2 is incorrect and they are released. Why does this work?The first player is guessing the colour she gets. In other words, she is only right if they both have the same colour card. The second player, on the other hand, is guessing the opposite of the colour she gets. So, she is only correct if they have opposite colour cards. This means that one of them is bound to be incorrect regardless of what colour cards they receive, and, with this strategy, both can live! Camera Obscura The two triangles are similar, and so we can use the fact that we know the dimensions of the larger one to determine the size of the smaller one. You could use Pythagoras’ Theorem to work out the missing side length of the big triangle, find the corresponding side of the small triangle (using that the sides of the large triangle are in the same ratio as those in the small one), and then find the horizontal distance, again using Pythagoras’ Theorem. However, a more elegant solution is to realise that the horizontal ‘widths’ of the two triangles have the same ratio as the vertical sides, so the distance to the wall is 80/60m = 4/3m. Peter Guthrie Tait This may seem impossible... the trick is to cross your arms before you pick the two ends of the scarf. In this way you tie a knot with your arms, and then “transfer” it to the scarf...If you pick the two ends of the scarf as you would naturally do, without crossing your arms, your arms and the scarf would basically make a circle, and there is no way to knot a circle. James Clerk Maxwell Statue It may be helpful to know that yellow is made up from red and green.The first picture is the blue part; there is a lot of it in the wings and head.The second picture is the red part; there is very little in the wings.The third picture is the green part; there is some in most parts of the picture. Scott Monument “Oh, what a tangled web we weave when first we practise to deceive!”, from Walter Scott’s poem “Marmion: A Tale of Flodden Field” City Observatory The speed of light in vacuum is c = 3 x 108 meters/secondSo, light leaving Alpha Centauri would take (4.1315 x 1016)/(3 x 108 ) = 137716666.667 secondsOne year has: 365 days x 24 hours per day x 60 minutes per hour x 60 seconds per hour = 31536000 seconds Thus, it would take 137716666.667/31536000 = 4.367 years for light leaving Alpha Centauri to reach earth. That means an image of Alpha Centauri viewed on earth today would be approximately 4.367 years old! Holyrood Abbey Game 1 (the St. Petersburg paradox)Q: How many rounds do you need to lose before you can win a million pounds?You can only win for the first time on the 20-th round, so you need to have lost 19 times before (2^19 = 524288, 2^20 = 1048576).Q: How likely is it to lose those that many times in a row?The probability of losing 19 times in a row is 2^{-19} = 0.00000190734, or 0.00019073486%Q: How much would you be willing to pay to play this game?Given that it is quite likely that you will win on the first couple of rounds, I would not pay much to play the game. It is also unlikely that any casino would offer such a game due to the infinite expected value of winnings for the player.Given that you may be able to win an infinitely large amount of money, you may believe it is fair to pay any fee that I request. This problem is usually referred to as the St. Petersburg paradox: although you are expected to win an infinite amount of money, you most likely won’t, so should therefore not pay a very large fee to enter the game.Game 2 (the Martingale betting strategy)You always make a profit of X, exactly doubling your initial bet!So, what’s the catch? Well, the odds were in your favour in this game (2/3 to 1/3) which makes it more likely for you to win. In theory, this is a winning strategy if the odds are at least 50/50 (they never are at a casino), you have unlimited funds (good for you!) and there are no limits in bet size. Disclaimer: we are not responsible if you decide to use this strategy and lose all your money. Scottish Parliament On possible solution is shown below. Can you find any others? There are at least two different solutions! The World's End These are ‘try and see’ games. The Oyster Club You should always switch. In that case you have a 2/3 chance of winning, otherwise you only have a 1/3 chance of winning. See https://en.wikipedia.org/wiki/Monty_Hall_problem for an explanation. Greyfriars Kirkyard You can see an animation of the problem here https://www.geogebra.org/m/mcuvMcCbThis is called a “hinged dissection”. Harry Potter Minerva McGonagall = 49755941 4376516133Minerva = 4 + 9 + 7 + 5 + 5 + 9 + 4 + 1 = 44McGonagall = 4 + 3 + 7 + 6 + 5 + 1 + 6 + 1 + 3 + 3 = 39Character number: 2 ( 44 + 39 = 83, 8 + 3 = 11, 1 + 1 = 2 )Heart number: 5 (9 + 5 + 1 + 6 + 1 + 1 = 23, 2 + 3 = 5)Social number: 6 (83 – 23 = 60) Royal Mile Since the lord travels at 0.5 miles per hour, it will take him 2 hours until he reaches the Parliament.The servant will be constantly moving during these two hours at a constant speed of 5 miles per hour. Therefore, he must have travelled a total of 10 miles. Luckenbooths In the first image the squares are 1cm^2, in the second the squares are 0.25cm^2 and in the final image the squares are 0.04cm^2. Estimating the area of the circle using the 3 different grids, by counting either only full squares inside all the circle, or all squares with parts inside the circle, gives Fig. 1: 4 <= A <= 16 (=4*1 and =16*1)Fig. 2: 4 <= A <= 9 (=16*0.25 and =36*0.25)Fig. 3: 5.92 <= A <= 8.32 (=148*0.04 and =208*0.04)We now calculate the exact area of the circle using the formula A=pi*r2, giving A = 7.06858347058...Hence we see that the correct area is always between our two estimates, and the estimates get more accurate as the size of the square decreases. Surgeon's Hall First must convert the height to metres: 1ft \approx 0.3m, 1inch \approx 0.025m so 5ft = 1.5m and 7 inches = 0.175m, which gives a total height of 1.675m.We now use BMI formula to calculate the weight 22.1*1.6752= 62kg.And now use the dosage formula to get maximum allowable volume 7*62/10*1/0.5=7*6.2*2= 86.8 mL. Bayes Centre P(A) = probability that patient is disease free = 0.99P(B) = probability that the test is positive = 0.10304P(B|A) = probability of testing positive given that you don’t have the disease = 0.096Now we calculate P(A|B), the probability that the patient is disease free given they have received a positive test result using Bayes Theorem.P(A|B) = P(B|A) * P(A) / P(B) = 0.096 * 0.99 / 0.10304 = 0.9223602. St Albert's Chapel They are at the north pole. The Meadows There are only two points with an odd number of paths connected to them, the rest have an even number. Starting at one of these odd-pathed points, you should be able to make your way around all of the paths and end on the other odd-pathed point. There are a number of ways of doing this.Once we remove the crossed-out path there are four odd-pathed points and it is not possible to go along each path once and only once.You can find out more about why this is the case here: https://en.wikipedia.org/wiki/Seven_Bridges_of_K%C3%B6nigsberg Canal Basin 1) The Union Canal is about 50km, and the soliton speed turns out to be 4.43m/s, which is about 10mph. So it would take about 11.3 hours, or approximately 11 hours and 20 minutes for the soliton to travel the length of the canal.2) This is much faster than you could walk it, by a factor of about 3.3) This is a pretty reasonable speed to cycle at. This article was published on Monday 10 August 2026