Langford Cube

There are two blocks for each color, for a total of 6 blocks ♦ in 3 colors
Scottish mathematician C. Dudley Langford was watching his son play with six colored squares (two for each color). He noticed that his son had lined them up in two white squares with one square between them, two squares between the two red squares, and three squares between the two black squares. Here, I use the image above to indicate my intent:
We found that there was only one square between the two white blocks (which happened to be red). There are two blocks between the red blocks (one black and one white). There are three blocks between the black blocks (two white blocks and one red square). Langford thought about it for a moment and proved that this was the only arrangement of this arrangement, with the exception of the left-right swap.
Expressed numerically: 312132
Or it's an inverse ordinal number: 231213
He wondered if this arrangement (say four) could be done with more colors. Again he found that there was only one arrangement, plus its left-right switching. Can you figure out this arrangement? The easiest way to solve this problem is to replace the squares with playing cards. Use two A's, two 2's, two 3's and two 4's.
Can you line up these cards so that there is exactly one card between two A's, two cards between two 2's, three cards between two 3's, and four cards between two 4's?
There is no such arrangement for five or six pairs of cards, but there are 26 such arrangements for 7 pairs. In general, there is a solution if and only if the logarithm of the card is a multiple of 4 or 1 less than a multiple of 4.
Although there is no formula for calculating how many solutions there are, in 2005 Michael Craigeker, Christopher Xiered, and Alain Pei used computers for three months to find that 46845158056515936 of the 24 pairs of cards had such a permutation.
For answers, please see the following figure:
You can use playing cards or you can use mahjong
Sixteen-word order
The title of this section is very difficult to determine, I wanted to be honest, and directly used the title "From the password combination of the safe to the password of elopement", although it is straightforward, but after all, the topic is too long to meet the style of any book.
However, this is indeed a 16-digit pass-through password that is related to the date. So, on a whim, I took this topic with ready-made words.
It has been said that he had seen the problem in a German book. There is a big chaebol on the rich list who has a safe that stores a lot of cash, securities, diamonds, jewelry and antiques, and the code to open the box is a 16-digit number, consisting of two 1s, two 2s... Up to two 8s, a total of 16 numbers are made up.
The design idea of the password is that it is a 16-digit string of numbers, from left to right, with a number sandwiched between the two 1s, two numbers sandwiched between the two 2s, and so on, until eight numbers are sandwiched between the two 8s. The solution in the book is very vague, except that the prompt set by the computer to give at least 300 answers is also very simple, and the first 8 may only be in positions 1 to 7, otherwise there will not be enough place for the second 8. Such tips that say equals not saying and not solving any problems.
I have read many German books, including the complete works of the great mathematicians Gauss, Riemann, Hilbert and others (of course, these books can only be read in the library, not allowed to borrow), but unfortunately I have never seen this book. But one thing, since there are at least 300 answers, how can it be the password for the safe? There are 365 days or 366 days (years) in a year, and the number does not fall much, but it is very much like a "password" that changes with the date.
Thus remembering the past in an instant, a German folk song called "Moon night" appeared in front of me:
An endless sky, shrouded in the earth;
The moon radiated silver light and urged the earth to fall asleep.
That night the wind drifted through the fields and set off a wave of wheat.
The woods rustle and how bright the stars are.
My heart was so comfortable that it spread its wings.
Fly over the silent fields and fly back to its hometown.
In the eyes of the average person, the Germans are a serious and strong people, unlike the French, Italians, and Spaniards who are romantic and amorous. But in German literature, there are still beautiful, elegant, desolate and lyrical works like "Lake of Dreams".
The heroine of this story is also called Elizabeth, but she is much luckier than the same name in "Lake in dreams", because her intelligent boyfriend, after some hard thinking, finally found the magical May 16 password (counting from Christmas of Jesus, not from January 1 yen, which is another trick, a dark pile), and successfully broke free from the shackles of the medieval city security, as to whether they can really grow old, That's not known (there are similar examples in China, where the painter Xu Beihong and Yixing's grand consort Jiang Biwei eloped successfully and married. It ended up in divorce).
Let's start with the simplest case. For the two 1s and two 2s, the problem is clearly unsolvable. However, whether the second 2 is placed on the left or reverse side of 121, the resulting 2121 or 1212 is not required. It's not a secret. When I was standing on the tram without a seat, I found the six-figure answer to this question within minutes:
312132 (or its inverse 231213),
The eight-digit answer followed: 41312432.
However, the problem is insoluble in many cases and cannot be done blindly. It should be noted, first, that, depending on the nature of the problem, there is no inclusive nested structure.
Secondly, in the left square of the number string, 5 and 4 are not close to 4 and 33 and 2.2 and 1, otherwise a "crash" phenomenon will occur; According to the same situation, in the right plexigens, two consecutive natural numbers cannot be adjacent in increasing order, as shown in Figures 4-2
Figure 4-2
This grid will have the inherent contradiction of "no 3 no 4"
In medieval Germany, where computers were available? The existence or non-existence of the solution is generally done with the "water push boat method", in many cases there will be a situation of water to water, there is not much choice, so that the purpose of expanding nodes or deleting (graph theory or artificial intelligence terms) can be quickly achieved, in order to facilitate the reader's further understanding, let us give some examples to illustrate:
[Example 1] Since 54, 32, etc. cannot be connected together, we will start from 531, so as to push the boat along the water, and will inevitably expand the string of numbers to reach 53121354?? However, the following two boxes cannot be arranged.
[Example 2] The string of numbers starting from 531 can be smoothly expanded to 531413524? To this point, it can be said that everything is satisfactory, but in the end, the remaining 2 cannot be placed, or it can only fail "in vain", which is really a waste of previous achievements.
To save space, let's name the passcode deduced by Miss Elizabeth's boyfriend: it is
2672815164735843.
Finally, although this problem comes from the Middle Ages, there are many researchers so far, and they have not yet declined. Because in the case of a solution, as the number of digits increases, the answer will expand like an unprecedented "magic square". However, there is no way to write the answer directly without a computer, concise, clean, fast and effective, just like differential equations, the solution is obviously there, but there is no way to actually find it. It seems that this is a natural chronic disease of many mathematical problems, and it is innately incurable.
exegesis
The first chapter of this article: The Langford Cube is an excerpt from the Mathematical Kaleidoscope, with illustrations not illustrated in the original book, but produced by yourself.
The second chapter is excerpted from the famous mathematical science writer Tan Xiangbai's work "Mathematics Is Not Yet Love".
These two chapters deal with the same mathematical problems and can be read in contrast.
If you want to write a by two 1s, two 2s ... All the way up to two 7s, the 14 digits of these seven pairs, require a number sandwiched between the two 1s, 2 numbers between the two 2s, and so on, until there are 7 numbers sandwiched between the two 7s. How do you find the answer to this question? There are no solutions and answers in the book, only their own way.
There are many ways to do this, just to put it simply.
You can use a deck of playing cards to explore the answer.
You can use hemp to explore the answer, perhaps more convenient and better than playing cards.
Mahjong is a good prop to explore mathematical problems
It can be programmed on a computer and brute force to find out the whole answer.
Readers who don't know how to program can explore the answer with the office software Excel.
Finally, the approach I used was to explore the answer on a checkered paper. A very important mathematical idea is classification discussion.
Fill in two 7s on the checkered paper, only 6 filling methods meet the requirements, so all the situations are divided into 6 categories, and then the classification discussion can be carried out.
The two 7s are filled in the first and ninth cells respectively, which is the first category.
Considering that there are several ways to fill in the two 1s, the classification discussion is carried out according to the principle that one is not heavy and one is not leaked.
It's like playing a crossword puzzle game, or a Sudoku game or something else, filling in the blanks while reasoning and ruling out the impossible.
Before playing this game, I thought that there were many changes, but after filling in a few boxes, subject to the constraints of the topic requirements, the room for free play was not large.
After trying a few times, I got an answer, please see the following figure:
A1
You can check whether the answer is correct by comparing the above figure.
This is a fun math problem, very suitable for amateur math enthusiasts, you can use the mentality of playing a game, choose the right way to explore the answer.
There are 26 kinds of answers in all, and readers are expected to leave a message in the comment area after finding it. Having your participation is even more exciting.
Answer 1 in the image above also provides a strange arrangement of the dark seven pairs of mahjong cards, and we look forward to finding the remaining 25 arrangements of the dark seven pairs.
Science has not yet been popularized, and the media still needs to work. Thanks for reading, goodbye.