-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for non-flattened trees #10
Comments
I'm interested in being able to describe what's going in terms of axioms and rule built on top of them. It think flattened trees are well suited to this b/c it's easier to describe the rules and apply the transforms. I wrote a tool a while ago using flattened trees that allowed users to select parts of expressions and equations and perform transforms based on axiom (and related rules) called algebra-tool. I found that manipulating flattened trees was much easier than binary trees. From the
The reason for this restriction is that hope that math-ast can become an interchange format for different tools and I was worried that if tools had to worry about supporting binary trees as well would make it hard to adopt. Maybe we can have another "module" (for lack of a better term) of the spec for binary trees and then tools can advertise whether they support the "core" module or the "binary" module. We could also have tools for transforming back and forth between flattened trees and binary trees. What I mean by "module" here is similar to how W3C has HTML and CSS specs with separate modules such as CSS Fonts Module which specifies all of the font stuff in CSS. I imagine that |
Just having tools for transforming back and forth between flattened trees and binary trees should be adequate for my use case. I think we have similar math-related educational interests because I am also interested in describing how math works in terms of axioms and the rules that are produced from them (both at the object-level and at the meta-level). However, the following object-level axioms from the theory of elementary algebra each produce two rules (one rule is produced by reading the axiom left-to-right, and the other rule is produced by reading the axiom right-to-left. Each rule is useful because of the syntactic effect it produces at the object-level.):
How does one teach these object-level axioms and rules without using binary trees? Manipulating flattened trees is indeed easier than manipulating binary trees. However, if the goal is to solve math problems easily instead of achieving deep mathematical understanding, the easiest way I can think of is to just use a conventional CAS to solve the problems. Also, I don't know if it is possible to teach the axioms and rules of the meta-theory of elementary algebra without using binary trees. I am hoping mathsteps will be helpful for determining this. Your algebra-tool is great! I immediately saw ways to enhance it to support the approach to teaching math I have in mind. |
Rule1 and Rule2 seem to be the same to me. They both swap operands. The double linked list I used in algebra-tool made commutating operands really easy because each
Associative property is definitely needs a binary tree structure. math-parser already produces appropriate trees:
Although the draft spec makes the following statement:
The AST supports binary use cases and in this case math-parser implements behavior that's useful for this use case. Does this meet your needs?
Thanks. I'm curious what enhancements you think would be useful. |
You got me on the redundant commutative rules, I overlooked those :-)
The initial enhancement I have in mind it to add an interactive tree to the application similar to what is shown in the following research paper: This research indicates that the first thing students should be taught about algebra is that expressions have structure, and binary trees work well for this purpose. Flattened trees may also work, but research would need to be done with them to determine this.
I can see how to implement
Yes, it meets my needs. You can close this issue if you would like. |
The program can store additional information about the transformations that are being done and communicate that to the student in a way that will help them learn the concept. In this case we might store the step as
The way I look at the AST, is it only stores the state of the expression/equation at each step, but it doesn't really know about the what was done to move from step to another or even that this is a valid set of steps. That's a set of rules and logic that can be layered on top of the AST and maybe over time we'll develop common ways for communicating that as well.
I'd be interested in reading that research if it was ever done. It would be interesting to compare the efficacy of teaching binary trees vs. flattened trees. |
Continuing a discussion started in math-parser #12. One use case is to show computation order. Another use case is to teach how elementary algebra works in a way that is more directly linked to the laws of elementary algebra. Algorithms such as "Combine Like Terms" are useful for simplifying expressions using pencil and paper. However, they sacrifice mathematical detail for speed. I would like the option to also teach these sacrificed details because in the long term they are more important than being able to simplify quickly on paper.
The text was updated successfully, but these errors were encountered: