-
Notifications
You must be signed in to change notification settings - Fork 275
be able to tell if two expressions are equal #132
Comments
@tkosan :
|
I know nothing about CAS systems, but could we possibly use some form of pathfinding algorithm coupled with a heuristic? It seems to make sense to consider a graph of all mathematical expressions understood by the system, with edges for operations that do not change the value of expressions. Then the problem of checking whether two expressions are equal boils down to finding a path between them in the graph. Clearly a system like KAS might be better suited to this problem; I am just wondering what other approaches exist. Especially if you consider things from an educational standpoint: if you try semi-random values for variables you can only claim that two expressions are equal within some degree of accuracy, and you have very little information about why they are equal. However, if you find a sequence of operations to get from one to the other you could actually show that to the user, should he want to. (e.g. "by those three steps you can get from your teacher's solution to the one you found!"). @tkosan would you have some insights on this? |
@hmaurer, the CAS community developed algorithms a long time ago for determining if two expressions are equivalent. A standard approach is to simplify both expressions to a canonical form, and then compare these forms syntactically. If the ultimate goal of the A question that is related to this issue is why did Khan Academy deprecate their 100% software-based exercise framework and switch to using humans to create exercises when logic-based AI software such as AGILMAT has existed for years that automatically generates math problems using scientific methods? @kevinbarabash, do you have any insight on this question? |
@tkosan What would using a state of the art system entail? |
Cool! That's pretty clear |
@aelnaiem I spent some time this weekend looking at JavaScript CASs, and so far I think Algebrite is the most promising candidate for possible inclusion in mathsteps. It can solve the "telling if two expressions are equal" problem that is discussed in this issue, and it would also be useful for testing various parts of mathsteps such as equation solving, simplification, factoring, and (in the future) differentiation and integration. Having a conventional CAS in mathsteps would also provide the ability to enhance the user experience by always returning an answer even if the capability to return the steps for this answer is not implemented yet. The size of the unminified version of Algebrite is around 650k. Some functionality could probably be removed from Algebrite to reduce its size if needed. |
This is blocked on our new parser because it has to do with tree equivalence #128
This would be helpful for:
(x + 2)/((x + x)
doesn't cancel right nowmathsteps
that lets learners write in their open work that is checked along the wayThere might be different solutions for different situations - sometimes we might want to know if two expressions are equal in any way, and sometimes we might want to decide they're "very close to equal" i.e. they're just the same terms in different orderings
One thing for "very close to equal" would probably be to make a standardized ordering of terms, so we could always sort the terms in that way and check if the expressions are the same.
I would love to hear more thoughts on this!
The text was updated successfully, but these errors were encountered: