Artificial intelligence; Binary tree; Traverse the database
1 Introduction
Discrete mathematics is the core basic course of computer specialty, which has important applications in computer science. It is the necessary foundation of computer professional courses such as data structure, operating system, compilation principle, database system principle and digital logic, so discrete mathematics is an important mathematical tool to master the theoretical basis of computer science. From this point of view, the important application of discrete mathematics in computer science is introduced.
Application of Discrete Mathematics in Computer Science
2. 1 application of mathematical logic in artificial intelligence
Artificial intelligence is a very important direction in computer science. The application of discrete mathematics in artificial intelligence is mainly the application of mathematical logic in artificial intelligence. Mathematical logic includes propositional logic and predicate logic. Propositional logic studies the reasoning between the premises and conclusions based on propositions, while predicate logic studies the internal relations of sentences. As we all know, there are two schools of artificial intelligence, connectionism and symbolism. Among them, in the symbolism school, they think that all kinds of things in the real world can be represented by symbols, and the most important thing is that human natural language can be represented by symbols. Symbolization of language is the basic content of mathematical logic research. The premise of computer intelligence is to turn human language into symbols that machines can recognize, so that computers can reason and have intelligence. This shows that important ideas, methods and contents in mathematical logic run through the whole discipline of artificial intelligence.
2.2 Application of Graph Theory in Data Structure
The application of discrete mathematics in data structure is mainly the application of graph theory in data structure, and tree plays an important role in graph theory. Tree is a nonlinear data structure. In real life, it can be used to represent a family tree or the organizational structure of a company, and it can also be used to represent the organizational structure of files in a computer. The binary tree in the tree has important applications in computer science. Binary tree * * * has three traversal methods: preorder traversal, intermediate traversal and postorder traversal.
2.2. 1 preorder traversal method: if the binary tree is empty, it will be returned. Otherwise, (1) visits the root node (2) and traverses the left subtree (3) and the right subtree to obtain the preamble sequence.
2.2.2 Middle order traversal method: If the binary tree is empty, it will be returned. Otherwise, the middle sequence in (1) traverses the left subtree (2), and the middle sequence traverses the right subtree (3) at the root node to obtain the middle sequence.
2.2.3 Postorder traversal method: If the binary tree is empty, it will be returned. Otherwise (1), the post-sequence traverses the left subtree (2), and the post-sequence traverses the right subtree (3) to access the root node to obtain the post-sequence sequence.
By accessing different traversal sequences, different node sequences can be obtained. Usually, algebraic expressions are read by different traversal methods in the computer, so that algebraic expressions can be operated in the computer.
2.3 Application of Set Theory in Database System Theory
Set theory is an extremely important part of discrete mathematics and is widely used in databases. We can use relational theory to change the database from networked and hierarchical to relational, so that the data in the database is easy to represent, store and process, and the logical structure is simple, the data is independent, the data is shared, the data is redundant and controllable, and the operation is simple. When there are many records in the database, the Cartesian product in the collection facilitates the query, insertion, deletion and modification of the records.
2.4 Application of Algebraic System in Communication
Algebraic systems are widely used in computers, such as counting finite machines and switching circuits. But the most commonly used is the application in error correction code. In computer and data communication, it is often necessary to transmit binary digital signals, which are often far away, so errors will inevitably occur. Error-correcting codes are usually used to avoid such errors. The mathematical basis of this error-correcting code is algebraic system. The uniform check matrix in error-correcting code is designed according to the concept of group in algebraic system. In addition, cosets in algebraic systems are also used to correct group codes.
2.5 Application of Discrete Mathematics in Bioinformatics
Bioinformatics is a brand-new branch of modern computer science, which is the product of the combination of computer science and biology. At present, there is a national laboratory in the United States, Sandia National Laboratory, which mainly studies combinatorial coding theory and cryptography. This institution has a high status in American and international academic circles. In addition, because DNA is the sequence structure in discrete mathematics, Professor Rota, an academician of the American Academy of Sciences and the founder of modern discrete mathematics, predicted that combinatorial problems in biology would become the frontier field of discrete mathematics. Moreover, IBM will also set up a bioinformatics research center. 1994, American computer scientist Adlerman announced the theory of DNA computer and successfully solved a directed Hamilton path problem by using DNA computer. This achievement quickly produced great repercussions in the international arena and attracted the attention of domestic scholars. The basic idea of DNA computer is: using DNA base sequence as the carrier of information coding, using modern molecular biology technology, controlling the DNA sequence reaction under the action of enzymes in test tubes as the process of operation; In this way, the DNA computer can take the DNA sequence before the reaction as the input data and the DNA sequence after the reaction as the operation result, and solve almost all NP-complete problems.
3 Conclusion
At present, every computer major in China has set up discrete mathematics courses. Because of the important application of discrete mathematics in computer science, it can be said that there is no computer theory without discrete mathematics, and there is no computer science. Therefore, we should study discrete mathematics hard, promote the research of discrete mathematics, and make it more widely used in computers.
refer to
[1] Geng suyun, qu wanling, discrete mathematics [M]. Beijing: Higher Education Press
Zuo Xiaoling, Li Yongjian and Liu Yongcai. Discrete mathematics [M]. Shanghai: Shanghai Science and Technology Literature Publishing House, 2004.
[3] Zhu Yiqing. Discrete mathematics [M]. Beijing: Electronic Industry Press, 2004.