Current location - Training Enrollment Network - Mathematics courses - How to treat the relationship between mathematics and programming
How to treat the relationship between mathematics and programming
Mathematics is a highly instrumental science, which is more abstract than other sciences. At first, computer scientists were inseparable from mathematics. Mathematicians thought computers were dispensable to them, but now they are inseparable from each other. Computers have also raised the status of mathematicians in people's minds. Most mathematicians began to realize the importance of computers, and more and more entered the computer field to play a role. However, with the rapid development of artificial intelligence and global positioning system (GPS) and the leap-forward improvement of computer computing performance, the advantages of computers are more and more in-depth into the field of thinking, so computers apply advanced mathematical theories to practice and solve many practical problems very effectively. For example, the famous four-color problem is proved by computer. There are many practical branches of mathematics in the process of solving problems, such as analytic geometry, wavelet analysis, discrete mathematics, bionic calculation, finite element method in numerical calculation and so on. It lets people know that computer programming combines mathematical knowledge and mathematical ideas.

Software programming is based on mathematical model, so mathematics is the main foundation of computer science, and applied mathematics, represented by discrete mathematics, is the main tool to describe the theory, method and technology of the subject. In software programming, not only many theories are described by mathematics, but also many technologies are described by mathematics. From the aspect of programming of various computer applications, any program that can run on an electronic digital computer with stored programs must first have a constructive calculation method, the data representation must be discretized, and the calculation operation must be carried out by logical or algebraic methods, which must be reflected in the algorithms and programs. In addition, so far, the theoretical basis of the correctness of the algorithm, the semantics of the program and its correctness is still mathematical logic or further model theory. True process semantics is semantics in the sense of model theory. Therefore, the rigor of software programming thinking and the high consistency between subject theory and realization technology are the fundamental reasons for the close relationship between computer science and technology and mathematics. From the perspective of discipline characteristics and discipline methodology, the main basic idea of software programming is mathematical thinking, especially discrete mathematics represented by algebra and logic in mathematics, while program technology and electronic technology are only the product or a technical expression of computer science and technology.

(A) the development of mathematics in the computer field

Now all kinds of software are inevitably related to mathematics, and they complement each other. For example, the application of logic in disciplines has developed from early mathematical logic to today's program model theory; The application of mathematics in the discipline has developed from the early abstract algebra to today's graphics and engineering problems. The application of geometry has developed from the early two-dimensional plane computer drawing to today's three-dimensional animation software system, and fractal theory and technology have appeared in the combination with complex analysis; In the development of games and graphics software, coordinate transformation and matrix operation in linear algebra are widely cited. Wavelet theory and algebraic coding theory are introduced into data compression and recovery and information security.

(B) the thinking mode of software programming

The mentality of software programming determines a person's programming level. In the process of programming, the mathematical thinking is clear, and the written program is refreshing. Combined with teaching, through investigation and analysis, it is known that more than 85% students write programs according to grammar when programming, which is completely out of the thinking of software programming. This mentality makes the programs they write quite bad and illogical.

The reason for this kind of thinking in software programming is that they usually do not pay enough attention to the cultivation of mathematical thinking. Many computer majors think: What's the use of learning advanced mathematics? What's the use of learning linear algebra? What's the use of learning discrete mathematics? So they seldom go to these classes, so, so, they stay in the dormitory all day, playing games, installing software and watching C language. I only know that probability problems and matrix knowledge have supplemented other courses, but I haven't learned much. But when they see:> Sometimes, they think the content is quite difficult for them to understand, and then they vaguely feel the role of mathematical thinking. Before that, they not only ignored the advanced mathematics in universities, but also forgot a lot about elementary mathematics in junior high schools. When they are thinking in a highly abstract way, they really feel that their thinking is already slow. The reason why students majoring in computer science find the course Data Structure difficult is because they have not exercised enough mathematical thinking! In fact, there are many such examples in life: for a college student who just graduated from writing application software, when using the matrix of linear algebra in programming, I am afraid that it is good to learn linear algebra well in college; When using dynamic linked lists and trees in programs, I am afraid I will think "how meaningful it is to spend some time learning data structures in universities"; When studying data structure, I am afraid I will also think, "Why do you skip so many classes when studying discrete mathematics?" Otherwise, it will be very easy to learn discrete mathematics. " Therefore, mathematical thinking is not enough, software programming will have a lot of doubts, obviously a little timid, and the written program is not sound enough and lacks logic.

(C) the integration of software programming and mathematical thinking

Many professionals think that math and software programming skills are like Tai Chi and boxing. Strong software programming ability is like punching fast and heavy, which can directly give people a heavy blow. If you are good at math, you are like master Chi of Artest. On the surface, you don't have much strength, but your inner energy is stronger. But the younger a good boxer is, the better. Tai Chi masters are all experienced. Therefore, mathematics is the necessary ability to achieve a master. Although many students seem to feel useless, they will realize its power after reaching a certain level.