
    
        
        
        
                
        
        
        
                
        
        
        
                
        
        
        
                
        
        
        
                
        
        
        
                
        
        
        
                
        
        
        
                
        
        
        
                
        
        
        
            
{"version":"https:\/\/jsonfeed.org\/version\/1","title":"mathspp.com feed","home_page_url":"https:\/\/mathspp.com\/blog\/problems","feed_url":"https:\/\/mathspp.com\/blog\/problems.json","description":"Stay up-to-date with the articles on mathematics and programming that get published to mathspp.com.","author":{"name":"Rodrigo Gir\u00e3o Serr\u00e3o"},"items":[{"title":"Problem #066 \u2013 regex crossword","date_published":"2024-08-27T12:00:00+02:00","id":"https:\/\/mathspp.com\/blog\/problems\/regex-crossword","url":"https:\/\/mathspp.com\/blog\/problems\/regex-crossword","content_html":"<p>Can you solve this crossword where all hints are regular expressions?<\/p>\n\n<h2 id=\"problem-statement\">Problem statement<a href=\"#problem-statement\" class=\"toc-anchor after\" data-anchor-icon=\"#\" aria-label=\"Anchor\"><\/a><\/h2>\n<figure class=\"image-caption\"><img title=\"The regex crossword puzzle grid.\" alt=\"Puzzle in the shape of an hexagonal tiled region where cells are supposed to be filled in with characters from the alphabet according to hints given as regular expressions.\" src=\"\/user\/pages\/02.blog\/03.problems\/p066-regex-crossword\/_puzzle.webp\"><figcaption class=\"\">The regex crossword puzzle grid.<\/figcaption><\/figure>\n<p>At <a href=\"https:\/\/ep2024.europython.eu\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">EuroPython 2024<\/a> I watched a lightning talk about the art of puzzle solving.\nIn it, the speaker showed the regex crossword puzzle that you can see above, <a href=\"https:\/\/puzzles.mit.edu\/2013\/coinheist.com\/rubik\/a_regular_crossword\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">that I took from this URL<\/a>.\nYou are supposed to fill the hexagonal grid with letters so that all of the regular expressions shown match.<\/p>\n<p>If you don't know regular expressions, the puzzle only uses a simple subset of the syntax:<\/p>\n<ul>\n<li>literal character matches;<\/li>\n<li>wildcard matches with <code>.<\/code>;<\/li>\n<li>alternatives with <code>|<\/code>;<\/li>\n<li>the quantifiers <code>?<\/code>, <code>+<\/code>, and <code>*<\/code>;<\/li>\n<li>character sets with <code>[...]<\/code> and negated character sets with <code>[^...]<\/code>; and<\/li>\n<li>groups with <code>()<\/code> and group references with <code>\\1<\/code>, <code>\\2<\/code>, etc.<\/li>\n<\/ul>\n<p>You can look this up and then you will be able to solve the challenge.\nYou can also use <a href=\"https:\/\/regex101.com\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">the site regex101<\/a> to help you check what each regular expression means.<\/p>\n<div class=\"notices blue\">\n<p>Give it some thought!<\/p>\n<\/div>\n<h2 id=\"solution\">Solution<a href=\"#solution\" class=\"toc-anchor after\" data-anchor-icon=\"#\" aria-label=\"Anchor\"><\/a><\/h2>\n<p>In the spirit of the puzzle hunting community, I will not share my solved grid here.\nIf you need help, feel free to <a href=\"mailto:rodrigo@mathspp.com\" class=\"mailto\">email me<\/a> and we can talk it over.<\/p>\n<p>P.S. if I understood correctly, in the puzzle hunting community you're not supposed to just fill in the grid.\nIn some way, somehow, you are supposed to be able to extract an English word or phrase from that filled puzzle without any extra information, and then you check that you got it correctly by <a href=\"https:\/\/puzzles.mit.edu\/2013\/coinheist.com\/rubik\/a_regular_crossword\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">\u201cchecking your answer spoiler-free\u201d in the website where I took the regex crossword from<\/a>\nI am still stuck in that step!<\/p>","summary":"Can you solve this crossword where all hints are regular expressions?","date_modified":"2025-07-23T16:49:02+02:00","tags":["mathematics","regex"],"image":"\/user\/pages\/02.blog\/03.problems\/p066-regex-crossword\/thumbnail.webp"},{"title":"Problem #065 \u2013 clock synchronisation","date_published":"2024-01-15T00:00:00+01:00","id":"https:\/\/mathspp.com\/blog\/problems\/clock-synchronisation","url":"https:\/\/mathspp.com\/blog\/problems\/clock-synchronisation","content_html":"<p>When will these two clocks synchronise again?<\/p>\n\n<h2 id=\"problem-statement\">Problem statement<a href=\"#problem-statement\" class=\"toc-anchor after\" data-anchor-icon=\"#\" aria-label=\"Anchor\"><\/a><\/h2>\n<p>You have two digital clocks.\nOne of them just displays the hours and minutes in the format HH:MM while the other is a stopwatch that displays minutes and seconds in the format MM:SS.\nThe stopwatch wraps around at 59:59, when it goes back to 00:00.<\/p>\n<p>On a certain day at 00:00, the stopwatch is turned on.\nWhen will the clock and the stopwatch have matching displays again?\nAnd how often does that happen?<\/p>\n<div class=\"notices blue\">\n<p>Give it some thought!<\/p>\n<\/div>\n<h2 id=\"solution\">Solution<a href=\"#solution\" class=\"toc-anchor after\" data-anchor-icon=\"#\" aria-label=\"Anchor\"><\/a><\/h2>\n<p>The two clocks will have matching displays again at 01:01:01, then again at 02:02:02, 03:03:03, 04:04:04, ..., 23:23:23, so this happens 24 times per day.<\/p>\n<p>To get to this conclusion, we start by realising that the stopwatch can actually be seen as a clock that shows the current time, but without the hours.\nThus, the minutes display of the regular clock will always match the minutes display of the stopwatch.<\/p>\n<p>To recap, the two clocks have displays in the format HH:MM and MM:SS and we already know that the MM sections always match.\nThis means that for the two displays to display the same thing, we must have HH = MM = SS, which happens at 00:00:00, 01:01:01, ..., up to 23:23:23.<\/p>\n<h3 id=\"bonus-question\">Bonus question<a href=\"#bonus-question\" class=\"toc-anchor after\" data-anchor-icon=\"#\" aria-label=\"Anchor\"><\/a><\/h3>\n<p>What if the stopwatch wraps around at 99:59 instead of 59:59?<\/p>","summary":"When will these two clocks synchronise again?","date_modified":"2025-07-23T16:49:02+02:00","tags":["mathematics"],"image":"\/user\/pages\/02.blog\/03.problems\/p065-clock-synchronisation\/thumbnail.webp"},{"title":"Problem #064 \u2013 infinite mathematicians with hats","date_published":"2024-01-02T00:00:00+01:00","id":"https:\/\/mathspp.com\/blog\/problems\/infinite-mathematicians-with-hats","url":"https:\/\/mathspp.com\/blog\/problems\/infinite-mathematicians-with-hats","content_html":"<p>How can an infinite number of mathematicians figure out their own hat colours?<\/p>\n\n<h2 id=\"problem-statement\">Problem statement<a href=\"#problem-statement\" class=\"toc-anchor after\" data-anchor-icon=\"#\" aria-label=\"Anchor\"><\/a><\/h2>\n<p>An infinite number of mathematicians are standing in a line.\nIn a couple of minutes, a disruption in the space-time continuum will cause a black or white hat to appear on the head of each mathematician.\nAfter that happens, the mathematicians will try to guess their own hat colour (they can't see it) based on the colours of the hats of all other mathematicians.<\/p>\n<p>What's the strategy that the mathematicians must agree on, before hand, so that only a <em>finite<\/em> number of mathematicians guesses wrong?<\/p>\n<div class=\"notices blue\">\n<p>Give it some thought!<\/p>\n<\/div>\n<h2 id=\"solution\">Solution<a href=\"#solution\" class=\"toc-anchor after\" data-anchor-icon=\"#\" aria-label=\"Anchor\"><\/a><\/h2>\n<p>When we look at each matematician's hat we can create a sequence of <span class=\"mathjax mathjax--inline\">\\(0\\)<\/span>s and <span class=\"mathjax mathjax--inline\">\\(1\\)<\/span>s.\nFor example, if everyone has a white hat except for the first three mathematicians, then we would have the sequence <span class=\"mathjax mathjax--inline\">\\((1,1,1,0,0,\\cdots)\\)<\/span>.<\/p>\n<p>Let us say two sequences are <em>alike<\/em> if they are the same except for a finite number of positions.\nAs an example, the sequence we get when all mathematicians have a white hat and the previous sequence are <em>alike<\/em> because they differ only in the first three positions: <span class=\"mathjax mathjax--inline\">\\((\\underline{0}, \\underline{0}, \\underline{0}, 0, 0,\\cdots)\\)<\/span>.<\/p>\n<p>For any sequence <span class=\"mathjax mathjax--inline\">\\(S\\)<\/span> we can think of all the other sequences with which <span class=\"mathjax mathjax--inline\">\\(S\\)<\/span> is <em>alike<\/em>.\nLet us call that group of <em>alike<\/em> sequences <span class=\"mathjax mathjax--inline\">\\([S]\\)<\/span>.\nWhat the mathematicians must do is: for every single group <span class=\"mathjax mathjax--inline\">\\([S]\\)<\/span> they must pick a random sequence from that group and memorise it.<\/p>\n<p>When they are given the hats, they must look at their colleagues and figure out in which group <span class=\"mathjax mathjax--inline\">\\([S]\\)<\/span> their hat sequence belongs.\nThen, they will recall the sequence they all memorized from that group and each mathematician will say that their hat is of the colour corresponding to their position on the memorized sequence.\nBy definition, only a finite number of mathematicians guesses wrong because the sequence they will recreate and the real sequence are <em>alike<\/em>, i.e. they differ only in a finite number of positions.<\/p>","summary":"How can an infinite number of mathematicians figure out their own hat colours?","date_modified":"2025-07-23T16:49:02+02:00","tags":["logic","mathematics","sequences"],"image":"\/user\/pages\/02.blog\/03.problems\/p064-infinite-mathematicians-with-hats\/thumbnail.webp"},{"title":"Problem #063 \u2013 arbitrarily many primes in arbitrarily big intervals","date_published":"2023-01-29T00:00:00+01:00","id":"https:\/\/mathspp.com\/blog\/problems\/arbitrarily-many-primes-in-arbitrarily-big-intervals","url":"https:\/\/mathspp.com\/blog\/problems\/arbitrarily-many-primes-in-arbitrarily-big-intervals","content_html":"<p>Can you prove that there are arbitrarily many primes in arbitrarily big intervals?<\/p>\n\n<h2 id=\"problem-statement\">Problem statement<a href=\"#problem-statement\" class=\"toc-anchor after\" data-anchor-icon=\"#\" aria-label=\"Anchor\"><\/a><\/h2>\n<p>The problem statement asks you to prove that for <em>any<\/em> positive integer number <span class=\"mathjax mathjax--inline\">\\(k\\)<\/span> you can think of,\nthere will be a certain lower bound <span class=\"mathjax mathjax--inline\">\\(n_0\\)<\/span> (that depends on <span class=\"mathjax mathjax--inline\">\\(k\\)<\/span>) such that for <em>any<\/em> integer <span class=\"mathjax mathjax--inline\">\\(n \\geq n_0\\)<\/span>,\n<em>there is<\/em> an interval of length <span class=\"mathjax mathjax--inline\">\\(n\\)<\/span> that contains <em>exactly<\/em> <span class=\"mathjax mathjax--inline\">\\(k\\)<\/span> primes.\n(When we talk about the length of the interval, we are talking about how many integers it contains.)<\/p>\n<p>If the statement confused you a bit, that is ok.\nLet me rephrase it.<\/p>\n<p>You and I will play a game.\nI will think of a positive integer <span class=\"mathjax mathjax--inline\">\\(k\\)<\/span>.\nNow, your job is to come up with another positive integer <span class=\"mathjax mathjax--inline\">\\(n_0\\)<\/span> such that,\nif I pick a number <span class=\"mathjax mathjax--inline\">\\(n\\)<\/span> greater than <span class=\"mathjax mathjax--inline\">\\(n_0\\)<\/span>,\nyou can always find an interval of size <span class=\"mathjax mathjax--inline\">\\(n\\)<\/span> that contains <span class=\"mathjax mathjax--inline\">\\(k\\)<\/span> primes.<\/p>\n<p>For example, if I thought of <span class=\"mathjax mathjax--inline\">\\(k = 5\\)<\/span>, you <em>could not<\/em> pick <span class=\"mathjax mathjax--inline\">\\(n_0 = 4\\)<\/span>.\nWhy not?\nBecause if I pick <span class=\"mathjax mathjax--inline\">\\(n = 4\\)<\/span>, there is <em>no<\/em> interval of length <span class=\"mathjax mathjax--inline\">\\(4\\)<\/span> that contains <span class=\"mathjax mathjax--inline\">\\(5\\)<\/span> prime numbers...\nEspecially because an interval of length <span class=\"mathjax mathjax--inline\">\\(4\\)<\/span> contains only <span class=\"mathjax mathjax--inline\">\\(4\\)<\/span> integers!<\/p>\n<p>This problem was posed to me by my mathematician cousin and I confess that worried me a bit.\nFunnily enough, the problem has a surprisingly simple solution.\n(I am not saying you will get there easily.\nI am just saying that once you do, you will realise the solution was not very complicated.)<\/p>\n<div class=\"notices blue\">\n<p>Give it some thought!<\/p>\n<\/div>\n<p><strong>Remember<\/strong>:<\/p>\n<ul><li>there are infinitely many primes; however<\/li>\n<li>they become scarcer and scarcer the further you go down the number line.<\/li>\n<\/ul><h2 id=\"solvers\">Solvers<a href=\"#solvers\" class=\"toc-anchor after\" data-anchor-icon=\"#\" aria-label=\"Anchor\"><\/a><\/h2>\n<p>Congratulations &#127881; to everyone who managed to solve this problem:\nCongratulations to you if you managed to solve this problem correctly!\nIf you did, feel free to<\/p>\n<ul><li>Rodrigo G. S., Portugal &#127477;&#127481;  (&lt;- example);<\/li>\n<\/ul><p>If <em>you<\/em> managed to solve this problem, you can <a href=\"https:\/\/github.com\/mathspp\/mathspp\/edit\/master\/pages\/02.blog\/02.problems\/p063-arbitrarily-many-primes-in-arbitrarily-big-intervals\/item.md\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">add your name to the list<\/a>!\nYou can also <a href=\"mailto:rodrigo@mathspp.com?subject=Solution%20to%20Problem%20#063%20%E2%80%93%20arbitrarily%20many%20primes%20in%20arbitrarily%20big%20intervals\" class=\"mailto\">email me<\/a> your solution and we can discuss it.<\/p>\n<h2 id=\"solution\">Solution<a href=\"#solution\" class=\"toc-anchor after\" data-anchor-icon=\"#\" aria-label=\"Anchor\"><\/a><\/h2>\n<p>A thing I like about this problem is that not only can you prove that interesting statement about the prime numbers, but you can also determine exactly what the lower bound <span class=\"mathjax mathjax--inline\">\\(n_0\\)<\/span> is.<\/p>\n<p>Let us say that <span class=\"mathjax mathjax--inline\">\\(p_k\\)<\/span> is the <span class=\"mathjax mathjax--inline\">\\(k\\)<\/span>-th prime.\nThen, if we set <span class=\"mathjax mathjax--inline\">\\(n_0 = p_k\\)<\/span>, we are good to go.\nLet me show you why.<\/p>\n<p>Suppose that <span class=\"mathjax mathjax--inline\">\\(n\\)<\/span> is any integer <span class=\"mathjax mathjax--inline\">\\(n \\geq n_0\\)<\/span>.\nThen, the interval <span class=\"mathjax mathjax--inline\">\\([1, n]\\)<\/span> contains <span class=\"mathjax mathjax--inline\">\\(p_k\\)<\/span> in it.\nWhy?\nBecause <span class=\"mathjax mathjax--inline\">\\(p_k = n_0\\)<\/span> and <span class=\"mathjax mathjax--inline\">\\(n \\geq n_0\\)<\/span>.<\/p>\n<p>So, the interval <span class=\"mathjax mathjax--inline\">\\([1, n]\\)<\/span> contains <span class=\"mathjax mathjax--inline\">\\(k\\)<\/span> <em>or more<\/em> prime numbers.\nIf it contains <span class=\"mathjax mathjax--inline\">\\(k\\)<\/span> prime numbers, we just found our interval of length <span class=\"mathjax mathjax--inline\">\\(n\\)<\/span> that contains exactly <span class=\"mathjax mathjax--inline\">\\(k\\)<\/span> primes.\nIf it contains more than <span class=\"mathjax mathjax--inline\">\\(k\\)<\/span> primes, we must do something about it.<\/p>\n<p>If the interval <span class=\"mathjax mathjax--inline\">\\([1, n]\\)<\/span> contains more than <span class=\"mathjax mathjax--inline\">\\(k\\)<\/span> prime numbers, then we start sliding the interval to the right, like so:...<\/p>","summary":"Can you prove that there are arbitrarily many primes in arbitrarily big intervals? In this mathematical problem, which is just a logic challenge, the solution is surprisingly uncomplicated.","date_modified":"2025-07-23T16:49:02+02:00","tags":["logic","mathematics","number theory","primes"],"image":"\/user\/pages\/02.blog\/03.problems\/p063-arbitrarily-many-primes-in-arbitrarily-big-intervals\/thumbnail.webp"},{"title":"Problem #062 \u2013 sliding coins","date_published":"2022-06-12T00:00:00+02:00","id":"https:\/\/mathspp.com\/blog\/problems\/sliding-coins","url":"https:\/\/mathspp.com\/blog\/problems\/sliding-coins","content_html":"<p>Can you align all of the coins on the right edge of the board?<\/p>\n\n<figure class=\"image-caption\"><img title=\"Diagram of the coin positions for the problem.\" alt=\"\" src=\"\/user\/pages\/02.blog\/03.problems\/p062-sliding-coins\/_setup.webp\"><figcaption class=\"\">Diagram of the coin positions for the problem.<\/figcaption><\/figure><h2 id=\"problem-statement\">Problem statement<a href=\"#problem-statement\" class=\"toc-anchor after\" data-anchor-icon=\"#\" aria-label=\"Anchor\"><\/a><\/h2>\n<p>The diagram above shows a 3 by 4 grid with 3 coins, one per row and one per column,\nsuch that the rightmost column of the grid is empty.<\/p>\n<p>You are allowed to slide the coins to the columns on their right,\nbut the coins can never leave the board (nor can they be moved back to the left).\nAlso, you always have to move two coins at a time.<\/p>\n<p>Thus, this is a legal move:<\/p>\n<figure class=\"image-caption\"><img title=\"A legal move sliding the top two coins one slot to the right.\" alt='\"The diagram showing an example of a legal move with some arrows.\"' src=\"\/user\/pages\/02.blog\/03.problems\/p062-sliding-coins\/_legal_move.webp\"><figcaption class=\"\">A legal move sliding the top two coins one slot to the right.<\/figcaption><\/figure><p>But moving a single coin, such as in the diagram below, is not allowed:<\/p>\n<figure class=\"image-caption\"><img title=\"An illegal move that slides only one coin to the right.\" alt='\"The diagram showing an example of an illegal move.\"' src=\"\/user\/pages\/02.blog\/03.problems\/p062-sliding-coins\/_illegal_move.webp\"><figcaption class=\"\">An illegal move that slides only one coin to the right.<\/figcaption><\/figure><p>Your objective is to reach this position:<\/p>\n<figure class=\"image-caption\"><img title=\"Target position.\" alt='\"The same 3 by 4 grid containing a coin per row, with all coins on the rightmost column.\"' src=\"\/user\/pages\/02.blog\/03.problems\/p062-sliding-coins\/_objective.webp\"><figcaption class=\"\">Target position.<\/figcaption><\/figure><p>Can you do it?<\/p>\n<p>What if you extend the board two columns to the left and two rows up,\nand add another two coins along the diagonal?<\/p>\n<div class=\"notices blue\">\n<p>Give it some thought!<\/p>\n<\/div>\n<p>This is an adaptation of a problem from the <a href=\"https:\/\/amzn.to\/3NJUn5D\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">book &ldquo;Algorithmic Puzzles&rdquo;<\/a> by Anany Levitin and Maria Levitin.<sup id=\"fnref1:1\"><a href=\"#fn:1\" class=\"footnote-ref\">1<\/a><\/sup><\/p>\n<h2 id=\"solvers\">Solvers<a href=\"#solvers\" class=\"toc-anchor after\" data-anchor-icon=\"#\" aria-label=\"Anchor\"><\/a><\/h2>\n<p>Congratulations to the ones that solved this problem correctly and, in particular, to the ones\nwho sent me their correct solutions:<\/p>\n<ul><li>David H., Taiwan;<\/li>\n<\/ul><p>Know how to solve this?\nJoin the list of solvers by <a href=\"mailto:rodrigo@mathspp.com?subject=Solution%20to%20Problem%20#062%20%E2%80%93%20sliding%20coins\" class=\"mailto\">emailing me<\/a> your solution!<\/p>\n<h2 id=\"solution\">Solution<a href=\"#solution\" class=\"toc-anchor after\" data-anchor-icon=\"#\" aria-label=\"Anchor\"><\/a><\/h2>\n<p>You can move all coins to the right in 3 moves:<\/p>\n<ol><li>move the top and bottom coins (this aligns the top and middle coins while placing the bottom coin in the rightmost column);<\/li>\n<li>move the top and middle coins; and<\/li>\n<li>move the top and middle coins again.<\/li>\n<\/ol><p>This diagram shows the evolution of the grid:<\/p>\n<pre><code>X . . .  start\n. X . .\n. . X .\n\n. X . . &gt;\n. X . .\n. . . X &gt;\n\n. . X . &gt;\n. . X . &gt;\n. . . X\n\n. . . X &gt;\n. . . X &gt;\n. . . X<\/code><\/pre>\n<p>If we extend the board up and left, we'd have this starting configuration:<\/p>\n<pre><code>X . . . . .\n. X . . . .\n. . X . . .\n. . . X . .\n. . . . X .<\/code><\/pre>\n<p>Now, consider the total number of spaces to the right of the coins:<\/p>\n<pre><code>X 1 2 3 4 5\n. X 6 7 8 9\n. . X 0 1 2\n. . . X 3 4\n. . . . X 5<\/code><\/pre>\n<p>We see that there are 15 spaces on the grid to the right of coins.\nWe also know that each time we move two coins, the number of spaces to the right of the coins decreases by 2.\nNow, if we were to align all coins on the rightmost column, the number of spaces to the right of the coins would be 0.\nHowever, we can't...<\/p>","summary":"Can you align all of the coins on the right edge of the board?","date_modified":"2025-07-23T16:49:02+02:00","tags":["invariants","logic","mathematics"],"image":"\/user\/pages\/02.blog\/03.problems\/p062-sliding-coins\/thumbnail.webp"},{"title":"Problem #061 \u2013 flower garden","date_published":"2022-05-22T00:00:00+02:00","id":"https:\/\/mathspp.com\/blog\/problems\/flower-garden","url":"https:\/\/mathspp.com\/blog\/problems\/flower-garden","content_html":"<p>Three mathematicians discuss a beautiful flower garden and the coloured flowers within.<\/p>\n\n<figure class=\"image-caption\"><img title=\"Photo by Norikio Yamamoto on Unsplash.\" alt=\"\" src=\"\/user\/pages\/02.blog\/03.problems\/p061-flower-garden\/thumbnail.png\"><figcaption class=\"\">Photo by Norikio Yamamoto on Unsplash.<\/figcaption><\/figure>\n<h2 id=\"problem-statement\">Problem statement<a href=\"#problem-statement\" class=\"toc-anchor after\" data-anchor-icon=\"#\" aria-label=\"Anchor\"><\/a><\/h2>\n<p>Three mathematicians were discussing a beautiful flower garden.\nThe first mathematician said:<\/p>\n<blockquote>\n<p>\u201cIt's a beautiful garden.\nAll flowers are either red, yellow, or blue...\nAnd whatever three flowers you pick, one of them is bound to be red.\u201d<\/p>\n<\/blockquote>\n<p>The second mathematician said:<\/p>\n<blockquote>\n<p>\u201cIt is indeed a beautiful garden!\nThere are red flowers, yellow flowers, and blue flowers!\nI also noticed that, whatever three flowers you pick, one of them is bound to be yellow.\u201d<\/p>\n<\/blockquote>\n<p>The third mathematician, who had never been to the garden, remarked:<\/p>\n<blockquote>\n<p>\u201cThat's interesting!\nIf that's true, I can say that, whatever three flowers I pick, one of them is bound to be blue!\u201d<\/p>\n<\/blockquote>\n<p>The first two mathematicians glanced at each other and smiled.<\/p>\n<p>Is the third mathematician right? Or wrong? Why?<\/p>\n<div class=\"notices blue\">\n<p>Give it some thought!<\/p>\n<\/div>\n<p>This problem is from the amazing [book \u201cTo Mock a Mockingbird\u201d][mock-mockingbird] by the mathematician Raymond Smullyan.<sup id=\"fnref1:1\"><a href=\"#fn:1\" class=\"footnote-ref\">1<\/a><\/sup><\/p>\n<h2 id=\"solvers\">Solvers<a href=\"#solvers\" class=\"toc-anchor after\" data-anchor-icon=\"#\" aria-label=\"Anchor\"><\/a><\/h2>\n<p>Congratulations to the ones that solved this problem correctly and, in particular, to the ones\nwho sent me their correct solutions:<\/p>\n<ul>\n<li>David H., Taiwan;<\/li>\n<li>Christ van W., The Netherlands;<\/li>\n<li>David R., Mexico;<\/li>\n<li>Micha\u0142 D., Poland;<\/li>\n<\/ul>\n<p>Know how to solve this?\nJoin the list of solvers by <a href=\"mailto:rodrigo@mathspp.com?subject=Solution%20to%20Problem%20#061%20%E2%80%93%20flower%20garden\" class=\"mailto\">emailing me<\/a> your solution!<\/p>\n<h2 id=\"solution\">Solution<a href=\"#solution\" class=\"toc-anchor after\" data-anchor-icon=\"#\" aria-label=\"Anchor\"><\/a><\/h2>\n<p>The third mathematician is right.<\/p>\n<p>The first sentence of each mathematician establishes that all flowers in the garden are one of three colours (red, yellow, blue) and that all colours are represented; that is, there is <em>at least<\/em> one red flower, <em>at least<\/em> one yellow flower, and <em>at least<\/em> one blue flower.<\/p>\n<p>Then, the first mathematician says that whatever three flowers you pick, one is bound to be red.\nThis means that the garden cannot contain three or more flowers that are not red.\nAfter all, if there were, say, two yellow flowers and one blue flower,\nyou could pick those three and there wouldn't be a red flower in there.<\/p>\n<p>At the same time, we know there has to be at least one yellow flower and one blue flower,\nso we conclude the garden has an unknown number of red flowers, one yellow flower, and one blue flower.<\/p>\n<p>Then, the second mathematician speaks!\nFrom their remark, we could make a similar independent conclusion:\nthe garden has an unknown number of yellow flowers, one red flower, and one blue flower.<\/p>\n<p>Thus, if we combine the two conclusions,\nwe get that the garden has three flowers only:<\/p>\n<ul>\n<li>one red flower;<\/li>\n<li>one yellow flower; and<\/li>\n<li>one blue flower.<\/li>\n<\/ul>\n<p>Therefore, the third mathematician is also right:\nwhatever three flowers you pick, one is bound to be blue.<\/p>\n<p><a href=\"\/subscribe\">Don't forget to subscribe to the newsletter<\/a> to get bi-weekly\nproblems sent straight to your inbox.<\/p>\n<div class=\"footnotes\">\n<hr>\n<ol>\n<li id=\"fn:1\">\n<p>This is an Amazon Affiliate link and I may earn a commission if you purchase the book. This comes at no extra cost to you.\u00a0<a href=\"#fnref1:1\" rev=\"footnote\" class=\"footnote-backref\">\u21a9<\/a><\/p>\n<\/li>\n<\/ol>\n<\/div>","summary":"Three mathematicians discuss a beautiful flower garden and the coloured flowers within.","date_modified":"2025-07-23T16:49:02+02:00","tags":["logic","mathematics"],"image":"\/user\/pages\/02.blog\/03.problems\/p061-flower-garden\/thumbnail.png"},{"title":"Problem #060 \u2013 realtor commissions","date_published":"2022-05-08T00:00:00+02:00","id":"https:\/\/mathspp.com\/blog\/problems\/realtor-commissions","url":"https:\/\/mathspp.com\/blog\/problems\/realtor-commissions","content_html":"<p>Two realtors discuss who's netting the award for highest average commission, but it isn't clear who the winner is...<\/p>\n\n<figure class=\"image-caption\"><img title=\"Photo by Dillon Kydd on Unsplash.\" alt=\"\" src=\"\/user\/pages\/02.blog\/03.problems\/p060-realtor-commissions\/thumbnail.png\"><figcaption class=\"\">Photo by Dillon Kydd on Unsplash.<\/figcaption><\/figure><h2 id=\"problem-statement\">Problem statement<a href=\"#problem-statement\" class=\"toc-anchor after\" data-anchor-icon=\"#\" aria-label=\"Anchor\"><\/a><\/h2>\n<p>Alice and Bob are two realtors that work at the same premium real estate agency, WSH.\nBecause WSH really wants to focus on selling premium properties,\nthey instated a monetary prize that is awarded every two years to the realtor that has the highest average commission over the past two years.<\/p>\n<p>The award for the years 2020 and 2021 is being attributed soon.\nOne day, at the office, Alice overheard Bob gloating:<\/p>\n<blockquote>\n<p>&ldquo;I can't wait to get my money! I already know what I'll be doing with it!&rdquo;<\/p>\n<\/blockquote>\n<p>Alice turned to Bob and asked:<\/p>\n<blockquote>\n<p>&ldquo;How can you be so sure that you are the one netting the prize?&rdquo;<\/p>\n<\/blockquote>\n<p>Bob smirked and returned:<\/p>\n<blockquote>\n<p>&ldquo;I guess you haven't been paying attention, Alice!\nIn 2020 I was the realtor with the highest average commission over that year...\nAnd in 2021 I did it again!&rdquo;<\/p>\n<\/blockquote>\n<p>Alice smiled and returned to work.<\/p>\n<p>Who do you think is right?\nIs Bob definitely getting the award?\nOr is there a scenario in which Alice gets the prize?<\/p>\n<div class=\"notices blue\">\n<p>Give it some thought!<\/p>\n<\/div>\n<h2 id=\"solvers\">Solvers<a href=\"#solvers\" class=\"toc-anchor after\" data-anchor-icon=\"#\" aria-label=\"Anchor\"><\/a><\/h2>\n<p>Congratulations to the ones that solved this problem correctly and, in particular, to the ones\nwho sent me their correct solutions:<\/p>\n<ul><li>David H., Taiwan;<\/li>\n<li>Michael W., US;<\/li>\n<\/ul><p>Know how to solve this?\nJoin the list of solvers by <a href=\"mailto:rodrigo@mathspp.com?subject=Solution%20to%20Problem%20#060%20%E2%80%93%20realtor%20commissions\" class=\"mailto\">emailing me<\/a> your solution!<\/p>\n<h2 id=\"solution\">Solution<a href=\"#solution\" class=\"toc-anchor after\" data-anchor-icon=\"#\" aria-label=\"Anchor\"><\/a><\/h2>\n<p>Bob is wrong because there is a scenario in which Alice can win the award...\nEven though Bob had the highest average commission both in 2020 and 2021.\nDoes this seem counterintuitive?\nBecause it is...\nThis is an instance of the <a href=\"\/blog\/til\/simpsons-paradox\">Simpson's Paradox<\/a>.<\/p>\n<p>To paint a clearer picture of how the Simpson's Paradox comes about,\nI will create a fairly extreme hypothetical scenario:<\/p>\n<p>Suppose that Alice and Bob are the <em>only<\/em> realtors working for WSH,\nso that we don't have to care about anyone else.<\/p>\n<p>Suppose that, in 2020, these were the commissions each one made:<\/p>\n<ul><li>Bob sold a single house and made a $10,005 commission.<\/li>\n<li>Alice sold a single house and made a $10,000 commission.<\/li>\n<\/ul><p>Furthermore, suppose that, in 2021, these were the commissions each one made:<\/p>\n<ul><li>Bob sold a single house and made a $20,005 commission.<\/li>\n<li>Alice sold 1000 houses and made a $20,000 commission <em>on each one<\/em>.<\/li>\n<\/ul><p>Here is a table summarising the average commission each one of them made for each year:<\/p>\n<table><thead><tr><th style=\"text-align: right;\"><\/th>\n<th style=\"text-align: right;\">2020<\/th>\n<th style=\"text-align: right;\">2021<\/th>\n<\/tr><\/thead><tbody><tr><td style=\"text-align: right;\">Alice<\/td>\n<td style=\"text-align: right;\"><span class=\"mathjax mathjax--inline\">\\(\\frac{1 \\times 10000}{1} = 10000\\)<\/span><\/td>\n<td style=\"text-align: right;\"><span class=\"mathjax mathjax--inline\">\\(\\frac{1000 \\times 20000}{1000} = 20000\\)<\/span><\/td>\n<\/tr><tr><td style=\"text-align: right;\">Bob<\/td>\n<td style=\"text-align: right;\"><span class=\"mathjax mathjax--inline\">\\(\\frac{1 \\times 10005}{1} = 10005\\)<\/span><\/td>\n<td style=\"text-align: right;\"><span class=\"mathjax mathjax--inline\">\\(\\frac{1 \\times 20005}{1} = 20005\\)<\/span><\/td>\n<\/tr><\/tbody><\/table><p>As we can see, Bob has a higher average commission in 2020...\nBut also in 2021!<\/p>\n<p>However, if we add a third column for 2020 and 2021 combined,\neverything becomes clear:<\/p>\n<table><thead><tr><th style=\"text-align: right;\"><\/th>\n<th style=\"text-align: right;\">2020<\/th>\n<th style=\"text-align: right;\">2021<\/th>\n<th style=\"text-align: right;\">2020 + 2021<\/th>\n<\/tr><\/thead><tbody><tr><td style=\"text-align: right;\">Alice<\/td>\n<td style=\"text-align: right;\"><span class=\"mathjax mathjax--inline\">\\(\\frac{1 \\times 10000}{1} = 10000\\)<\/span><\/td>\n<td style=\"text-align: right;\"><span class=\"mathjax mathjax--inline\">\\(\\frac{1000 \\times 20000}{1000} = 20000\\)<\/span><\/td>\n<td style=\"text-align: right;\"><span class=\"mathjax mathjax--inline\">\\(\\frac{1 \\times 10000 + 1000 \\times 20000}{1001} \\approx 19990\\)<\/span><\/td>\n<\/tr><tr><td style=\"text-align: right;\">Bob<\/td>\n<td style=\"text-align: right;\"><span class=\"mathjax mathjax--inline\">\\(\\frac{1 \\times 10005}{1} = 10005\\)<\/span><\/td>\n<td style=\"text-align: right;\"><span class=\"mathjax mathjax--inline\">\\(\\frac{1...<\/span><\/td><\/tr><\/tbody><\/table>","summary":"Two realtors discuss who&#039;s netting the award for highest average commission, but it isn&#039;t clear who the winner is...","date_modified":"2025-07-23T16:49:02+02:00","tags":["logic","mathematics"],"image":"\/user\/pages\/02.blog\/03.problems\/p060-realtor-commissions\/thumbnail.png"},{"title":"Problem #059 \u2013 marching pegs","date_published":"2022-04-17T00:00:00+02:00","id":"https:\/\/mathspp.com\/blog\/problems\/marching-pegs","url":"https:\/\/mathspp.com\/blog\/problems\/marching-pegs","content_html":"<p>How can you swap the coloured pegs if they can only march forward?<\/p>\n\n<script async src=\"https:\/\/platform.twitter.com\/widgets.js\" charset=\"utf-8\"><\/script><figure class=\"image-caption\"><img title=\"Photo of the game that inspired this post.\" alt=\"\" src=\"\/user\/pages\/02.blog\/03.problems\/p059-marching-pegs\/thumbnail.png\"><figcaption class=\"\">Photo of the game that inspired this post.<\/figcaption><\/figure><h2 id=\"problem-statement\">Problem statement<a href=\"#problem-statement\" class=\"toc-anchor after\" data-anchor-icon=\"#\" aria-label=\"Anchor\"><\/a><\/h2>\n<p>Imagine seven round slots:<\/p>\n<pre><code class=\"language-txt\">O O O O O O O<\/code><\/pre>\n<p>In the three left slots, you have Yellow pegs:<\/p>\n<pre><code class=\"language-txt\">Y Y Y O O O O<\/code><\/pre>\n<p>In the three right slots, you have Green pegs:<\/p>\n<pre><code class=\"language-txt\">Y Y Y O G G G<\/code><\/pre>\n<p>You have to swap the yellow pegs and the green ones,\nbut of course there are some restrictions to what you can do:<\/p>\n<ul><li>pegs can only move forward (that is, yellow pegs can only move to the right and green pegs can only move to the left); and<\/li>\n<li>pegs can only move:\n<ul><li>to the next (adjacent) slot if it is available;<\/li>\n<li>to the second next slot, if that means the peg &ldquo;jumps over&rdquo; a peg of another colour.<\/li>\n<\/ul><\/li>\n<\/ul><p>So, for example, in the configuration below, the green peg can move to the marked slot by jumping over a yellow peg:<\/p>\n<pre><code class=\"language-txt\">G Y O\n^   ^<\/code><\/pre>\n<p>As another example, in the situation below, no peg can move:<\/p>\n<pre><code class=\"language-txt\">O G G Y Y O<\/code><\/pre>\n<p>With these restrictions, can you swap all pegs?\nThat is, can you move the pegs so that all green pegs end up on the left and all yellow pegs end up on the right?<\/p>\n<div class=\"notices blue\">\n<p>Give it some thought!<\/p>\n<p>You can try playing this out yourself: grab 6 coins and lay them in a straight line on a table.\n3 coins on the left with the tails face up and the other 3 coins on the right with the other face up.<\/p>\n<\/div>\n<p>If you need any clarification whatsoever, feel free to ask in the comment section below.<\/p>\n<p>This problem is based off of the puzzle you can see in the thumbnail picture,\nwhich you can play at <a href=\"https:\/\/iconparkorlando.com\/attractions\/museum-of-illusions-orlando\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">Icon Park's Museum of Illusions<\/a>.<\/p>\n<h2 id=\"solvers\">Solvers<a href=\"#solvers\" class=\"toc-anchor after\" data-anchor-icon=\"#\" aria-label=\"Anchor\"><\/a><\/h2>\n<p>Congratulations to the ones that solved this problem correctly and, in particular, to the ones\nwho sent me their correct solutions:<\/p>\n<ul><li>David H., Taiwan;<\/li>\n<li>Michael W., US;<\/li>\n<li>Zech Z., US;<\/li>\n<li>Michael H., US;<\/li>\n<li>Tanishk S., India;<\/li>\n<\/ul><p>Know how to solve this?\nJoin the list of solvers by <a href=\"mailto:rodrigo@mathspp.com?subject=Solution%20to%20Problem%20#059%20%E2%80%93%20marching%20pegs\" class=\"mailto\">emailing me<\/a> your solution!<\/p>\n<h2 id=\"solution\">Solution<a href=\"#solution\" class=\"toc-anchor after\" data-anchor-icon=\"#\" aria-label=\"Anchor\"><\/a><\/h2>\n<p>To solve this problem, my best suggestion is to go one move at a time,\nand to try and think ahead 2 or 3 moves each time you are about to do something.\nYou don't need to look ahead too much to be able to tell if a move is a bad idea or not.<\/p>\n<p>With that said, that can be easier for some and harder for others!<\/p>\n<p>I will share one possible solution below.\nEach line represents the positions of the pegs after one single move.\nBut first, let me show you a video shared on Twitter where one of you solved this problem with candy:<\/p>\n<blockquote class=\"twitter-tweet\" data-conversation=\"none\" data-theme=\"dark\">\n<p lang=\"en\" dir=\"ltr\">G1 forward, Y1 hop, Y2 forward, G1 hop, G2 hop, G3 forward, Y1 hop, Y2 hop, Y3 hop, G1 forward, G2 hop, G3 hop, Y2 forward, Y3 hop, G3 forward,...<\/p><\/blockquote>","summary":"How can you swap the coloured pegs if they can only march forward?","date_modified":"2025-07-23T16:49:02+02:00","tags":["logic","mathematics"],"image":"\/user\/pages\/02.blog\/03.problems\/p059-marching-pegs\/thumbnail.png"},{"title":"Problem #058 \u2013 identifying light bulbs","date_published":"2022-03-28T23:00:00+02:00","id":"https:\/\/mathspp.com\/blog\/problems\/identifying-light-bulbs","url":"https:\/\/mathspp.com\/blog\/problems\/identifying-light-bulbs","content_html":"<p>Please help me identify these 100 light bulbs by turning ON and OFF their switches.<\/p>\n\n<figure class=\"image-caption\"><img title=\"Photo by Juan Carlos Becerra on Unsplash.\" alt=\"\" src=\"\/user\/pages\/02.blog\/03.problems\/p058-identifying-light-bulbs\/thumbnail.png\"><figcaption class=\"\">Photo by Juan Carlos Becerra on Unsplash.<\/figcaption><\/figure>\n<h2 id=\"problem-statement\">Problem statement<a href=\"#problem-statement\" class=\"toc-anchor after\" data-anchor-icon=\"#\" aria-label=\"Anchor\"><\/a><\/h2>\n<p>I have a very peculiar room in my house.\nIt's a simple room that doesn't have much decoration.\nHowever, I do have 100 light bulbs hanging from the ceiling because I thought it would look cool.\nWhen I installed the 100 light bulbs I wanted maximum freedom,\nso I also installed 100 independent switches:<\/p>\n<ul>\n<li>each switch controls exactly one light bulb; and<\/li>\n<li>each light bulb is controlled by exactly one switch.<\/li>\n<\/ul>\n<p>Of course I was completely silly, so I installed the switches in a room that is far from the room with the light bulbs <strong>and<\/strong> I completely forgot which light switch controls which light bulb.\nHow can I identify which switch controls which light bulb in the <em>least amount of trips<\/em> possible?<\/p>\n<p>For example, I could flip ON a switch and then go verify which light bulb turned ON,\nand I could do this for the 100 light bulbs...\nBut that would take me 100 trips.<\/p>\n<div class=\"notices blue\">\n<p>Give it some thought!<\/p>\n<\/div>\n<p>If you need any clarification whatsoever, feel free to ask in the comment section below.<\/p>\n<p>This problem was adapted from <a href=\"https:\/\/puzzling.stackexchange.com\/q\/20447\/41687\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">here<\/a> and is licensed under <a href=\"https:\/\/creativecommons.org\/licenses\/by-sa\/3.0\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">CC BY-SA 3.0<\/a>.<\/p>\n<h2 id=\"solvers\">Solvers<a href=\"#solvers\" class=\"toc-anchor after\" data-anchor-icon=\"#\" aria-label=\"Anchor\"><\/a><\/h2>\n<p>Congratulations to the ones that solved this problem correctly and, in particular, to the ones\nwho sent me their correct solutions:<\/p>\n<ul>\n<li>David H., Taiwan;<\/li>\n<li>Shubham S., India;<\/li>\n<li>Dan, USA;<\/li>\n<li>Jeena K., India;<\/li>\n<li>Frank X., Shenzhen, China;<\/li>\n<li>Wolfgang, Germany;<\/li>\n<li>Naveen K., India;<\/li>\n<li>Pedro G., Portugal;<\/li>\n<li>Dylan S., USA;<\/li>\n<li>Vladimir L., USA;<\/li>\n<li>Sean L., USA;<\/li>\n<\/ul>\n<p>Know how to solve this?\nJoin the list of solvers by <a href=\"mailto:rodrigo@mathspp.com?subject=Solution%20to%20Problem%20#058%20%E2%80%93%20identifying%20light%20bulbs\" class=\"mailto\">emailing me<\/a> your solution!<\/p>\n<h2 id=\"solution\">Solution<a href=\"#solution\" class=\"toc-anchor after\" data-anchor-icon=\"#\" aria-label=\"Anchor\"><\/a><\/h2>\n<p>We can devise a strategy that identifies <span class=\"mathjax mathjax--inline\">\\(2^n\\)<\/span> light bulbs in <span class=\"mathjax mathjax--inline\">\\(n\\)<\/span> trips making use of binary.<\/p>\n<p>In short, what we do is number each switch in binary.\nSuppose the longest binary number has <span class=\"mathjax mathjax--inline\">\\(k\\)<\/span> digits.\nThen, we do <span class=\"mathjax mathjax--inline\">\\(k\\)<\/span> trips and for each trip <span class=\"mathjax mathjax--inline\">\\(t\\)<\/span> we turn ON the switches whose binary expansions have a <span class=\"mathjax mathjax--inline\">\\(1\\)<\/span> in the corresponding position.\nAfter the <span class=\"mathjax mathjax--inline\">\\(k\\)<\/span> trips, the times at which each light bulb was on will correspond to the binary expansion of its switch.<\/p>\n<p>As an example, suppose we have 4 light bulbs and 4 switches.\nWe number the four switches in binary:<\/p>\n<ol>\n<li><span class=\"mathjax mathjax--inline\">\\(00\\)<\/span><\/li>\n<li><span class=\"mathjax mathjax--inline\">\\(01\\)<\/span><\/li>\n<li><span class=\"mathjax mathjax--inline\">\\(10\\)<\/span><\/li>\n<li><span class=\"mathjax mathjax--inline\">\\(11\\)<\/span><\/li>\n<\/ol>\n<p>This means that for the first trip we only turn ON switches 2 and 4, and for the second trip we only turn ON the switches 3 and 4.\nAs two example associations, the light bulb associated with the switch 4 is the light bulb that was turned ON both times and the light bulb associated with the switch 1 is the light bulb that was turned OFF both times.<\/p>\n<p>For 100 light bulbs, the largest binary number will be <span class=\"mathjax mathjax--inline\">\\(1100011\\)<\/span> (for 99), which means we'll need 7 trips.<\/p>\n<p><a href=\"\/subscribe\">Don't forget to subscribe to the newsletter<\/a> to get bi-weekly\nproblems sent straight to your inbox.<\/p>","summary":"Please help me identify these 100 light bulbs by turning ON and OFF their switches.","date_modified":"2025-07-23T16:49:02+02:00","tags":["binary","logic","mathematics"],"image":"\/user\/pages\/02.blog\/03.problems\/p058-identifying-light-bulbs\/thumbnail.png"},{"title":"Problem #057 \u2013 how to find the circle centre","date_published":"2022-03-13T00:00:00+01:00","id":"https:\/\/mathspp.com\/blog\/problems\/how-to-find-the-circle-centre","url":"https:\/\/mathspp.com\/blog\/problems\/how-to-find-the-circle-centre","content_html":"<p>Can you find the centre of the circle with just five lines?<\/p>\n\n<figure class=\"image-caption\"><img title=\"Photo by Luis Eusebio on Unsplash.\" alt=\"\" src=\"\/user\/pages\/02.blog\/03.problems\/p057-how-to-find-the-circle-centre\/thumbnail.webp\"><figcaption class=\"\">Photo by Luis Eusebio on Unsplash.<\/figcaption><\/figure><h2 id=\"problem-statement\">Problem statement<a href=\"#problem-statement\" class=\"toc-anchor after\" data-anchor-icon=\"#\" aria-label=\"Anchor\"><\/a><\/h2>\n<p>Suppose you have a circle, like the one in the figure below.\nAt your disposal, you have a compass, a straightedge\n(like a ruler, but without length ticks),\nand a pencil.<\/p>\n<figure class=\"image-caption\"><img title=\"A circle.\" alt=\"A black circle on a white background.\" src=\"\/user\/pages\/02.blog\/03.problems\/p057-how-to-find-the-circle-centre\/_circle.webp\"><figcaption class=\"\">A circle.<\/figcaption><\/figure><p>Can you find the centre of the circle with just five lines?\n(Every time you use the compass counts as one line,\nand every time you use the straightedge counts as another line.)<\/p>\n<div class=\"notices blue\">\n<p>Give it some thought!<\/p>\n<\/div>\n<p>If you need any clarification whatsoever, feel free to ask in the comment section below.<\/p>\n<h2 id=\"solvers\">Solvers<a href=\"#solvers\" class=\"toc-anchor after\" data-anchor-icon=\"#\" aria-label=\"Anchor\"><\/a><\/h2>\n<p>Congratulations to the ones that solved this problem correctly and, in particular, to the ones\nwho sent me their correct solutions:<\/p>\n<ul><li>Dmitry R., USA;<\/li>\n<li>Martin J., Czech Republic;<\/li>\n<li>David H., Taiwan;<\/li>\n<li>Mario R., Ecuador;<\/li>\n<li>Paul M., USA;<\/li>\n<li>Luis C., Peru;<\/li>\n<li>Pietro P., Italy;<\/li>\n<\/ul><p>Know how to solve this?\nJoin the list of solvers by <a href=\"mailto:rodrigo@mathspp.com?subject=Solution%20to%20Problem%20#057%20%E2%80%93%20how%20to%20find%20the%20circle%20centre\" class=\"mailto\">emailing me<\/a> your solution!<\/p>\n<h2 id=\"solution\">Solution<a href=\"#solution\" class=\"toc-anchor after\" data-anchor-icon=\"#\" aria-label=\"Anchor\"><\/a><\/h2>\n<p>There are many ways in which the centre of the circle can be found!\nHowever, doing that with just 5 lines is the challenge.<\/p>\n<h3 id=\"deductive-reasoning\">Deductive reasoning<a href=\"#deductive-reasoning\" class=\"toc-anchor after\" data-anchor-icon=\"#\" aria-label=\"Anchor\"><\/a><\/h3>\n<p>Recall that the centre of the circle is the point that is at the same distance of all the points in the circumference.\nSo, if you draw <em>any<\/em> chord and then draw its bisector, you know that bisector will go through the centre of the circle (point A in the figure):<\/p>\n<figure class=\"image-caption\"><img title=\"The bisector of a chord goes through the circle centre.\" alt=\"A circle with an arbitrary chord with endpoints D and E. Auxiliary circles were drawn from D to E and from E to D, and their intersections defined the bisector of the chord. The bisector goes through the centre of the original circle.\" src=\"\/user\/pages\/02.blog\/03.problems\/p057-how-to-find-the-circle-centre\/_chord_bisector.webp\"><figcaption class=\"\">The bisector of a chord goes through the circle centre.<\/figcaption><\/figure><p>In the figure above, I picked two arbitrary points D and E and drew the chord [DE].\nThen, I used D and E two draw to circles:<\/p>\n<ul><li>one centred at D with radius equal to the length of [DE]; and<\/li>\n<li>another centred at E with radius equal to the length of [DE].<\/li>\n<\/ul><p>Then, the line defined by the two intersections of those two circles goes through the centre (A).\nIf we do that once more, the intersections of those two bisectors give you the centre:<\/p>\n<figure class=\"image-caption\"><img title=\"The intersection of the two chords defines the centre.\" alt=\"Same process repeated on a second chord, whose bisector intersected with the first one at the centre of the original circle.\" src=\"\/user\/pages\/02.blog\/03.problems\/p057-how-to-find-the-circle-centre\/_two_chord_bisectors.webp\"><figcaption class=\"\">The intersection of the two chords defines the centre.<\/figcaption><\/figure><p>However, this uses a total of 8 lines.\nWe want to do this in just 5...\nAnd yet, going down to 6 lines is easy:\nwe just need to realise we don't really care about the chords, only their endpoints...\nAnd picking arbitrary points on the circumference doesn't cost any &ldquo;lines&rdquo;:<\/p>\n<figure class=\"image-caption\"><img title=\"4 circles and 2 lines make up a total of 6 lines.\" alt=\"Same drawing, but with the chords erased.\" src=\"\/user\/pages\/02.blog\/03.problems\/p057-how-to-find-the-circle-centre\/_six_moves.webp\"><figcaption class=\"\">4 circles and 2 lines make up a total of 6 lines.<\/figcaption><\/figure><p>The final step comes from realising that we don't need 4 separate circles!\nThe two bisector lines of the implied chords can be drawn with just 3 circles if we pick the points well enough!<\/p>\n<p>After drawing the first two auxiliary circles, pick one of the circles.\nThat circle will intersect the original circle at a point that you haven't used yet (H in the figure below).\nUse that point as the centre of the third circle, which you can draw with a radius equal to the other two auxiliary circles:...<\/p>","summary":"Can you find the centre of the circle with just 5 lines?","date_modified":"2025-07-23T16:49:02+02:00","tags":["geometry","mathematics"],"image":"\/user\/pages\/02.blog\/03.problems\/p057-how-to-find-the-circle-centre\/thumbnail.webp"}]}
