Top student: All my teachers are academic whizzes!.

Chapter 64: The Problem of the Werewolf and the Sheep Crossing the River

For Han Chuan, the mathematical knowledge required for modeling competitions, such as differential equations, graph theory, statistical analysis, and optimization, was not a problem.

Although he has focused his studies on mathematical analysis and analytic number theory over the past few months, he has still learned some of these basic mathematical concepts.

Although it is far inferior to the two major fields of mathematical analysis and analytic number theory, it is more than enough to handle modeling competitions.

The only thing he needs to focus on learning is some computer-related software.

Although as a modeler he doesn't need to be a top-notch programmer, he still needs to be familiar with the relevant tools.

If you don't understand anything, that's just nonsense.

After the first training session, Han Chuan took his computer to the library.

I found a window seat in the math section and opened the software list that Xu Zhiyuan had sent me.

The list includes five tools: MATLAB, LINGO, SPSS, Python, and LaTeX.

The first three are commercial software commonly used in competitions, while the last two are open-source tools.

Xu Zhiyuan, the leader of the three-person team, did his best. The list even included the level of proficiency required for each software.

Proficiency in MATLAB is required; familiarity with LINGO and SPSS is required; the ability to understand and modify existing scripts is required in Python; and the ability to use templates to write papers in LaTeX is sufficient.

The library's internet speed is slow; these few programs combined are over ten gigabytes in size, and the progress bar is crawling along like a snail on the ground.

While waiting for the software to download, Han Chuan didn't sit idle. He took out the book "Mathematical Modeling Algorithms and Applications" from his bag and continued to study the parts he hadn't finished reading before.

The book wasn't too difficult for him. Linear/nonlinear programming, variable assignment, matrix operations, differential equation modeling... these things were basically no challenge for him to read now.

Things like matrix operations are already thoroughly learned in advanced algebra, and MATLAB's syntax is simply a translation of mathematical language into another form.

......

On Wednesday morning at nine o'clock, Han Chuan arrived at the mathematical modeling laboratory on time.

Many people had already arrived in the classroom. Xu Zhiyuan, who was sitting in the middle, waved to Han Chuan, indicating that they were there.

After waiting for a short while, Professor Geng Minyu, who was in charge of the class, walked in with a thermos.

After glancing around at the students in the classroom, Geng Minyu smiled amiably and said, "Is everyone here? I'm too lazy to take attendance."

He paused for a moment, put down his thermos, turned on the computer in the lab, and projected the teaching materials onto the screen.

"Today we'll have our first modeling lesson. Let's first understand what modeling actually is."

As he spoke, Geng Minyu moved the mouse, and an image popped up on the screen.

The picture shows a farmer, a wolf, a sheep, and a basket of cabbages gathered by a small river, with a small boat on the riverbank.

Looking at the picture, Professor Geng glanced at the students in the classroom and said with a smile.

"Everyone has probably played or seen this kind of puzzle game before, where the farmer has to lead a wolf, a sheep, and vegetables across a river. There is only one small boat on the river, and the boat can only carry the farmer and one item at a time (the farmer must row the boat)."

"If the farmer isn't around, the wolf will eat the sheep, and the sheep will eat the vegetables. Question: How can the farmer safely transport all three items to the other side?"

(I found a classic children's picture on Baidu, it's hilarious!)

A soft laugh rang out in the classroom.

This question is indeed a classic one for these college students; so classic that most of them had seen it when they were children.

Geng Minyu chuckled and then said, "This puzzle game can be solved by elementary school students using trial and error, and even an old lady can solve it based on her life experience."

"But we're not here to play games today. This example will give you a direct understanding of what mathematical modeling is actually building."

"So, who can answer first, how exactly should the farmer cross the river?"

After he finished speaking, his gaze fell on Han Chuan, who was in the middle of the classroom.

At the same time, the other students in the classroom who were also participating in the modeling competition turned their attention to him, because apart from him, almost everyone else had participated in at least one modeling competition.

Han Chuan didn't hesitate and stood up to speak directly.

"Step 1: The farmer takes the sheep to the right bank first. The wolf and vegetables remain on the left bank (safe). The farmer and sheep remain on the right bank (safe)."

"Step 2: The farmer returns to the left bank empty-handed. The farmer, wolf, and vegetables are on the left bank (safe). The sheep are on the right bank (safe)."

"Step 3: The farmer leads the wolf to the right bank; the left bank has leftovers (safe); the right bank has the farmer, wolf, and sheep (the farmer is present, so it's safe)."

"Fourth step, the farmer leads the sheep back to the left bank. The farmer, sheep, and vegetables are safe on the left bank, while the wolf is safe on the right bank."

"Step 5: The farmer takes the vegetables to the right bank, leaving only sheep on the left bank (safe), while the farmer, wolf, and vegetables remain on the right bank (safe)."

"Sixth step, the farmer returns to the left bank empty-handed. Left bank farmer + sheep (safe), right bank wolf + vegetables (safe)."

"Part Seven: The farmer leads the sheep to the right bank. The man, the wolf, the sheep, and the vegetables all arrive. The mission is complete."

For him, the difficulty of this problem was no different from that of a primary school student's homework.

In the classroom, the other students weren't surprised that Han Chuan could solve the problem so quickly.

After all, this thing is really too simple.

If a student who can publish in top journals like SIMA gets stumped by this, then it's actually something to be surprised about.

On the podium, Professor Geng Minyu nodded and said with a smile, "Correct answer."

He paused for a moment, then continued to ask Han Chuan, "So, what are the 'states' and 'constraints' in this river-crossing problem?"

Han Chuan: "The status is who is on which side of the river, and the constraints are that wolves and sheep cannot be alone together, sheep and vegetables cannot be alone together, and the boat can only carry one farmer and one item at a time."

"right!"

Professor Geng smiled and continued, "Now that we've identified the states and constraints, the next step is to translate them into mathematical language."

As he spoke, he picked up the chalk and drew a simple state transition diagram on the blackboard.

The different states and positions of the wolf, sheep, and vegetables on the riverbank are represented by boxes, while arrows indicate each action of crossing the river.

"In mathematics, states can be represented by vectors, and constraints can be represented by logical conditions."

"Then you'll find that the problem is essentially about finding a safe path from the initial state to the target state within a finite state space."

"This path is the solution, and this is modeling."

"It can translate a real-life problem into a mathematical structure."

"The translation process is more important than the final solution. Because if you translate it correctly, there are readily available tools to calculate the solution directly."

"What I'm going to talk about today is how to do 'translation' well."

"Alright, let's start with the most basic model type—linear programming..."

......

PS: Second update! Please vote with monthly tickets, recommendations, and comments!

Tap the screen to use advanced tools Tip: You can use left and right keyboard keys to browse between chapters.

You'll Also Like