NOVEL Genius of the Rules-Style System Chapter 77 - 73: The Key to Algorithm Design

Genius of the Rules-Style System

Chapter 77 - 73: The Key to Algorithm Design
  • Prev Chapter
  • Background
    Font family
    Font size
    Line hieght
    Full frame
    No line breaks
    Text to Speech
  • Next Chapter

Chapter 77: Chapter 73: The Key to Algorithm Design

To design an algorithm that can solve a third-order magic cube, two points need to be clarified first.

One is the inputting data.

The data input includes the colors of the nine squares on the six faces of the magic cube. The characteristics of the data are that there are six colors, each with nine components, and, in addition, the color in the center of each face is constant.

The second is the outputting data, that is, the computational objective, which is to determine the minimum number of steps required to restore the magic cube.

As long as this condition is met, other desired data, such as the process to achieve the minimum number of steps, would merely be recorded during the program’s operational process.

Once the input and output data are clear, the overall framework is essentially established. freewebnovёl.ƈom

This would be similar to the algorithm package Zhang Zhen sent, just several dozens or hundreds of times more difficult, or even more.

Next, the design begins.

Modeling.

Modeling turns real-life problems into mathematical ones, expressing the relationships between the small squares on the magic cube, as well as potential methods of transformation, using mathematical equations and code.

There are two methods for this process.

One is to take the spatial position as the basis, which means the color will change as the position remains fixed; the other is to take the fixed color squares as the basis for spatial transformation.

Once the modeling method is chosen, the actual design process begins.

As soon as Zhao Yi starts thinking, he encounters a huge problem: How can he be sure a specific twist is a step towards restoring the cube, rather than making it even more chaotic?

This is a super difficult problem.

Solving it would essentially mean completing the algorithm.

So, this path won’t work.

Time to think again.

Then consider from another angle: find the face with the most squares of the same color and use this as a base to restore the cube, just like most people’s choice, first restore one face of the third-order magic cube, the others will become much easier.

However, science is rigorous.

How can it be proven that starting from the face with the most squares of the same color will lead to the fastest restoration?

How can it be proven that restoring one face first is the fastest method?

As soon as Zhao Yi started designing the program, he encountered a slew of problems. He took a deep breath, ending his logical thinking here.

Next is the time for causal thinking.

Zhao Yi understands the difficulty of algorithm design. He opens the system interface and simply uses a Research Coin. frёeωebɳovel.com

[Research Coin: 15.]

[Research Coin used to enhance causal thinking.]

[Research Coin -1, auxiliary enhancing of causal thinking ability, obtaining inspirational stimulative effect. Duration: sixty minutes.]

In an instant.

His thought pattern changes.

Zhao Yi stares at the computer screen, his thinking starts to jump. He doesn’t dwell on the problems he’s come across, but skips to the data analysis input to the magic cube.

For example, taking the center color of each face as a reference, the minimum number of steps required to move the other squares of the same color to the corresponding center face.

For instance, how many squares are adjacent to other squares of the same color, and their specific locations, all have to be properly recorded.

And so on.

After using the Research Coin to enhance his causal thinking mode, the use of "Causality Law" and "Connection Law" became more of a subconscious act. He continues to think non-stop, his fingers tapping away, turning his thoughts into code on the keyboard.

Writing out the code.

Then writing more.

An hour has passed.

Zhao Yi rubs his forehead vigorously, his brain feeling extremely tired. He glances at his energy value: [Energy: 61/104.]

No wonder!

Looking at the code on the screen, he grits his teeth and uses four Study Coins.

[Using Study Coins to enhance energy!]

[Energy +40.]

Although earning Study Coins is not difficult, he cashes in over twenty each day, but he’s still not accustomed to using them for energy replenishment.

Energy can be replenished by sleep!

Using Study Coins to replenish energy is like buying experience in a game with real money, it feels overly extravagant.

Continuing on!

[Research Coin: 14.]

[Using Research Coin to enhance causal thinking.]

[Research Coin -1, auxiliary enhancing of causal thinking ability, obtaining inspirational stimulative effect. Duration: sixty minutes.]

After working for half an hour more, Zhao Yi has written twenty-one data analyses for the input magic cube. As his fingers stopped moving, he instinctively used the "Causality Law" to test whether the data would be effective in restoring the cube.

Using this method, he eliminated three irrelevant analysis data, leaving eighteen remaining analyses which are all helpful in restoring the magic cube.

Next, he continued to make judgments.

Whether a twist is helpful in restoring the magic cube could be determined using "Law of Cause and Effect".

Find a few or a dozen twist actions that would help restore the cube, and compare them with the analyzed data.

These are the conditions.

Once all the conditions were perfected, the "Connection Law" could be used to demonstrate how the conclusion was derived.

This was a causality thinking approach.

First, find the outcome, perfect the conditions, and the last step is to seek the process. Once the process is obtained, it could be expressed through code.

Zhao Yi still ran into trouble.

Time, energy.

He had found the key to algorithm design, but after a rough estimation, he deduced that he would have to write a minimum of a few thousand lines of code, which would take at least ten hours given his working efficiency.

"Forget it, sleep first!"

"Continue tomorrow!"

...

The next morning, Zhao Yi got up early, turned on his computer and checked the post he had made on the forum.

The post was incredibly trending!

There were more than four thousand replies alone.

Because it involved trending gossip, many media outlets on the internet had reposted the content of the post.

The search engine’s trending list had added a related search term ’Genius hacker lists data in reply to Jia Hongning’, it had rapidly risen to become the third trending search.

This had something to do with the content of the post.

Most of those involved in controversial gossip incidents would accept interviews, expressing their own opinions and views, or at most, they would respond on forum posts by revealing some news or trying to gain sympathy.

The post made by Zhao Yi was novel, his method of directly listing data, elevated the tone of gossip considerably.

Also, controversy was another reason why the post was so trending.

The data listed on the post had sparked massive controversy. A well-known mathematics doctor stated, ’To crack the optimal steps of a three-order magic cube, the computational load is unimaginably large. It is definitely impossible for a regular home computer to calculate.’

He even mentioned, "There is currently no concrete and effective optimization algorithm"

At the same time,

There were many on the internet who supported Zhao Yi, believing he wouldn’t have made up the data. Other professionals expressed that while rough calculations can’t provide specific data, they can judge that Jia Hongning’s cube restoration is simpler than Zhou Junkai, especially in the final round, the difference was very noticeable.

Zhao Yi felt that it was time for him to step in.

Although there were some voices supporting him, if the situation continued, it might become unfavorable. It seemed that he needed to do something to guide public opinion.

It was time for school.

He decided to bring his Netbook to school and make the forum post there.

The atmosphere in the school was similar.

Because the incident involved students from the school, there was a large amount of discussion within the school. Almost everyone knew about the post, and many people wished to ask Zhao Yi how the result was calculated.

"Hold on, I am writing it up."

Zhao Yi went to tell Teacher Sun his plan to write a forum post during self-study class. Unexpectedly, the principal Wang Chengmin came over.

"Zhao Yi!"

Wang Chengmin asked with concern, "It’s all over the internet about your post’s data..."

A crowd of people perked up their ears.

Zhao Yi glanced irritably at He Ronghua, "Lend me the magic cube."

"Sure."

He Ronghua immediately handed over the magic cube.

Zhao Yi looked at the cube in his hand, his fingers moved swiftly, and he completed the restoration in about ten seconds.

A lot of people were stunned.

Zhao Yi turned his head and told the crowd around him, "Help me count, each ninety-degree turn counts as one, a one hundred and eighty-degree turn counts as two."

"Okay!"

The group of people watched carefully.

Zhao Yi deliberately slowed down his speed to allow others to count. After about a minute, he had made seventeen turns, then he held up the cube and said, "This is Jia Hongning’s cube before the first restoration in the competition, it took me seventeen steps to scramble it, and it could also be restored in seventeen steps."

"Sssss~~~"

Not only the students but even Wang Chengmin took a sharp breath at this operation.

He immediately pulled Zhao Yi towards the principal’s office, "Come! Let’s record a video of this and post it online, let’s see who would still doubt."

Zhao Yi followed with a smile.

He had originally planned to make a post explaining the method of twisting the cube, but it was too troublesome to describe in words, recording a video was much simpler.

Use arrow keys (or A / D) to PREV/NEXT chapter