Drücke „Enter”, um zum Inhalt zu springen.
Hinweis zu diesem Datenschutz-Blog:
Anscheinend verwenden Sie einen Werbeblocker wie uBlock Origin oder Ghostery, oder einen Browser, der bestimmte Dienste blockiert.
Leider wird dadurch auch der Dienst von VG Wort blockiert. Online-Autoren haben einen gesetzlichen Anspruch auf eine Vergütung, wenn ihre Beiträge oft genug aufgerufen wurden. Um dies zu messen, muss vom Autor ein Dienst der VG Wort eingebunden werden. Ohne diesen Dienst geht der gesetzliche Anspruch für den Autor verloren.

Ich wäre Ihnen sehr verbunden, wenn Sie sich bei der VG Wort darüber beschweren, dass deren Dienst anscheinend so ausgeprägt ist, dass er von manchen als blockierungswürdig eingestuft wird. Dies führt ggf. dazu, dass ich Beiträge kostenpflichtig gestalten muss.

Durch Klick auf folgenden Button wird eine Mailvorlage geladen, die Sie inhaltlich gerne anpassen und an die VG Wort abschicken können.

Nachricht an VG WortMailtext anzeigen

Betreff: Datenschutzprobleme mit dem VG Wort Dienst(METIS)
Guten Tag,

als Besucher des Datenschutz-Blogs Dr. DSGVO ist mir aufgefallen, dass der VG Wort Dienst durch datenschutzfreundliche Browser (Brave, Mullvad...) sowie Werbeblocker (uBlock, Ghostery...) blockiert wird.
Damit gehen dem Autor der Online-Texte Einnahmen verloren, die ihm aber gesetzlich zustehen.

Bitte beheben Sie dieses Problem!

Diese Nachricht wurde von mir persönlich abgeschickt und lediglich aus einer Vorlage generiert.
Wenn der Klick auf den Button keine Mail öffnet, schreiben Sie bitte eine Mail an info@vgwort.de und weisen darauf hin, dass der VG Wort Dienst von datenschutzfreundlichen Browser blockiert wird und dass Online Autoren daher die gesetzlich garantierten Einnahmen verloren gehen.
Vielen Dank,

Ihr Klaus Meffert - Dr. DSGVO Datenschutz-Blog.

PS: Wenn Sie meine Beiträge oder meinen Online Website-Check gut finden, freue ich mich auch über Ihre Spende.
Ausprobieren Online Webseiten-Check sofort das Ergebnis sehen

Magic Hexagons: New solution for magic hexagon of order 9 found with AI

0
Dr. DSGVO Newsletter detected: Extended functionality available
More articles · Website-Checks · Live Offline-AI
📄 Article as PDF (only for newsletter subscribers)
🔒 Premium-Funktion
Der aktuelle Beitrag kann in PDF-Form angesehen und heruntergeladen werden

📊 Download freischalten
Der Download ist nur für Abonnenten des Dr. DSGVO-Newsletters möglich

Using an AI system, the author has succeeded in solving a math problem that has remained unsolved for 18 years. He succeeded in solving the so-called magic hexagons with standard hardware in a previously unknown way. The AI used for this helped to develop the solution program. The rest was a small amount of intelligence.

Introduction

Magic hexagons are hexagons with specific properties and have an ordinal number called N. This ordinal number tells you how many honeycombs (cells) each outer edge of the hexagon consists of. Here is an example:

Magic hexagon of order n = 3. Source: Klaus Meffert.

This magic hexagon of order N = 3 has 3 honeycombs in each outer edge. The number of honeycombs is 19 and follows the formula 3N²-3N+1. In total, this hexagon consists of 15 rows. These 15 rows are

  • 5 horizontal rows
  • 2 main diagonals
  • 4 secondary diagonals outside
  • 4 secondary diagonals inside
  • = 15 rows

A magic hexagon (of order 3) is only magical if all 15 rows have the same sum and all numbers in the honeycombs are whole numbers and each of these numbers was taken from a consecutive row and each number was used exactly once. The number of rows is also the number of (interdependent) equations that must be solved simultaneously.

Figuratively speaking, the 15 rows in the smallest meaningful magic hexagon look like this (let's leave out order 1, the corresponding hexagon consists of exactly one honeycomb):

All rows of a Magical Hexagon of order 3. Source: Klaus Meffert.

You can see 5 diagonal rows with red markings, 5 diagonal rows with green markings and 5 horizontal rows with blue markings. That makes 15 rows. Each of the 15 rows must therefore have the same sum over all the combs in the respective row. Positive numbers are often used for smaller orders because they are easier to understand. In the example above and also in the following examples and newly produced results, however, numbers from -X to X were used. For N = 3, the X corresponds to the value range from -9 to 9. This range can be determined by: (number of combs – 1) / 2, i.e. (19 – 1)/2 = 9.

Many people are fascinated by these magical hexagons. In 2022, for example, a genetic algorithm was developed to solve mini-hexagons of order N = 3. This mini-hexagon has 19 fields. We will solve a hexagon that has the order N = 9 and 217 fields!

Solution

The larger a hexagon becomes, the more difficult it is to find its magic solution. According to the author's research, the largest known magic hexagon is one with an edge length of N = 8 (see also Wikipedia). If anyone has found or seen larger hexagons, please let the author know.

For magic hexagons with an edge length of 3 to 6, the solution is found quite quickly by brute force. From N = 7 it gets exciting.

Wikipedia lists exactly one solution for N = 7. The solution uses the 127 numbers from 2 to 128 and has the magic sum of 365. The solution was discovered in 2006, that's 18 years ago.

Here is a new solution for a magic hexagon of order 7, found by the author:

Wikipedia also lists exactly one solution for order 8. This was also discovered in 2006 (!) by Louis Hoelbling. The author also found his own solutions for N = 8 using a program he developed himself, which was created using AI, among other things. This solution is different from the one on Wikipedia and reads:

The solution by Louis Hoelbling listed on Wikipedia is different. Different means that not only the number assignment is different, but also that there is no symmetry. Solutions would be symmetrical, for example, if they could be transformed into one another by rotating, mirroring or reversing the signs.

The color intensity in the hexagons shown indicates the number of honeycombs that are each influenced by one honeycomb. Obviously, the central field in the hexagon influences the other fields the most. This is why it is shown darkest. The outer fields have the least influence on other fields.

New solution for magic hexagon of order 9

According to the author's research, there was no solution for magic hexagons for N = 9. The author found this solution on September 10, 2024. The solution is:

The solution conditions consist of 51 equations and 217 variables. A variable here is the number on a honeycomb in the hexagon. Each variable is part of 3 of the 217 equations (because each variable corresponds to a honeycomb and each honeycomb is exactly part of 3 rows in the hexagon). Sounds complex, and it is. You can't really get anywhere here by simply trying things out.

In the illustration of the magic hexagon of order 9, the color intensity of each honeycomb also shows how many other honeycombs are influenced. Influence means that a change in the numerical value on the honeycomb has an effect on the other honeycombs that are influenced by the numerical change. Specifically, the influence for magic hexagons of order 9 always looks like this:

The center field therefore influences 48 other honeycombs. The corner combs, on the other hand, only influence 32 other combs. Each honeycomb is part of exactly three rows. The center field lies in three rows of equal length, each of which is 17 combs long. The 17 results from 2N-1 (2*9-1). Because the center field itself is not counted when influencing other honeycombs, the result is 3 diagonals * (17-1) = 3 * 16 = 48. This number is the number of honeycombs influenced by the center field, which can also be seen in the illustration.

How did AI help with the solution?

Earlier attempts by the author a few years ago were based on back tracking and brute force with the exclusion of combinations that could be recognized as invalid from the outset. No solutions could be found for N = 7 and N = 8, although the program was quite sophisticated. In the meantime, this approach might be promising for N = 7 because the hardware has improved. Java was used as the language because it is a compiled language that runs much faster than interpreted languages.

The current, successful tests are based on a framework program that was created with AI. This program ran well for smaller N, but not for the target area. A few manual optimizations brought the final success. The language used was Python, the number one AI language.

Because Python is not super-fast, an optimization was carried out. This optimization is based on a Just-In-Time compiler (JIT). Programming with it is no fun, to put it politely. You feel like you've been transported 20 years back in time in terms of convenience and available functions. To alleviate the problem, AI was used again. That was the solution.

Some of the results produced were near-solutions. The magic constant M was not hit exactly, but almost. Two math AI models were used to check, at least superficially, whether a little heuristics could help. The idea was to turn the near-solution into a real solution by cleverly transforming it. The math models questioned were unable to provide a solution for this. However, this helped to recognize this probable error as such and to invest the resources in a better solution approach.

Additional information

Today's standard hardware was used. A total of two AI servers, an AI laptop and a low-cost server were used in parallel. The servers are all hosted in Germany by a German company. The servers only worked on the problem outside of business hours so as not to interfere with day-to-day business. The solution was found after a few days and a few rounds of optimization.

The next expansion stage of the program found to solve magic hexagons would be complete parallelization (CUDA). This is exactly what AI graphics cards are for. This would probably speed up the calculation by a factor of 40. This is not unimportant for calculations that can sometimes take weeks or months. This parallelization of the search for results is complicated both mathematically and in terms of programming, and must therefore be postponed until later.

About the author

Author of this blog post and of the magic hexagons displayed is: Klaus Meffert, Idstein, Germany.

Klaus Meffert (1974) holds a doctorate in computer science and is particularly interested in optimized AI systems that run on their own servers.

Usage of the images

All images of magic hexagons from this article may be used until they are not modified (scaling and compression is allowed of course).

Modified versions of the illustrations may be used, provided a link to dr-dsgvo.de/magic is included.

The following images may be used for non-profit projects such as Wikipedia, provided the author is credited. For other projects, the images shown above are available with the above image license.

Magic hexagon of order 9 (shades of gray indicate influence of each honeycomb). Found by: Klaus Meffert, Idstein, Germany.
Magical hexagon of order 9. found by: Klaus Meffert, Idstein, Germany.
Magic hexagon of order 9 (color values indicate influence of each honeycomb). Found by: Klaus Meffert, Idstein, Germany.

If in doubt about the use of images, please ask: klaus.meffert@dr-dsgvo.de

The author would be also happy to get informed in case you mention the magic hexagon of order 9.

Key messages

An AI system helped solve a 18-year-old math problem by finding a new solution for a magic hexagon of order 7.

The author used AI to discover a new solution for a magic hexagon of order 9, which was previously thought to be unsolvable.

The author used AI to find a near-solution to a complex mathematical problem involving magic hexagons. While AI couldn't find the perfect solution, it helped identify the problem and guide the author towards a better approach.

About

About the author on dr-dsgvo.de
My name is Klaus Meffert. I have a doctorate in computer science and have been working professionally and practically with information technology for over 30 years. I also work as an expert in IT & data protection. I achieve my results by looking at technology and law. This seems absolutely essential to me when it comes to digital data protection. My company, IT Logic GmbH, also offers consulting and development of optimized and secure AI solutions.

Write a comment

Ihre Mail-Adresse wird nicht veröffentlicht.

EU AI Regulation: Big Bang or False Start?