027 Linear Programming
Su Hao replied calmly: "Students have only heard of Mr. Wu's talent for a long time, but they are not aware of how knowledge Mr. Wu is proficient in, so they cannot tell whether he has the knowledge that Mr. Wu can appreciate. The student wants to ask Mr. Wu a question. Mr. Wu just needs to say that you know or not, and it won't waste your time. What do you think?"
The students sitting below all stared at Su Hao and Wu Zhicheng with wide eyes. Su Hao's words sounded polite, but there was a sharp edge hidden in them. Su Hao's request was very simple: I'll give you a question, you just need to say whether you know or not. As a young man who only got the last place in the exam, saying this to the learned scholar was simply a provocation.
"If I can, what do you think? If I can't, what do you think?" Wu Zhicheng asked with anger. A young man can calm down under his own derogatory conditions. If he is so excited that he jumps up by someone else's words, wouldn't he fall first? Thinking of this, he decided not to explode.
Su Hao said: "If the teacher can do it, the student will immediately cover his face and leave, because this is the only one who feels that he can take it out and ask the teacher to learn. If the teacher can't..."
"Then I will immediately resign from my position as a teacher and go home to study in a closed door, so that I will no longer mislead my children." Wu Zhicheng was forced into a corner by Su Hao and had to make harsh words. He thought to himself that if Su Hao's question was about upright knowledge, then he had no reason not to understand. If Su Hao insisted on finding an unpopular question to test him, Fang Mengjin must have also denounced Su Hao as shameless, so he didn't have to worry about this.
Su Hao said: "It's not necessary. You have a specialized career. It is normal for Mr. Wu to encounter something he doesn't understand by chance. The students just hope to get an opportunity to ask Mr. Wu for advice."
"Don't talk too much, just talk about your problem." Wu Zhicheng said.
Su Hao said: "This problem is a problem that our workshop encountered in the project. Now we want to build 150 bamboo utensils, each of which requires 4 feet, 2 feet 6 inches and 1 foot 7 feet bamboo poles. There are several bamboos with 1 zhang long. How to cut the materials so that the amount of long bamboo can be used is the least, and how much is the minimum?"
"this……"
As soon as Su Hao finished talking about the problem, the people in the room changed their faces. This problem sounded very clear, but everyone knew that such a question was impossible to solve at all.
A 1 zhang long bamboo can be cut into 2 4 feet, and the remaining part can be cut into 1 1 foot 7 inches, so that 3 inches of bamboo heads will be left; in the same way, it can be cut into 1 4 feet, 1 2 feet 6 inches, and 2 1 foot 7 inches, which is just a waste. The problem is that the quantity required is 150 in each of the three sizes, which requires the combination of various cutting methods. As for how to combine it is the best, in everyone's mind, there is no better way except to test one by one.
Obviously, Su Hao raised such a question not to let Wu Zhicheng solve it using experimental methods, but Wu Zhicheng didn't know how to solve it. If you say that this problem is an unpopular one, it seems unreasonable. Similarly, such a problem may be encountered in daily life.
In the mid-April of the lunar calendar, others were sweating hot, but Wu Zhicheng felt that his vest was covered with cold sweat. As a proud scholar, the most unbearable thing was that he was asked by others about his studies. Wu Zhicheng had never been asked by others in his life, but he never was like now. He clearly felt that this was a very simple question, but he couldn't even touch any tricks.
"Su Hao, this is a math problem, but I can't remember which book has a mantra available. If you have this question, can you solve it?" Fang Mengjin could hear from Wu Zhicheng's gasp beside him that he was in awkwardness, so he broke the silence and asked Su Hao. Fang Mengjin didn't bet with Su Hao, so he asked him a question.
When Su Hao was giving the question, he didn't expect Wu Zhicheng to do it. You should know that this is a linear programming problem, which was several hundred years ahead of this era. Even in the West, the linear programming problem was proposed 200 years later, that is, in the early 19th century. The first person to raise this problem was the famous French mathematician Fourier, but with the level of Zhuanlier, he could not find a good solution. Instead, it took more than 100 years before the 1950s that the corresponding algorithm was found.
Su Hao used such a question to test Wu Zhicheng. To put it bluntly, he used his golden finger to bully the ancients. Then again, people who traveled through time do not use golden fingers, so how dare you say that you came from time to time?
Seeing Wu Zhicheng's old face turned red, Su Hao smiled slightly, and said to Fang Meng Jin: "Master Fang, I have no way to solve this problem in my Ming Dynasty. However, the barbarians have the skills of matrix to solve this problem."
"Does Brother Su know this technique?" Fang Mengjin asked.
"A little bit of it." Su Hao said bluntly.
Fang Mengjin said: "Then please let Brother Su demonstrate to me, how?"
"As for your order." Su Hao bowed his hand and asked the students: "Who can you borrow a few pieces of white paper from me?"
"I have it!"
"Use mine!"
Several students scrambled to hand over the paper. Su Hao thanked him and took the paper. Another student took out the pen and ink and wanted to hand it to Su Hao. Su Hao waved his hand and took out a few pieces of charcoal from his sleeve. He smiled and said, "Shame, when I was doing math, I am used to using this object as a pen."
Isn't this nonsense? No one can solve matrix problems with a brush. Su Hao took a simple charcoal pen and started writing formulas on paper. Everyone gathered to watch. Although Wu Zhicheng couldn't hide his face, he also wanted to know what method Su Hao used to solve this problem, so he stood by and watched.
"Brother Su, what you wrote is the counting method of the barbarians?" Fang Mengjin couldn't help asking when he saw the string of Arabic numerals written by Su Hao.
"That's right." Su Hao said, "This kind of counting method is called Arabic numerals. It was actually invented by the Indians and was transmitted to Folangji by the Tianfang people. The Tianfang we talk about is called Arabic in the Folangji language. In fact, Arabic numerals were already introduced to China during the Southern Song Dynasty, but no one used it."
"You also learned this from Folang Jiren?" Fang Mengjin asked.
"Yes, the Folangji missionary I have met has a wide range of knowledge and has told me a lot."
Su Hao was talking and writing formulas in his hands. He used the simplex method to solve linear programming problems. The steps of this method are quite troublesome, but they only involve simple addition, subtraction, multiplication and division, and it is quite fast to calculate. After a while, Su Hao listed the final formula, and pointed to the result and said to everyone:
"Look at it, this is the result of the calculation. Let's set a 4-foot bamboo pole as A, a 2-foot-6-inch bamboo pole as B, and a 1-foot-7-inch bamboo pole as C.
If you take 21 long bamboos and cut into 2A and 1C, you can get 42A and 21C; if you take 45A and 1A and 2B, you can get 45A and 90B; if you take 60A and 1A and 1B and 1B and 1B and 2B, you can get 60A, 60B and 120C; if you take 3A and 1A and 3B and 1A and 3B, you can get 3A and 9C.
The above total of 129 long bamboos are required, and 150 each of A, B and C are obtained, which is the most efficient way."
Everyone looked at each other. As students in the academy, they usually have to learn some arithmetic. This is called mathematics art in the academy, including Fangtian, Libu, Difference, Shaoguang, Shanggong, All-Shuo, Win, Evolution, Equation, Pythagorean, etc. Students who are consciously good at mathematics art immediately began to verify the numbers calculated by Su Hao, and the result was of course no problem at all. As for whether 129 long bamboos are the best result, everyone cannot verify it, but when they try to use other combination methods to cut, the resulting values are greater than 129.
"Brother Riqian, look at Su Hao's result..." Fang Mengjin turned his head and looked at Wu Zhicheng, asking for his opinion.
As a great scholar, Wu Zhicheng has quite some attainments in mathematics and art. Su Hao used the simple form method to solve this planning problem. He stood aside and watched carefully and realized some things. It was precisely because of this that he was even more shocked. You must know that this is a new field that he had never seen or even thought about. In this world, there is such a wonderful algorithm that can solve such a difficult problem with simple additions, additions and subtractions.
"Young Master Su, I am in a well and observing the sky, and forgot to learn endless ancient teachings. I am really ashamed of it. I used to be quite disrespectful to Mr. Su, so I would like to forgive me. Mr. Su, please accept my worship."
Wu Zhicheng is arrogant, but he is also a responsible person. Once he realizes his mistake, he will admit it immediately, and he will not be afraid of apologizing to a young man like Su Hao in front of all the students.
Seeing that Wu Zhicheng was so humble, Su Hao dared not accept his great gift. He quickly bowed and returned the gift, saying, "Mr. Wu has ruined the students. The students have just learned some strange and lewd skills of the barbarians. How can they compare with the master's great talent?"
"Young Master Su, I am very envious of you, the barbarian method of numerology. I wonder if Mr. Su is willing to grant it to me?" After Wu Zhicheng apologized, he immediately shamelessly wanted to learn from Su Hao. This is the character of an old intellectual like him. He heard the truth in the morning and died in the evening. Seeing something he didn't understand, he didn't even have the patience to wait for a few days.
Su Hao said: "Mr. I have any questions. Students should know that everything is said. However, Mr. Wu, it is not the time to teach this method of mathematics. The matter of digging wells is the top priority. The student dared to ask Mr. to lend me some disciples to help me."
"It's easy to say, it's easy to say." Wu Zhicheng nodded. He walked up to the podium, looked at the students in the lecture hall, and said loudly: "Dear students, Mr. Su Hao is now appointed by the magistrate Han to be responsible for the county's well digging affairs. Mr. Su wants to hire several students in our academy to help them survey the well position. Who would like to participate?"
Before he finished speaking, the students in the room raised their right hands together, like a forest.
;
Chapter completed!