Top student: All my teachers are academic whizzes!.
Chapter 66: How did you know?!
"The second method is simpler than the first."
Han Chuan smiled, took the manuscript back from Xu Zhiyuan's hand, turned it over, and then drew a coordinate system in the blank space.
The horizontal axis represents x₁, and the vertical axis represents x₂.
After drawing the coordinate system, he immediately drew a diagonal line inside it and explained.
"The proportional constraint is x₂ = 1.5x₁, starting from the origin with a slope of 1.5. The optimal solution must be on or below this line, because the constraint is not satisfied above it."
"Plot the three material constraints and one proportional constraint into the coordinate system, and the feasible region is the area enclosed by the four straight lines."
"Then the integer optimal solution must lie on the boundary of the feasible region, and it is highly likely to fall at the intersection of two constraint lines."
"Because the optimal solution should satisfy the constraints as much as possible, if resources are wasted, it will definitely not be optimal."
"so...."
As he spoke, he drew three straight lines on the coordinate system, representing the constraint boundaries of raw material 1, raw material 2, and raw material 3, respectively.
From the image, it is clear that these three straight lines intersect to form an irregular quadrilateral region in the coordinate system.
「原料2的约束3x₁+2x₂=600最陡,原料1的约束2x₁+4x₂=800最平。这两条直线的交点在x₁=100,x₂=150。」
Han Chuan pointed to the intersection with the tip of his pen and continued, "And this point happens to fall on the proportional constraint line. 150 is exactly 1.5 times 100. Moreover, it is below the constraint line of raw material 3, which means 5×100+150=650, which is less than 750, so there is a surplus."
"Of the four constraints, two are simultaneously equal at this point, and one is strictly unequal. In two-dimensional integer programming, this kind of 'double tight constraint' point is the strongest candidate for the optimal solution."
"From this coordinate system, we can determine that it is the optimal allocation scheme without calculating the objective function, because it simultaneously exhausts the two most scarce resources without any waste."
Liu Lu stared at the simple coordinate graph on the manuscript paper, her mouth agape in surprise.
She has participated in two National Undergraduate Mathematical Modeling Contests. Although she is not a modeler or a programmer, she knows a little bit about it.
Normally, modeling linear programming involves opening LINGO or MATLAB, inputting variables, setting constraints, and then running and waiting for the results.
What's going on here? They're just showing them data that would normally require software to calculate, directly from a coordinate system?
No, are all math students this good?
Beside him, Xu Zhiyuan took the manuscript from Han Chuan's hand, stared at the quadrilateral area on the coordinate system, and asked with a frown.
What if the vertices of the feasible region are not integers?
If it's not an integer, it means that the use of production materials during the modeling process cannot be calculated separately.
"Then let's enumerate the most recent integer points."
Han Chuan said in a relaxed tone, "For this kind of two-dimensional problem, there are at most four integer grid points near the intersection. By rounding up, down, left, and right, and verifying the constraints one by one, there will always be one that is optimal."
"However, for this problem, the intersection point itself is an integer, so we don't even need to enumerate it."
After he finished speaking, the laboratory was quiet for a few seconds. Xu Zhiyuan held the manuscript paper and stared at the coordinate system and formulas on it, pondering something.
Liu Lu looked at Han Chuan with surprise. Was this guy really participating in a modeling competition and taking a modeling class for the first time?
Why do you seem so skilled at it?
Han Chuan didn't seem to notice Liu Lu's gaze. He looked at Xu Zhiyuan, who was still frowning and deep in thought, and asked curiously, "Senior Brother Xu, is there anything else?"
Xu Zhiyuan was silent for a moment, then suddenly spoke up: "Han Chuan, can your method be applied to the reprocessing of layered frameworks?"
Upon hearing this, Han Chuan was taken aback: "Reprocess the layered framework?"
Xu Zhiyuan nodded, pulled his laptop from the desk next to him, pointed to the MATLAB program on the screen, and began to speak.
"These past two days I've been trying to redo problem B from the national competition two years ago, which is the urban traffic flow allocation problem, using a layered framework, and I've encountered some problems."
At this point, he seemed to remember something and immediately looked at Han Chuan, asking, "Have you seen the original question?"
Han Chuan shook his head and said, "No, during this period I have only come into contact with the relatively basic cases and problems in the modeling textbooks."
Upon hearing this, Xu Zhiyuan clicked the mouse and used the computer to bring up the problems from the 2007 National Competition.
Han Chuan leaned closer and took a look.
Simply put, the B problem of the 07 National Undergraduate Mathematical Modeling Contest was called "Taking the Bus to Watch the Olympics".
This is a challenging problem set against the backdrop of the 2008 Beijing Olympics, requiring participants to plan the optimal travel routes for spectators within a vast and complex public transportation (bus + subway) network.
Participants are required to build a query system based on "public transportation routes" for this problem, and design the core model and algorithm. It can be said to be a very classic problem combining multi-objective programming and graph theory.
The question is divided into three sub-questions, ranging from simple to complex.
The first question asks you to create a mathematical model and algorithm that only includes bus routes, considering only the bus network, to find the 'best route' for any two given stops.
The second question is to take subway lines into account and establish a unified model that can handle both bus and subway modes of transportation.
The third question is the most complex, requiring the introduction of walking as a factor. The extended model allows passengers to transfer between any two stations by walking.
After reading the question, Han Chuan's expression turned somewhat strange.
To release such a question before the 08 Olympics...emmmmm.
Why does he feel that the country is "profiting" from the results of the participants through modeling competitions?
After Han Chuan finished reading the problem, Xu Zhiyuan dragged the mouse to switch to his own solution and said, "The difficulty of this problem lies not in modeling, but in solving it mathematically."
"Because there are hundreds of bus routes and thousands of stops in Beijing alone. If we treat it as a standard graph theory shortest path problem, the size of the adjacency matrix would be too large to handle directly."
"Back then, all the teams that won awards for this problem used various heuristic algorithms, such as genetic algorithms, simulated annealing, ant colony algorithms, and so on. Essentially, they were all subtraction based on brute-force search."
"I've been thinking these past few days about whether this problem can be solved using a layered framework."
"Because the public transport network has a natural hierarchical structure: backbone routes, branch lines, connecting routes, and so on."
"If we put the backbone lines on the first level, the branch lines on the second level, and the connecting lines on the third level, with the transfer hubs as a shared variable, it should be theoretically feasible."
Staring at the solution on the screen, Han Chuan said thoughtfully, "I think your problem lies in the interchange points of the main lines and branch lines."
"Is that right?"
Upon hearing Han Chuan's words, Xu Zhiyuan looked over in surprise: "How did you know? Didn't you say you hadn't seen the original question?"
.....
PS: Second update! Please vote with monthly tickets, recommendations, and comments!
You'll Also Like
-
Naruto's Pirate Fruits are Invincible
Chapter 604 15 minute ago -
I, the Tyrannosaurus Rex, stand at the top of the food chain.
Chapter 633 15 minute ago -
In One Piece: I can copy any talent
Chapter 150 15 minute ago -
I became the Dragon King in the Dragon Clan.
Chapter 686 15 minute ago -
And that's how I became the chat group admin.
Chapter 461 15 minute ago -
Naruto: Everyone except me has their gender reversed
Chapter 382 15 minute ago -
Fantasy: Become stronger by devouring corpses
Chapter 234 15 minute ago -
Primordial Era: I, the strongest Buddha, start by picking up entries from the West!
Chapter 174 15 minute ago -
Gao Wu: I'm seventy years old, what the hell is the "Lying Down System"?
Chapter 142 15 minute ago -
Douluo Continent: The Martial Soul Emperor Armor, Purges All Evil
Chapter 213 15 minute ago