Skip to main content
Home
plus.maths.org

Secondary menu

  • My list
  • About Plus
  • Sponsors
  • Subscribe
  • Contact Us
  • Log in
  • Main navigation

  • Home
  • Articles
  • Collections
  • Podcasts
  • Maths in a minute
  • Puzzles
  • Videos
  • Topics and tags
  • For

    • cat icon
      Curiosity
    • newspaper icon
      Media
    • graduation icon
      Education
    • briefcase icon
      Policy

      Popular topics and tags

      Shapes

      • Geometry
      • Vectors and matrices
      • Topology
      • Networks and graph theory
      • Fractals

      Numbers

      • Number theory
      • Arithmetic
      • Prime numbers
      • Fermat's last theorem
      • Cryptography

      Computing and information

      • Quantum computing
      • Complexity
      • Information theory
      • Artificial intelligence and machine learning
      • Algorithm

      Data and probability

      • Statistics
      • Probability and uncertainty
      • Randomness

      Abstract structures

      • Symmetry
      • Algebra and group theory
      • Vectors and matrices

      Physics

      • Fluid dynamics
      • Quantum physics
      • General relativity, gravity and black holes
      • Entropy and thermodynamics
      • String theory and quantum gravity

      Arts, humanities and sport

      • History and philosophy of mathematics
      • Art and Music
      • Language
      • Sport

      Logic, proof and strategy

      • Logic
      • Proof
      • Game theory

      Calculus and analysis

      • Differential equations
      • Calculus

      Towards applications

      • Mathematical modelling
      • Dynamical systems and Chaos

      Applications

      • Medicine and health
      • Epidemiology
      • Biology
      • Economics and finance
      • Engineering and architecture
      • Weather forecasting
      • Climate change

      Understanding of mathematics

      • Public understanding of mathematics
      • Education

      Get your maths quickly

      • Maths in a minute

      Main menu

    • Home
    • Articles
    • Collections
    • Podcasts
    • Maths in a minute
    • Puzzles
    • Videos
    • Topics and tags
    • Audiences

      • cat icon
        Curiosity
      • newspaper icon
        Media
      • graduation icon
        Education
      • briefcase icon
        Policy

      Secondary menu

    • My list
    • About Plus
    • Sponsors
    • Subscribe
    • Contact Us
    • Log in
    • Counter logic: Solution

      16 November, 2015
      Counters

      Imagine that I have three counters X, Y and Z. They are coloured red, white and blue, but not necessarily in this order. One, but only one, of the following statements is true:

      X is red

      Y is not red

      Z is not blue

      Can you work out the colours of the counters?

      This puzzle was suggested to us by Ems Lord, as part of her wonderful article celebrating the bicentenary of the birth of George Boole.

      Solution

      We know that only one of the three statements is true. If we assume that each statement is true in turn we can see if that leads to a contradiction. Let's try the first statement. If "X is red" is true then "Y is not red" is false, forcing Y is be red — a contradiction since only one counter can be red. Now the second statement. If "Y is not red" is true then "Z is not blue" and "X is red" are both false. That forces Z to be blue and since X cannot be red, none of the counters is red — that's also a contradiction, since one of them must be red. Finally, consider the third statement to be true. If "Z is not blue" is true then "Y is not red" is false, making Y a red counter. The statement "X is red" is also false, leading to X being blue and Z being white as the solution.

      We can also solve this puzzle using the binary algebra system developed by George Boole. A true statement comes with a truth value of 1 and a false statement with a truth value of 0. The AND operation is represented by multiplication and the OR operation by addition (see this article to find out more).

      Let's write Xr for the statement that counter X is red, Yr for the statement that counter Y is red, and so on. Here are some things we can deduce from the set-up. 1) Since one of the counters is definitely red, the statement "X is red OR Y is red OR Z is red" is true, so Xr+Yr+Zr=1. (The same is true for each of the other two colours.) 2) Since only one counter can be red, the statement "X is red AND Y is red" must be false, so XrYr=0. (The same is true for any pair of counters and for any colour.) 3) Since a counter can only have one colour, the statement "Z is blue AND Z is red" is false, so ZbZr=0. (The same is true for any pair of colours and any counter.) Now suppose that the first statement is true, so Xr=1. This means that the second statement is false, so NOT(Yr)=0, which means that Yr=1. This implies that XrYr=1, contradicting fact 2) above. Hence the first statement is false. Suppose the second statement is true, so NOT(Yr)=1, implying that Yr=0. This means the other two statements are false, so Xr=0andNOT(Zb)=0, so Zb=1. By fact 3) above this means that Zr=0. It follows that Xr+Yr+Zr=0+0+0=0, contradicting fact 1 above. Therefore, the second statement is false. It follows that the true statement must be the last one, so NOT(Zb)=1which means thatZb=0. The first and second statements are false, so Xr=0andYr=1. From fact 3) above it follows that Yb=0. From fact 1) we have Xb+Yb+Zb=Xb+0+0=1. Therefore Xb=1, which means that Zw=1. Therefore, counter X is blue, counter Y is red and counter Z is white.
      • Log in or register to post comments

      Anonymous

      23 November 2015

      Permalink
      Comment

      Even if his symbolism led to the logic gates of the modern computer, I still need someone to explain the precise advantages of the Boolean approach to this kind of puzzle over the succinct classical type of reasoning presented in the first paragraph in the above solution.

      For one thing the original article on this website appears to promise us something better, and presumably quicker, than "trial and improvement". Yet both methods presented entail two steps: trying the first then the second statements to see what would follow from supposing them to be true, and finding them to result in contradictions. All that Boole seems to provide here is an extra layer of symbolism to decipher. How does it help specially, for example, to know that Xr + Yr + Zr = 1? And that it is contradicted by Xr + Yr + Zr = 0?

      I could be missing the point of course, perhaps in hoping for some kind of algorithm or set of arithmetical rules that can be applied unthinkingly rather like steps in long division.

      Chris G

      • Log in or register to post comments
      University of Cambridge logo

      Plus Magazine is part of the family of activities in the Millennium Mathematics Project.
      Copyright © 1997 - 2025. University of Cambridge. All rights reserved.

      Terms