• Home
  • Contact
  • Submit a News Release
Wednesday, November 25, 2026
  • Login
No Result
View All Result
NEWSLETTER
Mainland Times — Breaking Continental European News
  • Climate
  • Business
  • Economy
  • Europe
  • Health
  • Education
  • Society
  • Sport
  • World
  • Climate
  • Business
  • Economy
  • Europe
  • Health
  • Education
  • Society
  • Sport
  • World
No Result
View All Result
Mainland Times — Breaking Continental European News
No Result
View All Result
Home Education

Did you solve it? Hamiltonian ingenuity on the grid

Michael Sanders by Michael Sanders
11/30/2021
in Education
Did you solve it? Hamiltonian ingenuity on the grid
24
VIEWS

Earlier today I set you two puzzles based on Hamiltonian paths in a square grid. A Hamiltonian path is one which visits every cell exactly once. (If you want a print out of the puzzles, click here.)

1. The Hamiltonian path

Place the numbers from 1 to 49 on the grid below such that all consecutive numbers are either horizontal or vertical neighbours. In other words, 1 is horizontally or vertically adjacent to 2, which is horizontally or vertically adjacent to 3, and so on up to 49.

The shaded squares are the prime numbers: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43 and 47

Solution

The numbers 2 and 3 are the only consecutive prime numbers, so they must make up two of the three adjacent shaded cells in the bottom right of the grid. By trying the different permutations it should become clear the only possible way they can be arranged is for the 1 to be in the bottom right square. The keep on going. There are four solutions; they all start and end on the same cell.

Illustration: Nick Berry

If a Hamiltonian path joins up to make a loop, it is called a Hamiltonian circuit.

2. The Hamiltonian circuit

Place the numbers from 1 to 64 on the grid below such that all consecutive numbers are either horizontal or vertical neighbours, and 1 also is either a horizontal or vertical neighbour of 64. As above, the shaded squares are prime numbers, which the ones mentioned in the previous puzzle plus 53, 59, and 61.

Solution

I hope you enjoyed the puzzles. I’ll be back in two weeks.

Thanks to Nick Berry of DataGenetics for the first puzzle and Bernardo Recamán, author of The Bogotá Puzzles, for the second.

I set a puzzle here every two weeks on a Monday. I’m always on the look-out for great puzzles. If you would like to suggest one, email me. I also give school talks about maths and puzzles (restrictions allowing). If your school is interested please get in touch.

Recommended

Wind Farms Boost Incomes, Home Values in Rural U.S., Study Finds

Wind Farms Boost Incomes, Home Values in Rural U.S., Study Finds

4 years ago
PGNiG teams up with Ukrainian company for Lviv gas project

PGNiG teams up with Ukrainian company for Lviv gas project

5 years ago

Popular News

  • Deep Retrofit Program Could Fix Every Canadian Building by 2035, Supply Enough Electricity for 10 Million EV’s

    Deep Retrofit Program Could Fix Every Canadian Building by 2035, Supply Enough Electricity for 10 Million EV’s

    0 shares
    Share 0 Tweet 0
  • Chelsea could get big help in transfer market as Crystal Palace told to ‘break bank’ with £60m offer for Conor Gallagher – will Blues be tempted to cash in?

    0 shares
    Share 0 Tweet 0
  • Nanotransfection Device for Tissue Reprogramming In Situ

    0 shares
    Share 0 Tweet 0
  • Top toddy: Sri Lanka’s tree tapping trade reaches new heights

    0 shares
    Share 0 Tweet 0
  • B.C. Flooding: Scenes of Suffering and Solidarity, As Climate Experts Warned of Bigger Picture

    0 shares
    Share 0 Tweet 0

Newsletter

Subscribe and receive the latest news to your email.

SUBSCRIBE

Category

  • Business
  • Climate
  • Economy
  • Education
  • Europe
  • Health
  • Latest
  • Society
  • Sport
  • World

Site Links

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

About Us

Mainland Times is an independent online outlet that publishes socially relevant news taking place on the European continent. Mainland Times aggregates news from several sources, and also provides coverage through a network of local correspondents.

  • Home
  • Contact
  • Submit a News Release

© 2021 All rights reserved.

No Result
View All Result
  • Home
  • Europe
  • Economy
  • Health
  • Climate
  • Climate
  • Business
  • Sport
  • Education
  • Society
  • World

© 2021 All rights reserved.

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In