Abstract

For the interactive computer algebra system (CAS), to solve the matching problem of different mathematical expressions between students and CAS, this paper proposes a mathematical expression matching algorithm to achieve exact matching of different mathematical expressions between students and CAS. First, according to the MathML representation markup coding of the mathematical expression, the markup coding is parsed into the linear string representation of the expression by the back-end program, and the binary tree is generated after preprocessing it and then normalizing its tree structure and calculating the structured coding of the binary tree. For the two mathematical expressions to be matched, if their structure codings are the same, then compare their postorder and in-order traversal sequences. If they are the same, the two expressions are matched in the structure; go to the next step of the algorithm: matching the content of the mathematical expressions. For the binary tree of expressions with the same structure, the above traversal sequence is repeated to compare the obtained traversal sequence. The two expressions match if they are the same; otherwise, they do not match. The algorithm can realize exact matching between two mathematical expressions from the experimental results. When faced with mathematical expressions containing a large number of large integers, the matching of its structure is judged first. If it does not match, it can interrupt and exit and save time. It improves the running efficiency of the algorithm and is a convenient, fast, and practical algorithm.

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.