Subscribe now

BrainTwister #79: Hamming it up

Can you solve this week’s logic puzzle? Plus our quick quiz and the answer to last week’s problem

By Christopher Dearlove

25 June 2025

New Scientist. Science news and long reads from expert journalists, covering developments in science, technology, health and the environment on the website and the magazine.

Shutterstock/ktsdesign

#79 Hamming it up

Set by Christopher Dearlove

Consider five-digit binary numbers: strings of five bits that are either 1 or 0. The “Hamming distance” between two numbers is given by how many of their corresponding bits are different. So the distance between 01011 and 11001 is 2, because the first and fourth bits differ.

What is the distance between 01011 and 01100?

What is the smallest number (considered as a binary number) that starts 01 and has a distance of 3 from 00000?

What is the smallest number starting 10 that has a distance of 3 or more from 00000 and from the previous answer? And what about the smallest number starting 11 that has a distance of 3 or more from 00000 and from each of the two previous answers?

How can you add a sixth bit (either a 1 or a 0) after 00000 and after the three previous answers so that the distance between any two of these four numbers is 4?

Solution next week

#78 One on top

Solution

If the expression is grouped, 1 = (1/6 + 1/6 + 1/6) + (1/6 + 1/6) + 1/6, then this becomes 1 = 1/2 + 1/3 + 1/6.

We can group the 12 twelfths into groups of 6, 3, 2 and 1, giving 1 = 1/2 + 1/4 + 1/6 + 1/12.

There are five other sets of four different unit fractions totalling 1: 1/2 + 1/3 + 1/9 + 1/18, starting from 18 eighteenths; 1/2 + 1/4 + 1/5 + 1/20, from twentieths; 1/2 + 1/3 + 1/8 + 1/24 from twenty-fourths; 1/2 + 1/3 + 1/10 + 1/15 from thirtieths; and 1/2 + 1/3 + 1/7 + 1/42 from forty-twoths.

Quick quiz #308

set by Corryn Wetzel

1 Which planet in our solar system has the shortest day?

2 Flamingos get their pink colour from which natural pigments?

3 What gland produces the hormone melatonin?

4 Which English mathematician is considered to be the first person to write a computer algorithm?

5 Over how many kilometres does the Large Hadron Collider’s ring of superconducting magnets stretch?


Quick quiz #244

Answers

1 Jupiter

2 Carotenoids

3 Pineal gland

4 Ada Lovelace

5 27 kilometres

Sign up to our weekly newsletter

Receive a weekly dose of discovery in your inbox! We'll also keep you up to date with New Scientist events and special offers.

Sign up
Piano Exit Overlay Banner Mobile Piano Exit Overlay Banner Desktop