Real-life Application of Optimization Problem

. With the continuous improvement of science and technology, optimization has become an indispensable and important part of people's lives. Optimization problems also help people find the optimal solution in their lives. It is necessary to mention the practical application of optimization problems in reality. The purpose of the experiment in this paper is mainly to find out whether the optimization problem is far away from people through practical application examples, or whether it is closely related, and to explore whether it helps people's lives. This experiment is a verification of this problem. This experiment mainly uses Python and the gradient descent method to prove the practicality and efficiency of optimization problems. Specifically, it is based on the background of buying a house. The data comes mainly from practical examples of Guangdong, Baoan. The results are also obvious, successfully demonstrating that the practical application of optimization problems can improve people's lives, improve efficiency, and are closely related to people's lives.


Introduction
Optimization problems not only lay the foundation in the field of mathematics but also have an important place in the computer neighborhood.Optimization problems in mathematics help people find the optimal solution to make rational use of human, material, and financial resources [7].In the field of computing, the optimization problem improves the efficiency and effectiveness of the system and finally achieves the optimal goal of the system [3].Especially in real life, it has a wide range of applications, such as signal and image processing, deep learning, artificial intelligence, and so on.But all of this sounds too far away from the masses.But in the experiment of this paper, the main thing is to find practical applications that are closely related to people in optimization problems.And how optimization problems in computing improve people's lives and how it works.For this purpose, gradient descent was used in experiments to calculate the optimal solution.Gradient descent is used to calculate the minimum value of a function [4].For better observation, this experiment proposes some constraints.To improve people's living standards, the living environment is indispensable, so buying a house has become the basic setting of this experiment.To find the most suitable house for an individual, the most cost-effective house to find is the best solution to find a house.The main significance of this experiment is to help people find the optimal solution that exists in ordinary life and to let people understand that the optimal problem is not only in some advanced scientific journals, it is closely related to people's lives.

Objective
This experiment is based on the background condition of buying a house, and the price and floor space are the constraints.Experimentation can help people find the best value for money.That is, using python to find the optimal solution through gradient descent.Due to the large difference in the level of housing prices and facilities in different regions, this paper uses the benchmark range of house prices in Bao'an District, Shenzhen, Guangdong Province.

Materials/Procedure
• 7 different house information.

•
Floor space of different houses.

Procedures
(1) Open pycharm or use cmd to open Jupiter-lab.
(2) Import NumPy, import the random module and make it generate a random array containing 7 integers.
(3) Every integer is less than 300 and greater than 50.
(4) The resulting 7 numbers are the footprint of the house.
(5) Go to some Guangdong home buying websites [11] to find out the prices on different floor areas.
(6) Make it generate the price of a house.(7) Because to observe the solution process of the optimization problem more intuitively, the experiment only includes the price and floor area of the house, and the geographical location and the degree of decoration of the house are not counted.)(8) Start writing code and import matplotlib to prepare for later drawing.(9) First, shrink the array by a factor of 100 to make it a floating point number, to make the system better for calculation.(10)  This is experimental data.The upper two figures represents the floor area of the house and its unit is square meters, while the lower array represents the price of the house and its unit is thousand yuan.This is the data comparison chart output using matplotlib.The middle line is the trend line, which roughly predicts the relationship between area and house prices.By observing the chart listed above, it is obvious that the floor area of the house is directly proportional to the price of the house.That is to say, the larger the occupied area of the house, the higher its price.However, to reduce the inaccuracies caused by the geographical location, environment, decoration, etc. that are not included in the price, the experimental data on the price deliberately selected the median house price in a certain area of Guangdong.to ensure that the results of the experiment are accurate [6].The results are obvious.In the preceding line of the figure, x represents the optimal solution for the floor space of the house.The y in the figure represents the estimated price of the house.The equation in the second line is an estimate of the price of the house.And after calculation, the conclusion was reached.When the house covers an area of about 184.56m^2, it is probably the most cost-effective house in a certain area of Guangdong.The price of the house is about 1966k yuan [7].

Results and analysis
Buying a house is a very important thing in life for the average consumer group, and many people have not found a suitable house for a long time.Because they lack enough time and enough information.And this experiment can help people provide higher quality options.For example, people know about houses with different floor areas and attach prices.And because of direct viewing or too many numbers, people can't easily come up with the optimal solution.This experiment could help these people find a suitable area for them to buy.Although this sounds too far away from people's real lives.But there is also the simplest example, buying water, people need water every day, and to meet people's convenience, bottled mineral water was born.As people all know, mineral water has different brands.Some mineral waters are expensive and contain a small volume.To exclude brands that do not have a price-performance ratio, it is possible to fill in the data into the array of the experiment.This makes it easy not only to know which brand is the most cost-effective but also to know the price changes brought about by the volume of different brands.Therefore, this experiment can not only be used to buy a house, but also to buy a variety of ordinary things.As people often say, one should always shop around, but this time it not only depends on how far people could walk that can be more but also faster and more efficient.

Conclusion
In general, optimization problems can not only be applied to complex artificial intelligence but also to people's daily lives.It helps people use mathematical thinking to solve practical problems in life and find the best answers to practical problems [4].It is concluded in this paper that optimization problems can help people find the optimal solution to buying a house.It allows people to save some non-essential money, and it can save people time.Further, improve people's living standards.Not only does the optimization problem make it more efficient for people to find what they're looking for, but it's also the best option for them.However, the experiment in this paper has certain limitations, mainly because the results of the incomplete data are not accurate enough, such as the lack of consideration of geographical location, floor, actual use area, etc.But to make the data more accurate, next time people can join the crawler, find the data in the network and add it to the array to achieve data comprehensiveness.And add some weight ratios about other features of the house.This can not only help people find the house they are most worth buying, but also find the preferences of the buyers who choose according to the characteristics.The next experiment can also add more algorithms, like Newton's method, which is faster and more accurate than the gradient descent method.In short, experiments have proved that the real-world application of optimization problems has significantly improved people's lives, and it is closely related to people's lives.And optimization is not only beneficial to the people's lives but also beneficial to the country.For example, optimization time in quantum computing.Therefore, the application of optimization problems is a great achievement in reality, which greatly improves people's living standards.

Figure 2 .
Figure 2. The data array in the pycharm.

Figure 4 .
Figure 4.The result in the pycharm.
[10]gradient of the cost function at each iteration and update the weights[8](15) There is no significant reduction in error until the further adjustment of the weights.[10](16)The iteration stops when the experimental error is less than or equal to 0.001.(17) The final output is multiplied by 100 to make up for the reduced multiple at that time.(18) And the output result is the optimal solution of how big a house to buy in Guangdong.(19) Finally, matplotlib can be used to output a comparison chart about the data.
But don't forget to expand 100 times in the final output.(11) Initialize the weights with an array and calculate the error.(12) Calculate the gradient.(13) Use gradients to adjust weights to minimize optimal values.(14) 2.4.Data Figure 1.The data table.